public class SearchLocations extends AbstractSdxObject implements SearchLocations
SdxObject.ConfigurationNode_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedCLASS_NAME_SUFFIXDEFAULT_ENCODING| Constructor and Description |
|---|
SearchLocations()
Builds an empty search location.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.index.IndexReader |
_getReader()
Deprecated.
|
org.apache.lucene.index.IndexReader |
_getReader(int idx)
Deprecated.
Returns an index reader at the specified index.
|
org.apache.lucene.search.Searcher |
_getSearcher()
Returns a searcher for these locations.
|
org.apache.lucene.search.Searcher |
_getSearcher(int idx)
Returns an searcher for the specified index.
|
void |
addDocumentBase(DocumentBase db)
Add a documentBase to the search location
It mean it add all documentBase indexes
|
void |
addIndex(Index index)
Deprecated.
Adds an index to locations.
|
boolean |
contains(DocumentBase db) |
boolean |
contains(Index index) |
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output
|
Field |
getDefaultField()
Returns the default field for the first search location (first index).
|
java.util.Vector |
getDocumentBases()
Returns the document bases sets up in the SearchLocations
|
java.util.HashSet |
getDocumentBasesNames()
Returns the documents bases names sets up in the SearchLocations
|
Field |
getField(java.lang.String name)
Returns a field given a name.
|
int |
getFieldType(java.lang.String name)
Returns the type of a field given its name.
|
DocumentBase |
getFirstDocumentBase()
Returns the first document bases sets up in the SearchLocations.
|
java.util.Locale |
getLocale(java.lang.String name)
Returns the locale for a field given its name.
|
QueryParser |
getQueryParser() |
org.apache.lucene.index.IndexReader |
getReader() |
org.apache.lucene.index.IndexReader |
getReader(int idb)
Returns an index reader at the specified documentBase.
|
org.apache.lucene.search.Searcher |
getSearcher()
Returns a searcher for these locations.
|
org.apache.lucene.search.Searcher |
getSearcher(int idb)
Returns an searcher for the specified documentBase.
|
java.lang.String |
getTypeName(java.lang.String name)
Returns the typeName of a field given its name.
|
protected boolean |
initToSax()
Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
|
protected void |
initVolatileObjectsToSax()
Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML
Some objects need to be refresh each time a toSAX is called
|
void |
setQueryParser(QueryParser qParser) |
void |
setUp(DocumentBase db)
Builds a search location with a single documentbase.
|
void |
setUp(Index index)
Deprecated.
Builds a search location with a single index.
|
int |
size()
Returns the number of document bases in this search location.
|
void |
toSAX(org.xml.sax.ContentHandler hdl) |
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResourcesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, setIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangpublic SearchLocations()
public void setUp(Index index)
index - The Lucene index to use.public void setUp(DocumentBase db)
db - The documentBase to use.public void addIndex(Index index)
index - The index to add.public void addDocumentBase(DocumentBase db)
public Field getDefaultField() throws SDXException
SDXExceptionpublic DocumentBase getFirstDocumentBase()
DocumentBase The first document base or the only document base.
May be null if the SearchLocations does not contain any document base.public Field getField(java.lang.String name) throws SDXException
null if none found.name - The name of the field for which the Field is desired.SDXExceptionpublic int getFieldType(java.lang.String name)
throws SDXException
name - The field name.SDXExceptionpublic java.lang.String getTypeName(java.lang.String name)
throws SDXException
name - The field name.SDXExceptionpublic java.util.Vector getDocumentBases()
public java.util.HashSet getDocumentBasesNames()
public int size()
public boolean contains(DocumentBase db)
public boolean contains(Index index)
public java.util.Locale getLocale(java.lang.String name)
throws SDXException
name - The name of the field for which the Locale is desired.SDXExceptionpublic org.apache.lucene.index.IndexReader _getReader(int idx)
throws SDXException
idx - The documentBase of the desired reader.SDXExceptionpublic org.apache.lucene.index.IndexReader _getReader()
throws SDXException
SDXExceptionpublic org.apache.lucene.index.IndexReader getReader(int idb)
throws SDXException
idb - The documentBase of the desired reader.SDXExceptionpublic org.apache.lucene.index.IndexReader getReader()
throws SDXException
SDXExceptionpublic org.apache.lucene.search.Searcher _getSearcher(int idx)
throws SDXException
idx - The index of the desired searcher.SDXExceptionpublic org.apache.lucene.search.Searcher _getSearcher()
throws SDXException
SDXExceptionpublic org.apache.lucene.search.Searcher getSearcher(int idb)
throws SDXException
idb - The documentBase of the desired searcher.SDXExceptionpublic org.apache.lucene.search.Searcher getSearcher()
throws SDXException
SDXExceptionpublic QueryParser getQueryParser()
public void setQueryParser(QueryParser qParser)
public void toSAX(org.xml.sax.ContentHandler hdl)
throws org.xml.sax.SAXException
toSAX in interface org.apache.excalibur.xml.sax.XMLizabletoSAX in class AbstractSdxObjectorg.xml.sax.SAXExceptionprotected java.lang.String getClassNameSuffix()
AbstractSdxObjectgetClassNameSuffix in class AbstractSdxObjectprotected boolean initToSax()
AbstractSdxObjectinitToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxObjectCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.