net.sf.eos.lucene
Class DefaultEosQuery

java.lang.Object
  extended by net.sf.eos.config.Configured
      extended by net.sf.eos.lucene.DefaultEosQuery
All Implemented Interfaces:
Configurable, CommonDocument, EosQuery

public class DefaultEosQuery
extends Configured
implements CommonDocument, EosQuery

Use internally AnalyzerSupplier, SearcherSupplier and CommonNameResolver if configured.

Author:
Sascha Kohlmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.eos.lucene.CommonDocument
CommonDocument.FieldName
 
Constructor Summary
DefaultEosQuery()
           
 
Method Summary
 DefaultEosQuery and(String phrase)
          Adds a phrase to lookup with the boolean and operation.
 DefaultEosQuery andMeta(String fieldName, String value)
          Adds a meta entry for a special field to lookup with the boolean and operation.
 DefaultEosQuery andMetaRange(String fieldName, String lowerBound, String upperBound)
          Adds a meta entry for a special field to lookup with the boolean and operation.
 DefaultEosQuery andNot(String phrase)
          Adds a phrase not to lookup with the boolean and operation.
 DefaultEosQuery andNotMeta(String fieldName, String value)
          Adds a meta entry for a special field to not lookup with the boolean and operation.
 List<LookupEntry> execute()
          Creates the executable query.
 DefaultEosQuery or(String phrase)
          Adds a phrase to lookup with the boolean or operation.
 DefaultEosQuery orMeta(String fieldName, String value)
          Adds a meta entry for a special field to lookup with the boolean or operation.
 DefaultEosQuery orMetaRange(String fieldName, String lowerBound, String upperBound)
          Adds a meta entry for a special field to lookup with the boolean or operation.
 
Methods inherited from class net.sf.eos.config.Configured
configure, getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.eos.config.Configurable
configure
 

Constructor Detail

DefaultEosQuery

public DefaultEosQuery()
Method Detail

and

public DefaultEosQuery and(String phrase)
Description copied from interface: EosQuery
Adds a phrase to lookup with the boolean and operation.

Specified by:
and in interface EosQuery
Parameters:
phrase - the phrase to lookup
Returns:
this instance

andNot

public DefaultEosQuery andNot(String phrase)
                       throws EosException
Description copied from interface: EosQuery
Adds a phrase not to lookup with the boolean and operation.

Specified by:
andNot in interface EosQuery
Parameters:
phrase - the phrase to lookup
Returns:
this instance
Throws:
EosException - if an error occurs

andMeta

public DefaultEosQuery andMeta(String fieldName,
                               String value)
Description copied from interface: EosQuery
Adds a meta entry for a special field to lookup with the boolean and operation.

Specified by:
andMeta in interface EosQuery
Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance

andNotMeta

public DefaultEosQuery andNotMeta(String fieldName,
                                  String value)
Description copied from interface: EosQuery
Adds a meta entry for a special field to not lookup with the boolean and operation.

Specified by:
andNotMeta in interface EosQuery
Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance

andMetaRange

public DefaultEosQuery andMetaRange(String fieldName,
                                    String lowerBound,
                                    String upperBound)
Description copied from interface: EosQuery
Adds a meta entry for a special field to lookup with the boolean and operation. The two value parameters spans a range between the lower bound value and the upper bound value.

Specified by:
andMetaRange in interface EosQuery
Parameters:
fieldName - the meta field name to lookup
lowerBound - the meta lower bound value to lookup
upperBound - the meta upper bound value to lookup
Returns:
this instance

or

public DefaultEosQuery or(String phrase)
Description copied from interface: EosQuery
Adds a phrase to lookup with the boolean or operation.

Specified by:
or in interface EosQuery
Parameters:
phrase - the phrase to lookup
Returns:
this instance

orMeta

public DefaultEosQuery orMeta(String fieldName,
                              String value)
Description copied from interface: EosQuery
Adds a meta entry for a special field to lookup with the boolean or operation.

Specified by:
orMeta in interface EosQuery
Parameters:
fieldName - the meta field name to lookup
value - the meta value to lookup
Returns:
this instance

orMetaRange

public DefaultEosQuery orMetaRange(String fieldName,
                                   String lowerBound,
                                   String upperBound)
Description copied from interface: EosQuery
Adds a meta entry for a special field to lookup with the boolean or operation. The two value parameters spans a range between the lower bound value and the upper bound value.

Specified by:
orMetaRange in interface EosQuery
Parameters:
fieldName - the meta field name to lookup
lowerBound - the meta lower bound value to lookup
upperBound - the meta upper bound value to lookup
Returns:
this instance

execute

public List<LookupEntry> execute()
                          throws EosException
Description copied from interface: EosQuery
Creates the executable query.

Specified by:
execute in interface EosQuery
Returns:
the executable query
Throws:
EosException - if an error occurs


Copyright © 2008. All Rights Reserved.