public class Results extends AbstractResponse implements Results
SdxObject.ConfigurationNode_count, _hitsPerPage, _nbPages, _searchLocations, HITS_PER_PAGE, HPP_ALL_HITS_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedCLASS_NAME_SUFFIXDEFAULT_ENCODING| Constructor and Description |
|---|
Results()
Creates a Results object
A super.getLog() must be set and then this object must be setUp.
|
Results(Results results) |
| Modifier and Type | Method and Description |
|---|---|
int |
count()
Returns the number of results.
|
int |
countPages()
Counts and returns the number of pages for these results.
|
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output
|
java.lang.String[] |
getDocIds()
Returns the document id for each document of the result set.
|
TermHighlighter |
getHighliter() |
org.apache.lucene.search.Hits |
getHits()
Retourne tous les resultats sous la forme d'un element DOM.
|
float |
getMaxScore()
Returns the score of the first document, which is always the highest score.
|
void |
getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
int docNo)
Returns a representation XML of information on the preceding and following documents.
|
void |
getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
java.lang.String id)
Returns a representation XML of information on the preceding and following documents.
|
Query |
getQuery()
Returns the search acceptRequest which created these results.
|
void |
getQueryAsSAX(org.xml.sax.ContentHandler hdl)
Returns an XML representation of the Query.
|
void |
reSort(SortSpecification sorts)
Resorts the results with a sort specification.
|
void |
setAllHits()
Indicates that all the results should be returned .
|
void |
setHighliter(TermHighlighter hliter) |
void |
setHitsPerPage(int nb)
Set the number of hits per page.
|
void |
setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
Query query)
Builds the results of a acceptRequest from the Lucene results.
|
void |
setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
SortSpecification sorts,
Query query)
Builds the results of a acceptRequest from the Lucene results and a sort specification.
|
void |
toSAX(org.xml.sax.ContentHandler hdl)
Returns an XML representation of the results.
|
void |
toSAX(org.xml.sax.ContentHandler hdl,
boolean getDocuments)
Returns an XML representation of the results.
|
void |
toSAX(org.xml.sax.ContentHandler hdl,
int pageNo)
Returns an XML representation of the results.
|
void |
toSAX(org.xml.sax.ContentHandler hdl,
int pageNo,
boolean getDocuments)
Returns an XML representation of the results.
|
getHitsPerPage, getNbPages, getSearchLocations, initToSax, initVolatileObjectsToSax, setNbPages, setSearchLocationsconfigure, 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 Results()
A super.getLog() must be set and then this object must be setUp.
public Results(Results results) throws SDXException, java.io.IOException
SDXExceptionjava.io.IOExceptionpublic void setUp(SearchLocations sLocs, org.apache.lucene.search.Hits searchHits, SortSpecification sorts, Query query) throws SDXException, java.io.IOException
sLocs - The SearchLocations object (indices searched).searchHits - Les resultats Lucene.sorts - Les specifications de tri.query - La requete qui a permis d'obtenir ces resultats.SDXExceptionjava.io.IOExceptionpublic void setUp(SearchLocations sLocs, org.apache.lucene.search.Hits searchHits, Query query) throws SDXException
sLocs - The SearchLocations object (indices searched).searchHits - Les résultats Lucene.query - La requete qui a permis d'obtenir ces resultats.SDXExceptionpublic org.apache.lucene.search.Hits getHits()
factory - Le document servant de manufacture.public void toSAX(org.xml.sax.ContentHandler hdl)
throws org.xml.sax.SAXException
toSAX in interface org.apache.excalibur.xml.sax.XMLizabletoSAX in class AbstractSdxObjecthdl - The ContentHandler to feed with events.org.xml.sax.SAXExceptionpublic void toSAX(org.xml.sax.ContentHandler hdl,
boolean getDocuments)
throws SDXException,
java.lang.Exception
hdl - The ContentHandler to feed with events.getDocuments - Indicates if the actual complete documents should be returnedSDXExceptionjava.lang.Exceptionpublic void toSAX(org.xml.sax.ContentHandler hdl,
int pageNo)
throws SDXException,
java.lang.Exception
hdl - The ContentHandler to feed with events.pageNo - The page number of the desired results.SDXExceptionjava.lang.Exceptionpublic void toSAX(org.xml.sax.ContentHandler hdl,
int pageNo,
boolean getDocuments)
throws SDXException,
org.xml.sax.SAXException
hdl - The ContentHandler to feed with events.pageNo - The requested page number of the desired results. Reaffected when number of results doesn't fit.getDocuments - Indicates if the actual complete documents should be returnedSDXExceptionorg.xml.sax.SAXExceptionpublic int countPages()
countPages in class AbstractResponsepublic void setAllHits()
setAllHits in class AbstractResponsepublic void setHitsPerPage(int nb)
setHitsPerPage in class AbstractResponsenb - The number of hits.public void getQueryAsSAX(org.xml.sax.ContentHandler hdl)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
hdl - The ContentHandler to feed with events.SDXExceptionorg.xml.sax.SAXExceptionorg.apache.cocoon.ProcessingExceptionpublic java.lang.String[] getDocIds()
throws SDXException,
java.io.IOException
SDXExceptionjava.io.IOExceptionpublic Query getQuery()
public void getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
int docNo)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException,
java.io.IOException
docNo - The 1-based index of the document in the sorted resultshdl - The ContentHandler which will receive the eventsSDXExceptionorg.xml.sax.SAXExceptionorg.apache.cocoon.ProcessingExceptionjava.io.IOExceptionpublic void getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
java.lang.String id)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException,
java.io.IOException
hdl - The ContentHandler which will receive the eventsid - The id of the documentSDXExceptionorg.xml.sax.SAXExceptionorg.apache.cocoon.ProcessingExceptionjava.io.IOExceptionpublic void reSort(SortSpecification sorts) throws java.io.IOException, SDXException
sorts - The sort specification.java.io.IOExceptionSDXExceptionpublic int count()
count in class AbstractResponsepublic float getMaxScore()
public TermHighlighter getHighliter()
public void setHighliter(TermHighlighter hliter)
protected java.lang.String getClassNameSuffix()
AbstractSdxObjectgetClassNameSuffix in class AbstractSdxObjectCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.