public class ResultDocuments extends AbstractSdxObject
SdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_NAME_SUFFIX |
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedDEFAULT_ENCODING| Constructor and Description |
|---|
ResultDocuments()
Creates a ResultDocuments object
A super.getLog() must be set and then this object must be setUp.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output
|
ResultDocument |
getDocument(int i)
Returns a document according to its index in the list.
|
ResultDocument[] |
getDocuments()
Returns all of the result documents.
|
int |
getLength()
Returns the number of results.
|
float |
getMaxScore()
Returns the relevance ranking of the first document; therefore, the highest ranking is returned.
|
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 |
setSortedResults(ResultDocument[] sr)
Sets the sorted results.
|
void |
setUp(org.apache.lucene.search.Hits h)
Builds a list of result documents from Lucene results.
|
void |
setUp(ResultDocument[] sr)
Builds a list of result documents from an array or sorted ResultDocuments.
|
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResourcespublic static final java.lang.String CLASS_NAME_SUFFIX
public ResultDocuments()
A super.getLog() must be set and then this object must be setUp.
public void setUp(org.apache.lucene.search.Hits h)
h - The Lucene results.public void setUp(ResultDocument[] sr)
sr - The sorted results.public void setSortedResults(ResultDocument[] sr)
sr - The sorted results.public int getLength()
public float getMaxScore()
throws SDXException,
java.io.IOException
SDXExceptionjava.io.IOExceptionpublic ResultDocument getDocument(int i) throws SDXException
i - The index of the desired document.SDXExceptionpublic ResultDocument[] getDocuments() throws SDXException
SDXExceptionprotected 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.