fr.gouv.culture.sdx.search.lucene.query
Class ExactFieldQuery

java.lang.Object
  extended by fr.gouv.culture.sdx.utils.AbstractSdxObject
      extended by fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
          extended by fr.gouv.culture.sdx.search.lucene.query.ExactFieldQuery
All Implemented Interfaces:
Query, Describable, Encodable, Identifiable, Localizable, SdxObject, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable

public class ExactFieldQuery
extends AbstractQuery

Contains an exact acceptRequest on a term in a field. No treatment is carried out on this acceptRequest. To carry out a research on a term in a field, in a general way, it is preferable to use the FieldQuery class, which takes account of the type of field.


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject
SdxObject.ConfigurationNode
 
Field Summary
 
Fields inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
baseOperator, baseQuery, baseResults, cachedQuery, filter, luceneQuery, searchLocations, sortSpecification
 
Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized
 
Fields inherited from interface fr.gouv.culture.sdx.search.lucene.query.Query
defaultOperator, LUCENE_BOOLEAN_QUERY_MAX_CLAUSES, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE
 
Fields inherited from interface fr.gouv.culture.sdx.search.Query
CLASS_NAME_SUFFIX
 
Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
DEFAULT_ENCODING
 
Constructor Summary
ExactFieldQuery()
          Creates a query A super.getLog() must be set and then this query must be setUp.
 
Method Summary
 void setUp(SearchLocations sLocs, java.lang.String fieldName, java.lang.String q)
          Builds an exact field query.
 void toSAX(org.xml.sax.ContentHandler hdl)
          Formats a query in XML.
 
Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, execute, getBoost, getCachedQuery, getClassNameSuffix, getLuceneQuery, getOperator, getSearchLocations, initToSax, initVolatileObjectsToSax, prepare, setBoost, setBoost, setLuceneQuery, setSearchLocations, setUp, setUp
 
Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject
getLog
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 
Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
contextualize
 
Methods inherited from interface org.apache.avalon.framework.service.Serviceable
service
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
configure
 
Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable
getId, setId
 
Methods inherited from interface fr.gouv.culture.sdx.utils.Describable
getDescription, setDescription
 
Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable
getEncoding, setEncoding
 
Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable
getLocale, getXmlLang, setLocale, setXmlLang
 

Constructor Detail

ExactFieldQuery

public ExactFieldQuery()
Creates a query

A super.getLog() must be set and then this query must be setUp.

See Also:
AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger), setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, java.lang.String, java.lang.String)
Method Detail

setUp

public void setUp(SearchLocations sLocs,
                  java.lang.String fieldName,
                  java.lang.String q)
           throws SDXException
Builds an exact field query.

Parameters:
sLocs - The SearchLocationsindex to be searched.
fieldName - The field to search (if null or non existant, the default field will be searched).
q - The query string.
Throws:
SDXException

toSAX

public void toSAX(org.xml.sax.ContentHandler hdl)
           throws org.xml.sax.SAXException
Formats a query in XML.

Specified by:
toSAX in interface org.apache.excalibur.xml.sax.XMLizable
Specified by:
toSAX in class AbstractQuery
Parameters:
hdl - A content handler to receive XML data.
Throws:
org.xml.sax.SAXException


Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.