com.clusterpoint.api.response
Class CPSSearchResponse

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by com.clusterpoint.api.CPSResponse
          extended by com.clusterpoint.api.response.CPSSearchResponse
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

public class CPSSearchResponse
extends CPSResponse

The CPSSearchResponse class is a wrapper for the CPSResponse class

See Also:
CPSSearchRequest

Constructor Summary
CPSSearchResponse(CPSConnection conn, java.lang.String respXML)
           
 
Method Summary
 java.util.List<org.w3c.dom.Element> getDocuments()
          Returns the documents from the response as List of documents represented as DOM Element objecs
 java.util.List<CPSSearchFacet> getFacets()
          Returns the facets from the response in a form of List where each element is of class CPSSearchFacet
 int getFound()
          Returns the number of documents returned
 int getFrom()
          Returns the position of the first document that was returned
 int getHits()
          Returns the total number of hits - i.e. the number of documents in a storage that match the request
 int getTo()
          Returns the position of the last document that was returned
 
Methods inherited from class com.clusterpoint.api.CPSResponse
characters, endElement, endPrefixMapping, getCommand, getConnection, getSeconds, getStorage, setDocumentLocator, startElement, startPrefixMapping
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPSSearchResponse

public CPSSearchResponse(CPSConnection conn,
                         java.lang.String respXML)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getDocuments

public java.util.List<org.w3c.dom.Element> getDocuments()
Returns the documents from the response as List of documents represented as DOM Element objecs

Returns:
List

getFacets

public java.util.List<CPSSearchFacet> getFacets()
Returns the facets from the response in a form of List where each element is of class CPSSearchFacet

Returns:
List

getFound

public int getFound()
Returns the number of documents returned

Returns:
int

getHits

public int getHits()
Returns the total number of hits - i.e. the number of documents in a storage that match the request

Returns:
int

getFrom

public int getFrom()
Returns the position of the first document that was returned

Returns:
int
See Also:
CPSSearchRequest.setOffset(int), CPSSearchRequest.setDocs(int)

getTo

public int getTo()
Returns the position of the last document that was returned

Returns:
int
See Also:
CPSSearchRequest.setOffset(int), CPSSearchRequest.setDocs(int)