|
|||||||||
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.ResultDocument
public class ResultDocument
A result document of a search.
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 | |
---|---|
ResultDocument()
Creates a ResultDocument 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 |
org.apache.lucene.document.Document |
getDocument()
Returns the Lucene document associated with this result. |
java.lang.String |
getFieldValue(java.lang.String field)
Returns the value of a field within this document. |
float |
getScore()
Returns the relavance ranking for this document. |
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 |
setUp(org.apache.lucene.document.Document doc,
float score)
Builds a ResultDocument with a Lucene document and a relavance ranking. |
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 |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
---|
enableLogging |
Field Detail |
---|
public static final java.lang.String CLASS_NAME_SUFFIX
Constructor Detail |
---|
public ResultDocument()
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.document.Document, float)
Method Detail |
---|
public void setUp(org.apache.lucene.document.Document doc, float score) throws SDXException
doc
- The Lucene documentscore
- The relavance ranking
SDXException
public java.lang.String getFieldValue(java.lang.String field)
null
,
it will turn over a null
String
if the field does not exist.
field
- The name of the field.public float getScore()
public org.apache.lucene.document.Document getDocument()
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 |