org.apache.jackrabbit.core.query.lucene
Class LuceneQueryFactoryImpl

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.LuceneQueryFactoryImpl
All Implemented Interfaces:
LuceneQueryFactory

public class LuceneQueryFactoryImpl
extends Object
implements LuceneQueryFactory

LuceneQueryFactoryImpl implements a lucene query factory.


Constructor Summary
LuceneQueryFactoryImpl(SessionImpl session, org.apache.lucene.search.SortComparatorSource scs, HierarchyManager hmgr, NamespaceMappings nsMappings, org.apache.lucene.analysis.Analyzer analyzer, SynonymProvider synonymProvider, IndexFormatVersion version)
          Creates a new lucene query factory.
 
Method Summary
 org.apache.lucene.search.Query create(FullTextSearchImpl fts)
          Creates a lucene query for the given QOM full text search.
 MultiColumnQuery create(JoinImpl join)
          Creates a multi column query for the given QOM join.
 org.apache.lucene.search.Query create(PropertyExistenceImpl prop)
          Creates a lucene query for the given QOM property existence constraint.
 org.apache.lucene.search.Query create(SelectorImpl selector)
          Creates a lucene query for the given QOM selector.
 MultiColumnQuery create(SourceImpl source)
          Creates a multi column query for the given QOM source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneQueryFactoryImpl

public LuceneQueryFactoryImpl(SessionImpl session,
                              org.apache.lucene.search.SortComparatorSource scs,
                              HierarchyManager hmgr,
                              NamespaceMappings nsMappings,
                              org.apache.lucene.analysis.Analyzer analyzer,
                              SynonymProvider synonymProvider,
                              IndexFormatVersion version)
Creates a new lucene query factory.

Parameters:
session - the session that executes the query.
scs - the sort comparator source of the index.
hmgr - the hierarchy manager of the workspace.
nsMappings - the index internal namespace mappings.
analyzer - the analyzer of the index.
synonymProvider - the synonym provider of the index.
version - the version of the index format.
Method Detail

create

public org.apache.lucene.search.Query create(SelectorImpl selector)
                                      throws RepositoryException
Creates a lucene query for the given QOM selector.

Specified by:
create in interface LuceneQueryFactory
Parameters:
selector - the selector.
Returns:
a lucene query for the given selector.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public org.apache.lucene.search.Query create(FullTextSearchImpl fts)
                                      throws RepositoryException
Creates a lucene query for the given QOM full text search.

Specified by:
create in interface LuceneQueryFactory
Parameters:
fts - the full text search constraint.
Returns:
the lucene query for the given constraint.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public org.apache.lucene.search.Query create(PropertyExistenceImpl prop)
                                      throws RepositoryException
Creates a lucene query for the given QOM property existence constraint.

Specified by:
create in interface LuceneQueryFactory
Parameters:
prop - the QOM constraint.
Returns:
the lucene query for the given constraint.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public MultiColumnQuery create(SourceImpl source)
                        throws RepositoryException
Creates a multi column query for the given QOM source.

Specified by:
create in interface LuceneQueryFactory
Parameters:
source - the QOM source.
Returns:
a multi column query for the given source.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public MultiColumnQuery create(JoinImpl join)
                        throws RepositoryException
Creates a multi column query for the given QOM join.

Specified by:
create in interface LuceneQueryFactory
Parameters:
join - the QOM join.
Returns:
the multi column query for the given join.
Throws:
RepositoryException - if an error occurs while creating the query.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.