atg.search.routing.command.search
Class BrowseRequest.Response

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.SearchEngineCommandResponse
          extended by atg.search.routing.command.search.SearchResponse
              extended by atg.search.routing.command.search.BrowseRequest.Response
All Implemented Interfaces:
PagedResponse, java.io.Serializable
Enclosing class:
BrowseRequest

public static class BrowseRequest.Response
extends SearchResponse
implements PagedResponse

Response type for BrowseRequest

See Also:
Serialized Form

Field Summary
 
Fields inherited from class atg.search.routing.command.search.SearchResponse
CLASS_VERSION, mMultiPartitionSearch
 
Fields inherited from interface atg.search.routing.command.search.PagedResponse
CLASS_VERSION
 
Constructor Summary
BrowseRequest.Response()
          default constructor for small response in reporting.
BrowseRequest.Response(BrowseRequest pRequest, java.util.List<SearchResponse> pParsedResponses)
          This invokes local merge instead of the engine's merge.
BrowseRequest.Response(atg.search.routing.command.SearchEngineResponse response)
          Parses a singe search engine response
 
Method Summary
 boolean equals(java.lang.Object pObject)
          Returns true if the response values are the same.
 BrowseRequest.AncestryType getAncestry()
          Returns the ancestry type of the browsed document set
protected  void getAttributeXML(java.lang.StringBuilder buf)
          This generates attribute xml.
protected  void getBodyXML(java.lang.StringBuilder buf)
          Override to provide the body of the xml.
 Category getCategory()
          Returns the result of the request, a browsed category
 java.lang.String getConstrainDocCounts()
          Returns Maximum total size of document set that can have its constraint-based size computed.
 java.lang.String getContentId()
          Returns the content ID of the index partition
 Diagnostics getDiagnostics()
          Search diagnostic and trace output
 int getDocDepth()
          Deprecated. in 9.1
 atg.search.routing.command.search.DocSort getDocSort()
          Returns the secondary sorting type
 atg.search.routing.command.search.DocSortOrder getDocSortOrder()
          Returns the sort order of the result groups
 java.lang.String getDocSortPred()
          If getDocSort() is DocSort.PREDICATE, returns the predicate expression to use for sorting
 java.lang.String getDocSortProp()
          If getDocSort() is DocSort.STRPROP or DocSort.NUMPROP, the name of the property to use for sorting
 java.lang.String getDocSortPropDefault()
          If getDocSort() is DocSort.STRPROP or DocSort.NUMPROP, returns the default value for the property.
 DocSortPropVal getDocSortPropVal()
          Returns the doc sort prop val.
 DocumentSetConstraint getDocumentSets()
          Returns document constraint expression
 int getGroupCount()
          Returns the number of answer groups before paging.
 boolean getHasMoreResults()
          Returns true if there are more results for fast paging.
 int getMaxDepth()
          Returns the maximum depth to browse from starting document set.
 int getMaxDescendentSets()
          Deprecated. in 9.1
 int getMaxDocs()
          Deprecated. in 9.1
 int getMaxDocsPerSet()
          Deprecated. in 9.1
 int getMaxSets()
          Deprecated. in 9.1
 int getMaxSize()
          Deprecated. in 9.1
 java.lang.String getMergeSettings()
          Returns the result list controls for merge in a big string of the form paramVal,paramVal,...
 int getMinSize()
          Deprecated. in 9.1.
 int getPageNum()
          Returns the zero-based page number
 atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
          When fast paging is used, and ff the response is the result of a merge, this holds the last response index per partition, in the form contentID:offset;contentID:offset;...
 int getPageSize()
          Returns number of index items per page.
 java.lang.String getParent()
          Returns the parent of input document set
 java.util.List<ProcessedResponse> getProcessedPartitionResponses()
          Gets the processed the engine responses from individual partitions.
 BrowseRequest.RecurseDocumentsType getRecurseDocuments()
          Returns whether returned documents can be from descendents of a returned set
 java.lang.String getRefineConfig()
          Returns the refinement config name
 java.lang.String getRefineDebug()
          Returns whether refine debugging is enabled
 int getRefineMax()
          Returns the maximum number of refinements
 int getRefineMin()
          Returns minimum size of a refinement (in terms of values)
 int getRefineMinVal()
          Returns minimum number of refinement values
 int getRefineTop()
          Returns number of values to return per refinement
 java.lang.String getRequestTag()
          Gets the xml element tag used in the request
 java.lang.String getResponseNumberSettings()
          Returns the result list controls in a big string of the form paramVal,paramVal,...
 BrowseRequest.SetSort getSetSort()
          Returns descendent document set sort order
 BrowseRequest.Sorting getSorting()
          Returns the sorting (grouping) that was used
 java.lang.String getSortProp()
          Returns the sort property that was used.
 java.lang.String getStartCategory()
          Returns the starting category (document set) used in the request
 int hashCode()
           
 boolean isDocSortCase()
          Returns the doc sort case indicator
protected  void merge(SearchRequest pSearchRequest, java.util.List<SearchResponse> pParsedResponses)
          This is Java merge.
 void setAncestry(BrowseRequest.AncestryType ancestry)
          Sets the ancestry
 void setCategory(Category category)
          Sets the category
 void setConstrainDocCounts(java.lang.String constrainDocCounts)
          Sets the constrainDocCounts
 void setContentId(java.lang.String contentId)
          Sets the content ID for index partition
 void setDiagnostics(Diagnostics pDiagnostics)
          Sets Search diagnostic and trace output
 void setDocSort(atg.search.routing.command.search.DocSort docSort)
          Sets the type of secondary sorting
 void setDocSortCase(boolean pDocSortCase)
          Sets the doc sort case indicator
 void setDocSortOrder(atg.search.routing.command.search.DocSortOrder docSortOrder)
          Sets the sort order of the answer groups
 void setDocSortPred(java.lang.String docSortPred)
          Sets the predicate
 void setDocSortProp(java.lang.String docSortProp)
          Sets the name of the property to use for searching
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          Sets the docSortPropDefault
 void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
          Sets doc sort prop val
 void setDocumentSets(DocumentSetConstraint documentSets)
          Sets document constraint expression
 void setMaxDepth(int maxDepth)
          Sets maximum depth to browse from starting document set.
 void setMergeSettings(java.lang.String pMergeSettings)
          Sets the result list controls for merge in a big string of the form paramVal,paramVal,...
 void setPageNum(int pageNum)
          Sets zero-based page number
 void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pageOffsetInfo)
          Sets page offset info
 void setPageSize(int pageSize)
          Number of index items per page.
 void setParent(java.lang.String parent)
          Sets parent of input document set
 void setRecurseDocuments(BrowseRequest.RecurseDocumentsType recurseDocuments)
          Indicates whether returned documents can be from descendents of a returned set
 void setRefineConfig(java.lang.String pRefineConfig)
          Sets the refinement config name
 void setRefineDebug(java.lang.String pRefineDebug)
          Sets refine debugging
 void setRefineMax(int refineMax)
          Sets refine max
 void setRefineMin(int refineMin)
          Sets the minimum size of a refinement (in terms of values)
 void setRefineMinVal(int refineMinVal)
          Sets the minimum number of refinement values
 void setRefineTop(int refineTop)
          Sets the number of values to return per refinement
 void setResponseNumberSettings(java.lang.String responseNumSettings)
          Sets the result list controls in a big string of the form paramVal,paramVal,...
 void setSetSort(BrowseRequest.SetSort setSort)
          Sets Descendent document set sort order
 void setSorting(BrowseRequest.Sorting sorting)
          Sets sorting
 void setSortProp(java.lang.String sortProp)
          Sets the sort property that was used
 void setStartCategory(java.lang.String startingCategory)
          Sets the start category used in the request
 
Methods inherited from class atg.search.routing.command.search.SearchResponse
addError, getBuildTimeMs, getErrors, getListableProperties, getMergeTimeMs, getParseTimeMs, getPartitionResponses, getRequestChainToken, getRequestIdentifier, getRequestTime, getSearchTargetNames, getTotalResponseTimeMs, getXmlString, handleMerge, isAllowListProperties, isLocalMergeEnabled, isMultiPartitionSearch, isOverloaded, isTimedOut, setAllowListProperties, setBuildTimeMs, setErrors, setListableProperties, setLocalMergeEnabled, setMergeTimeMs, setMultiPartitionSearch, setParseTimeMs, setPartitionResponses, setRequestChainToken, setRequestIdentifier, setRequestTime, setSearchTargetNames, setTotalResponseTimeMs, toString
 
Methods inherited from class atg.search.routing.command.SearchEngineCommandResponse
getNextResponse, getNonSAXParser, 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, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrowseRequest.Response

public BrowseRequest.Response(BrowseRequest pRequest,
                              java.util.List<SearchResponse> pParsedResponses)
                       throws atg.search.routing.MergeException
This invokes local merge instead of the engine's merge. Invocation of this constructor results in a single merged Response. See merge(SearchRequest, java.util.List).

Parameters:
pRequest - original request
pParsedResponses - parsed responses
Throws:
atg.search.routing.MergeException

BrowseRequest.Response

public BrowseRequest.Response(atg.search.routing.command.SearchEngineResponse response)
Parses a singe search engine response

Parameters:
response - from an engine

BrowseRequest.Response

public BrowseRequest.Response()
default constructor for small response in reporting.

Method Detail

equals

public boolean equals(java.lang.Object pObject)
Returns true if the response values are the same. Certain properties, such as response time, id, etc. are not compared.

Overrides:
equals in class java.lang.Object
Parameters:
pObject - another BrowseRequest.Response
Returns:
true if the responses have the same values

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getRequestTag

public java.lang.String getRequestTag()
Gets the xml element tag used in the request

Overrides:
getRequestTag in class atg.search.routing.command.SearchEngineCommandResponse
Returns:
xml element tag

merge

protected void merge(SearchRequest pSearchRequest,
                     java.util.List<SearchResponse> pParsedResponses)
              throws atg.search.routing.MergeException
This is Java merge.

Specified by:
merge in class SearchResponse
Parameters:
pSearchRequest - the original request
pParsedResponses - pre-parsed responses
Throws:
atg.search.routing.MergeException - if the merge fails

getProcessedPartitionResponses

public java.util.List<ProcessedResponse> getProcessedPartitionResponses()
Gets the processed the engine responses from individual partitions. This is only for multi-partition results. This is a costly operation, and is made available primarily for debugging purposes. The original engine responses are normally not available due to the storage overhead. To enable their storage, call SearchEngineRequest.setKeepingResponseData(boolean) with true.

Returns:
List of BrowseRequest.Response, possibly empty but never null.

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder buf)
                        throws atg.search.routing.command.IncompleteCommandException
This generates attribute xml.

Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException - if required values are missing

getBodyXML

protected void getBodyXML(java.lang.StringBuilder buf)
                   throws atg.search.routing.command.IncompleteCommandException
Override to provide the body of the xml. Do not include the main element tag.

Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Parameters:
buf - shared buffer
Throws:
atg.search.routing.command.IncompleteCommandException

getDiagnostics

public Diagnostics getDiagnostics()
Search diagnostic and trace output

Returns:
Search diagnostic and trace output

setDiagnostics

public void setDiagnostics(Diagnostics pDiagnostics)
Sets Search diagnostic and trace output

Parameters:
pDiagnostics - Search diagnostic and trace output

getCategory

public Category getCategory()
Returns the result of the request, a browsed category

Returns:
The result of the request, a browsed category

setCategory

public void setCategory(Category category)
Sets the category

Parameters:
category -

getSorting

public BrowseRequest.Sorting getSorting()
Returns the sorting (grouping) that was used

Returns:
sorting

setSorting

public void setSorting(BrowseRequest.Sorting sorting)
Sets sorting

Parameters:
sorting -

getSortProp

public java.lang.String getSortProp()
Returns the sort property that was used.

Returns:
sort property

setSortProp

public void setSortProp(java.lang.String sortProp)
Sets the sort property that was used

Parameters:
sortProp -

getContentId

public java.lang.String getContentId()
Returns the content ID of the index partition

Overrides:
getContentId in class SearchResponse
Returns:
content ID of the index partition

setContentId

public void setContentId(java.lang.String contentId)
Sets the content ID for index partition

Parameters:
contentId - content ID for index partition

getAncestry

public BrowseRequest.AncestryType getAncestry()
Returns the ancestry type of the browsed document set

Returns:
ancestry type

setAncestry

public void setAncestry(BrowseRequest.AncestryType ancestry)
Sets the ancestry

Parameters:
ancestry -

getMaxDepth

public int getMaxDepth()
Returns the maximum depth to browse from starting document set. 0 means infinite.

Returns:
Maximum depth to browse from starting document set. 0 means infinite.

setMaxDepth

public void setMaxDepth(int maxDepth)
Sets maximum depth to browse from starting document set. 0 means infinite.

Parameters:
maxDepth -

getMaxSets

public int getMaxSets()
Deprecated. in 9.1


getMaxSize

public int getMaxSize()
Deprecated. in 9.1


getMinSize

public int getMinSize()
Deprecated. in 9.1.


isDocSortCase

public boolean isDocSortCase()
Returns the doc sort case indicator

Returns:
docSortCase

setDocSortCase

public void setDocSortCase(boolean pDocSortCase)
Sets the doc sort case indicator

Parameters:
pDocSortCase - docSortCase

getMaxDescendentSets

public int getMaxDescendentSets()
Deprecated. in 9.1


getMaxDocs

public int getMaxDocs()
Deprecated. in 9.1


getMaxDocsPerSet

public int getMaxDocsPerSet()
Deprecated. in 9.1


getDocDepth

public int getDocDepth()
Deprecated. in 9.1


getConstrainDocCounts

public java.lang.String getConstrainDocCounts()
Returns Maximum total size of document set that can have its constraint-based size computed. A value of true means 100,000 and a value of false means 0.

Returns:
Maximum total size of document set that can have its constraint-based size computed.

setConstrainDocCounts

public void setConstrainDocCounts(java.lang.String constrainDocCounts)
Sets the constrainDocCounts

Parameters:
constrainDocCounts -

getSetSort

public BrowseRequest.SetSort getSetSort()
Returns descendent document set sort order

Returns:
Descendent document set sort order

setSetSort

public void setSetSort(BrowseRequest.SetSort setSort)
Sets Descendent document set sort order

Parameters:
setSort - Descendent document set sort order

getRecurseDocuments

public BrowseRequest.RecurseDocumentsType getRecurseDocuments()
Returns whether returned documents can be from descendents of a returned set

Returns:
Whether returned documents can be from descendents of a returned set

setRecurseDocuments

public void setRecurseDocuments(BrowseRequest.RecurseDocumentsType recurseDocuments)
Indicates whether returned documents can be from descendents of a returned set

Parameters:
recurseDocuments - Whether returned documents can be from descendents of a returned set

setResponseNumberSettings

public void setResponseNumberSettings(java.lang.String responseNumSettings)
Sets the result list controls in a big string of the form paramVal,paramVal,...

Parameters:
responseNumSettings - holds the result list controls in a big string of the form paramVal,paramVal,...

getResponseNumberSettings

public java.lang.String getResponseNumberSettings()
Returns the result list controls in a big string of the form paramVal,paramVal,...

Returns:
the result list controls in a big string of the form paramVal,paramVal,...

setMergeSettings

public void setMergeSettings(java.lang.String pMergeSettings)
Sets the result list controls for merge in a big string of the form paramVal,paramVal,...

Parameters:
pMergeSettings - holds the result list controls for merge in a big string of the form paramVal,paramVal,...

getMergeSettings

public java.lang.String getMergeSettings()
Returns the result list controls for merge in a big string of the form paramVal,paramVal,...

Returns:
the result list controls for merge in a big string of the form paramVal,paramVal,...

getParent

public java.lang.String getParent()
Returns the parent of input document set

Returns:
Parent of input document set

setParent

public void setParent(java.lang.String parent)
Sets parent of input document set

Parameters:
parent - the parent

getRefineConfig

public java.lang.String getRefineConfig()
Returns the refinement config name

Returns:
refine config name

setRefineConfig

public void setRefineConfig(java.lang.String pRefineConfig)
Sets the refinement config name

Parameters:
pRefineConfig - refinement config name

getRefineMax

public int getRefineMax()
Returns the maximum number of refinements

Returns:
Maximum number of refinements

setRefineMax

public void setRefineMax(int refineMax)
Sets refine max

Parameters:
refineMax -

getRefineMin

public int getRefineMin()
Returns minimum size of a refinement (in terms of values)

Returns:
Minimum size of a refinement (in terms of values)

setRefineMin

public void setRefineMin(int refineMin)
Sets the minimum size of a refinement (in terms of values)

Parameters:
refineMin -

getRefineMinVal

public int getRefineMinVal()
Returns minimum number of refinement values

Returns:
minimum number of refinement values

setRefineMinVal

public void setRefineMinVal(int refineMinVal)
Sets the minimum number of refinement values

Parameters:
refineMinVal - minimum number of refinement values

getRefineDebug

public java.lang.String getRefineDebug()
Returns whether refine debugging is enabled

Returns:
whether refine debugging is enabled

setRefineDebug

public void setRefineDebug(java.lang.String pRefineDebug)
Sets refine debugging

Parameters:
pRefineDebug -

getRefineTop

public int getRefineTop()
Returns number of values to return per refinement

Returns:
Number of values to return per refinement

setRefineTop

public void setRefineTop(int refineTop)
Sets the number of values to return per refinement

Parameters:
refineTop -

getPageNum

public int getPageNum()
Returns the zero-based page number

Specified by:
getPageNum in interface PagedResponse
Returns:
zero-based page number

setPageNum

public void setPageNum(int pageNum)
Sets zero-based page number

Specified by:
setPageNum in interface PagedResponse
Parameters:
pageNum - zero-based page number

getPageSize

public int getPageSize()
Returns number of index items per page.

Specified by:
getPageSize in interface PagedResponse
Returns:
Number of index items per page.

setPageSize

public void setPageSize(int pageSize)
Number of index items per page.

Specified by:
setPageSize in interface PagedResponse
Parameters:
pageSize -

getGroupCount

public int getGroupCount()
Returns the number of answer groups before paging. When sorting (grouping) by property (see getSorting()) with a multi-partition index, note that the group count may not reflect the actual number of results returned.

Specified by:
getGroupCount in interface PagedResponse
Returns:
number of answer groups before paging

getHasMoreResults

public boolean getHasMoreResults()
Returns true if there are more results for fast paging. Returns false if all results have already been retrieved. If this is called for a non-fast paged request, or a single-partition index request, it will return false.

Specified by:
getHasMoreResults in interface PagedResponse
Returns:
true if there are more results for fast paging. Returns false if all results have already been retrieved or if this is not a fast paged request

getDocSort

public atg.search.routing.command.search.DocSort getDocSort()
Returns the secondary sorting type

Returns:
Secondary sorting

setDocSort

public void setDocSort(atg.search.routing.command.search.DocSort docSort)
Sets the type of secondary sorting

Parameters:
docSort -

getDocSortPred

public java.lang.String getDocSortPred()
If getDocSort() is DocSort.PREDICATE, returns the predicate expression to use for sorting

Returns:
If docSort is predicate, the predicate expression to use for sorting

setDocSortPred

public void setDocSortPred(java.lang.String docSortPred)
Sets the predicate

Parameters:
docSortPred -

getDocSortProp

public java.lang.String getDocSortProp()
If getDocSort() is DocSort.STRPROP or DocSort.NUMPROP, the name of the property to use for sorting

Returns:
name of the property to use for sorting

setDocSortProp

public void setDocSortProp(java.lang.String docSortProp)
Sets the name of the property to use for searching

Parameters:
docSortProp -

getDocSortPropVal

public DocSortPropVal getDocSortPropVal()
Returns the doc sort prop val.

Returns:
docsort prop val

setDocSortPropVal

public void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
Sets doc sort prop val

Parameters:
pDocSortPropVal -

getDocSortPropDefault

public java.lang.String getDocSortPropDefault()
If getDocSort() is DocSort.STRPROP or DocSort.NUMPROP, returns the default value for the property.

Returns:
If getDocSort() is DocSort.STRPROP or DocSort.NUMPROP, the default value for the property

setDocSortPropDefault

public void setDocSortPropDefault(java.lang.String docSortPropDefault)
Sets the docSortPropDefault

Parameters:
docSortPropDefault -

getDocSortOrder

public atg.search.routing.command.search.DocSortOrder getDocSortOrder()
Returns the sort order of the result groups

Returns:
Sort order of result groups

setDocSortOrder

public void setDocSortOrder(atg.search.routing.command.search.DocSortOrder docSortOrder)
Sets the sort order of the answer groups

Parameters:
docSortOrder -

getPageOffsetInfo

public atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
When fast paging is used, and ff the response is the result of a merge, this holds the last response index per partition, in the form contentID:offset;contentID:offset;...

Specified by:
getPageOffsetInfo in interface PagedResponse
Returns:
page offset info

setPageOffsetInfo

public void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pageOffsetInfo)
Sets page offset info

Specified by:
setPageOffsetInfo in interface PagedResponse
Parameters:
pageOffsetInfo -

getStartCategory

public java.lang.String getStartCategory()
Returns the starting category (document set) used in the request

Returns:
Starting category (document set) used in the request

setStartCategory

public void setStartCategory(java.lang.String startingCategory)
Sets the start category used in the request

Parameters:
startingCategory -

getDocumentSets

public DocumentSetConstraint getDocumentSets()
Returns document constraint expression

Returns:
Document constraint expression

setDocumentSets

public void setDocumentSets(DocumentSetConstraint documentSets)
Sets document constraint expression

Parameters:
documentSets - Document constraint expression