|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gouv.culture.sdx.utils.AbstractSdxObject fr.gouv.culture.sdx.search.lucene.query.ResultDocuments
public class ResultDocuments
The documents which form an ordered list of search results. This class allows one to manage the sorting effectively, because only the requests which require a sorting other than the relevance are actually sorted.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
---|
SdxObject.ConfigurationNode |
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME_SUFFIX
|
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.utils.Encodable |
---|
DEFAULT_ENCODING |
Constructor Summary | |
---|---|
ResultDocuments()
Creates a ResultDocuments object A super.getLog() must be set and then this object must be setUp. |
Method Summary | |
---|---|
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. |
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, toSAX, verifyConfigurationResources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_NAME_SUFFIX
Constructor Detail |
---|
public ResultDocuments()
A super.getLog() must be set and then this object must be setUp.
AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(org.apache.lucene.search.Hits)
Method Detail |
---|
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
SDXException
java.io.IOException
public ResultDocument getDocument(int i) throws SDXException
i
- The index of the desired document.
SDXException
public ResultDocument[] getDocuments() throws SDXException
SDXException
protected java.lang.String getClassNameSuffix()
AbstractSdxObject
getClassNameSuffix
in class AbstractSdxObject
protected boolean initToSax()
AbstractSdxObject
initToSax
in class AbstractSdxObject
protected void initVolatileObjectsToSax()
initVolatileObjectsToSax
in class AbstractSdxObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |