|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.search.routing.command.SearchXMLObject atg.search.routing.command.SearchEngineCommandResponse atg.search.routing.command.search.SearchResponse atg.search.routing.command.search.SearchResultsResponse
public abstract class SearchResultsResponse
A SearchEngineCommandResponse
that also provides search result specific information. The response for
search-type commands (i.e. QueryRequest, SimilarDocsRequest or StructureQueryRequest) should sub-type this class so
that callers can polymorphically process the search response results.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.search.routing.command.search.SearchResponse |
---|
mMultiPartitionSearch |
Constructor Summary | |
---|---|
protected |
SearchResultsResponse()
|
protected |
SearchResultsResponse(atg.search.routing.command.SearchEngineResponse response)
|
Method Summary | |
---|---|
void |
addResult(Result pResult)
Adds a result to the existing list. |
void |
addResults(java.util.Collection<Result> pResults)
Adds every element in the list to the existing list of results. |
boolean |
equals(java.lang.Object pObject)
|
abstract int |
getGroupCount()
Returns the total number of answer groups in the results, regardless of paging. |
java.util.List<AnswerGroup> |
getGroups()
Returns the list of answer groups. |
boolean |
getHasMoreResults()
Returns true if there are more results for fast paging. |
int |
getMinScore()
Returns the minimum score |
int |
getPageNum()
Returns the zero-based page number of this response |
atg.search.routing.command.search.PageOffsetInfo |
getPageOffsetInfo()
If the response is the result of a merge, this holds the last response index per partition |
int |
getPageSize()
Returns the page size |
java.util.List<Result> |
getResults()
These are the results. |
java.util.List<java.util.List<Result>> |
getResultsWithGrouping()
These are the same results available via getResults() , but they are returned grouped into one List per
answer group (as defined by Result.getAnswerGroup() . |
java.util.List<SpellingTerm> |
getSpellingTerms()
Returns a list of spelling terms |
java.util.List<SuggestedCategory> |
getSuggestedCategories()
Returns the List of SuggestedCategory objects |
int |
hashCode()
|
void |
setMinScore(int pMinScore)
Sets the minimum score |
void |
setPageNum(int pPageNum)
Sets the zero-based page number of this response |
void |
setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pageOffsetInfo)
Sets the page offset info |
void |
setPageSize(int pPageSize)
Sets the page size |
void |
setResults(java.util.List<Result> pResults)
Sets the list of Result s. |
void |
setSpellingTerms(java.util.List<SpellingTerm> spellingTerms)
Sets the list of spelling terms |
void |
setSuggestedCategories(java.util.List<SuggestedCategory> suggestedCategories)
Sets the list of suggested categories |
Methods inherited from class atg.search.routing.command.SearchEngineCommandResponse |
---|
getNextResponse, getNonSAXParser, getRequestTag, getSearchEngineResponse, parseResponse, setNextResponse, setSearchEngineResponse |
Methods inherited from class atg.search.routing.command.SearchXMLObject |
---|
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getAttributeXML, getBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toXML, toXML |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
protected SearchResultsResponse()
protected SearchResultsResponse(atg.search.routing.command.SearchEngineResponse response)
Method Detail |
---|
public boolean equals(java.lang.Object pObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public abstract int getGroupCount()
SimilarDocsRequest
, this is simply the number of
results.
getGroupCount
in interface PagedResponse
public java.util.List<Result> getResults()
Result
s. See getResultsWithGrouping()
if you want the individual Results grouped by answer groups.
Result
s.public java.util.List<AnswerGroup> getGroups()
getResults()
. This is not a
'live' list of groups (or results). That is, changes to this list will not be reflected in the flat list of
results. However, changes to the flat list will be reflected in the list. And changes to individual Results will
be reflected in the flat list.
AnswerGroup
spublic java.util.List<java.util.List<Result>> getResultsWithGrouping()
getResults()
, but they are returned grouped into one List per
answer group (as defined by Result.getAnswerGroup()
. Thus the return
value is a List of Lists, where each sub-List corresponds to a specific answer group.
Result
s.public boolean getHasMoreResults()
getHasMoreResults
in interface PagedResponse
public void setResults(java.util.List<Result> pResults)
Result
s.
pResults
- the resultspublic void addResult(Result pResult)
pResult
- a resultpublic void addResults(java.util.Collection<Result> pResults)
pResults
- list of resultspublic int getMinScore()
public void setMinScore(int pMinScore)
pMinScore
- the minimum scorepublic int getPageNum()
PagedResponse
getPageNum
in interface PagedResponse
public void setPageNum(int pPageNum)
PagedResponse
setPageNum
in interface PagedResponse
public int getPageSize()
PagedResponse
getPageSize
in interface PagedResponse
public void setPageSize(int pPageSize)
PagedResponse
setPageSize
in interface PagedResponse
public atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
PagedResponse
getPageOffsetInfo
in interface PagedResponse
public void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pageOffsetInfo)
PagedResponse
setPageOffsetInfo
in interface PagedResponse
pageOffsetInfo
- page offset informationpublic java.util.List<SpellingTerm> getSpellingTerms()
SpellingTerm
public void setSpellingTerms(java.util.List<SpellingTerm> spellingTerms)
spellingTerms
- list of spelling termspublic java.util.List<SuggestedCategory> getSuggestedCategories()
SuggestedCategory
objects
SuggestedCategory
objectspublic void setSuggestedCategories(java.util.List<SuggestedCategory> suggestedCategories)
suggestedCategories
- the list of suggested categories
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |