atg.search.routing.command.search
Class StructuredQueryRequest.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.SearchResultsResponse
                  extended by atg.search.routing.command.search.StructuredQueryRequest.Response
All Implemented Interfaces:
PagedResponse, java.io.Serializable
Enclosing class:
StructuredQueryRequest

public static class StructuredQueryRequest.Response
extends SearchResultsResponse

Response type for StructuredQueryRequest.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.search.routing.command.search.SearchResponse
mMultiPartitionSearch
 
Constructor Summary
StructuredQueryRequest.Response(atg.search.routing.command.SearchEngineResponse response)
          Constructs a new response from the engine response
StructuredQueryRequest.Response(StructuredQueryRequest pRequest, java.util.List<SearchResponse> pParsedResponses)
          This uses Java Merge instead of the engine's merge.
 
Method Summary
 boolean equals(java.lang.Object pObject)
           
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
 boolean getAutospell()
          Returns the autospell attribute value
protected  void getBodyXML(java.lang.StringBuilder buf)
           
 java.lang.String getContentId()
          Returns the unique content guid for the partition that provided this response, if the request type supports its return.
 java.lang.String getDebug()
          Returns debug information from the engine
 int getDefaultXmlBytes()
           
 StructuredQueryRequest.DocSetSort getDocSetSort()
          Returns the docSetSort attribute value
 StructuredQueryRequest.DocSort getDocSort()
          Returns the docSort attribute value
 StructuredQueryRequest.DocSortOrder getDocSortOrder()
          Returns the doc sort order
 java.lang.String getDocSortPred()
          Returns the doc sort predicate
 java.lang.String getDocSortProp()
          Returns the doc sort property
 java.lang.String getDocSortPropDefault()
          Returns the default doc sort property val
 DocSortPropVal getDocSortPropVal()
          Returns the docsort prop val
 DocumentSetConstraint getDocumentSets()
          Returns the document set constraints
 FeedbackReport getFeedbackReport()
          Returns query feedback data
 int getGroupCount()
          Returns the total number of answer groups in the results, regardless of paging.
 int getMaxRelatedSets()
          Indicates how many related document sets (or categories) should be returned for each document
 int getMaxRelatedStatements()
          Returns maximum number of related statements to return
 java.lang.String getMergeSettings()
          mergeSettings that were used in the query
 ParserOptions getParserOptions()
          Returns the text processing options
 java.util.List<ProcessedResponse> getProcessedPartitionResponses()
          Gets the processed the engine responses from individual partitions.
 java.lang.String getRefineConfig()
          Returns the refine config name
 DocumentSetConstraint getRefineConstraints()
          Returns the refinement constraints
 int getRefineMax()
          Returns the refine max
 Refinements getRefinements()
          Returns the query refinements
 int getRefineMin()
          Returns the refineMin attribute value
 int getRefineTop()
          Returns the refineTop attribute value
 java.util.List<RelatedStatement> getRelatedStatements()
          Returns matching individual statement results for final statement query
 java.lang.String getRequestTag()
           
 ResponseTree getResponseTree()
          Returns the categorization of the results
 java.util.List<StructuredStatement> getStatements()
          Returns the user input statements
 int getTop()
          Returns the maximum number of results to return
 int getWeightContribution()
          Returns the relative contribution of the weighted preference value to the total relevance
 DocumentSetConstraint getWeightedProperties()
          Returns the weighted properties
 boolean isDocSortCase()
          Returns the docSortCase
 boolean isRefineDebug()
          Returns whether refine config debug is enabled
protected  void merge(SearchRequest pSearchRequest, java.util.List<SearchResponse> pParsedResponses)
          This is Java merge.
 void setAutospell(boolean autospell)
          Sets the autospell attribute value
 void setContentId(java.lang.String contentId)
          Sets the content ID for the partition, if appplicable
 void setDebug(java.lang.String pDebug)
          Sets debug information from the engine
 void setDocSetSort(StructuredQueryRequest.DocSetSort docSetSort)
          Sets the docSetSort attribute value
 void setDocSort(StructuredQueryRequest.DocSort docSort)
          Sets the docSort attribute value
 void setDocSortCase(boolean pDocSortCase)
          Sets docSortCase
 void setDocSortOrder(StructuredQueryRequest.DocSortOrder docSortOrder)
          Sets the doc sort order
 void setDocSortPred(java.lang.String docSortPred)
          Sets the doc sort predicate
 void setDocSortProp(java.lang.String docSortProp)
          Sets the doc sort property
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          Sets the default doc sort property val
 void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
          Sets the docsort prop val
 void setDocumentSets(DocumentSetConstraint documentSets)
          Sets document set constraints
 void setFeedbackReport(FeedbackReport feedbackReport)
          Sets query feedback data
 void setGroupCount(int pGroupCount)
          Sets number of answer groups before paging
 void setMaxRelatedSets(int maxRelatedSets)
          Sets how many related document sets (or categories) should be returned for each document
 void setMaxRelatedStatements(int maxRelatedStatements)
          Sets maximum number of related statements to return
 void setMergeSettings(java.lang.String mergeSettings)
          Sets the mergeSettings that were used in the query
 void setParserOptions(ParserOptions parserOptions)
          Sets the text processing options
 void setRefineConfig(java.lang.String pRefineConfig)
          Sets the refine config name
 void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
          Sets the refinement constraints
 void setRefineDebug(boolean pRefineDebug)
          Sets whether refine config debug is enabled
 void setRefineMax(int refineMax)
          Sets the refine max
 void setRefinements(Refinements refinements)
          Sets query refinements
 void setRefineMin(int refineMin)
          Sets refineMin attribute value
 void setRefineTop(int refineTop)
          Sets the refineTop attribute value
 void setRelatedStatements(java.util.List<RelatedStatement> relatedStatements)
          Sets matching individual statement results for final statement query
 void setResponseTree(ResponseTree responseTree)
          Sets the categorization of the results
 void setStatements(java.util.List<StructuredStatement> statements)
          Sets user input statements
 void setTop(int top)
          Sets the maximum number of results to return
 void setWeightContribution(int weightContribution)
          Sets the relative contribution of the weighted preference value to the total relevance
 void setWeightedProperties(DocumentSetConstraint weightedProperties)
          Sets the weighted properties
 
Methods inherited from class atg.search.routing.command.search.SearchResultsResponse
addResult, addResults, getGroups, getHasMoreResults, getMinScore, getPageNum, getPageOffsetInfo, getPageSize, getResults, getResultsWithGrouping, getSpellingTerms, getSuggestedCategories, setMinScore, setPageNum, setPageOffsetInfo, setPageSize, setResults, setSpellingTerms, setSuggestedCategories
 
Methods inherited from class atg.search.routing.command.search.SearchResponse
addError, getErrors, getMergeTimeMs, getParseTimeMs, getPartitionResponses, getRequestChainToken, getRequestIdentifier, getRequestTime, getSearchTargetNames, getTotalResponseTimeMs, handleMerge, isAllowListProperties, isLocalMergeEnabled, isMultiPartitionSearch, isTimedOut, setAllowListProperties, setErrors, 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, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getParentXMLObject, getXmlPath, setParentXMLObject, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

StructuredQueryRequest.Response

public StructuredQueryRequest.Response(StructuredQueryRequest pRequest,
                                       java.util.List<SearchResponse> pParsedResponses)
                                throws atg.search.routing.MergeException
This uses Java 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

StructuredQueryRequest.Response

public StructuredQueryRequest.Response(atg.search.routing.command.SearchEngineResponse response)
Constructs a new response from the engine response

Parameters:
response -
Method Detail

equals

public boolean equals(java.lang.Object pObject)
Overrides:
equals in class SearchResultsResponse

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:
pRequest - the original request
pParsedResponses - pre-parsed responses
Throws:
atg.search.routing.MergeException - if the merge fails

getRequestTag

public java.lang.String getRequestTag()
Overrides:
getRequestTag in class atg.search.routing.command.SearchEngineCommandResponse

getDefaultXmlBytes

public int getDefaultXmlBytes()
Overrides:
getDefaultXmlBytes in class atg.search.routing.command.SearchXMLObject

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder buf)
                        throws atg.search.routing.command.IncompleteCommandException
Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getBodyXML

protected void getBodyXML(java.lang.StringBuilder buf)
                   throws atg.search.routing.command.IncompleteCommandException
Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getRelatedStatements

public java.util.List<RelatedStatement> getRelatedStatements()
Returns matching individual statement results for final statement query

Returns:
List of RelatedStatement

setRelatedStatements

public void setRelatedStatements(java.util.List<RelatedStatement> relatedStatements)
Sets matching individual statement results for final statement query

Parameters:
relatedStatements - matching individual statement results for final statement query

getDebug

public java.lang.String getDebug()
Returns debug information from the engine

Returns:
debug information from the engine

setDebug

public void setDebug(java.lang.String pDebug)
Sets debug information from the engine

Parameters:
pDebug - debug information from the engine

getMaxRelatedStatements

public int getMaxRelatedStatements()
Returns maximum number of related statements to return

Returns:
maximum number of related statements to return

setMaxRelatedStatements

public void setMaxRelatedStatements(int maxRelatedStatements)
Sets maximum number of related statements to return

Parameters:
maxRelatedStatements - maximum number of related statements to return

isDocSortCase

public boolean isDocSortCase()
Returns the docSortCase

Returns:
docSortCase

setDocSortCase

public void setDocSortCase(boolean pDocSortCase)
Sets docSortCase

Parameters:
pDocSortCase - docSortCase

getDocSortPred

public java.lang.String getDocSortPred()
Returns the doc sort predicate

Returns:
doc sort predicate

setDocSortPred

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

Parameters:
docSortPred - the doc sort predicate

getTop

public int getTop()
Returns the maximum number of results to return

Returns:
Maximum number of results to return

setTop

public void setTop(int top)
Sets the maximum number of results to return

Parameters:
top - maximum number of results to return

getWeightContribution

public int getWeightContribution()
Returns the relative contribution of the weighted preference value to the total relevance

Returns:
Relative contribution of the weighted preference value to the total relevance

setWeightContribution

public void setWeightContribution(int weightContribution)
Sets the relative contribution of the weighted preference value to the total relevance

Parameters:
weightContribution - the relative contribution of the weighted preference value to the total relevance

getMaxRelatedSets

public int getMaxRelatedSets()
Indicates how many related document sets (or categories) should be returned for each document

Returns:
How many related document sets (or categories) should be returned for each document

setMaxRelatedSets

public void setMaxRelatedSets(int maxRelatedSets)
Sets how many related document sets (or categories) should be returned for each document

Parameters:
maxRelatedSets - how many related document sets (or categories) should be returned for each document

getStatements

public java.util.List<StructuredStatement> getStatements()
Returns the user input statements

Returns:
user input statements

setStatements

public void setStatements(java.util.List<StructuredStatement> statements)
Sets user input statements

Parameters:
statements - user input statements

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 very costly operation, and is made available only for debugging purposes. The original engine responses are normally not available due to the storage overhead. To enable their storage, call SearchEngineRequest.setKeepingResponseData(boolean).

Returns:
List of StructuredQueryRequest.Response, possibly empty but never null. Bad results will have null elements in the collection.

getContentId

public java.lang.String getContentId()
Description copied from class: SearchResponse
Returns the unique content guid for the partition that provided this response, if the request type supports its return. If not supported, null is returned.

Overrides:
getContentId in class SearchResponse
Returns:
content guid, if supported, otherwise null

setContentId

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

Parameters:
contentId - content ID for the partition, if appplicable

getDocSetSort

public StructuredQueryRequest.DocSetSort getDocSetSort()
Returns the docSetSort attribute value

Returns:
docSetSort attribute value

setDocSetSort

public void setDocSetSort(StructuredQueryRequest.DocSetSort docSetSort)
Sets the docSetSort attribute value

Parameters:
docSetSort - the docSetSort attribute value

getGroupCount

public int getGroupCount()
Description copied from class: SearchResultsResponse
Returns the total number of answer groups in the results, regardless of paging. For requests that don't result in answer groups, such as SimilarDocsRequest, this is simply the number of results.

Specified by:
getGroupCount in interface PagedResponse
Specified by:
getGroupCount in class SearchResultsResponse
Returns:
total number of answer groups in the results, ignoring paging

setGroupCount

public void setGroupCount(int pGroupCount)
Sets number of answer groups before paging

Parameters:
pGroupCount - number of answer groups before paging

getMergeSettings

public java.lang.String getMergeSettings()
mergeSettings that were used in the query

Returns:
mergeSettings that were used in the query

setMergeSettings

public void setMergeSettings(java.lang.String mergeSettings)
Sets the mergeSettings that were used in the query

Parameters:
mergeSettings - mergeSettings that were used in the query

getRefineConfig

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

Returns:
refine config name

setRefineConfig

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

Parameters:
pRefineConfig - the refine config name

isRefineDebug

public boolean isRefineDebug()
Returns whether refine config debug is enabled

Returns:
whether refine config debug is enabled

setRefineDebug

public void setRefineDebug(boolean pRefineDebug)
Sets whether refine config debug is enabled

Parameters:
pRefineDebug - whether refine config debug is enabled

getRefineMax

public int getRefineMax()
Returns the refine max

Returns:
refine max

setRefineMax

public void setRefineMax(int refineMax)
Sets the refine max

Parameters:
refineMax - refine max

getRefineMin

public int getRefineMin()
Returns the refineMin attribute value

Returns:
refineMin attribute value

setRefineMin

public void setRefineMin(int refineMin)
Sets refineMin attribute value

Parameters:
refineMin - refineMin attribute value

getRefineTop

public int getRefineTop()
Returns the refineTop attribute value

Returns:
refineTop attribute value

setRefineTop

public void setRefineTop(int refineTop)
Sets the refineTop attribute value

Parameters:
refineTop - refineTop attribute value

getAutospell

public boolean getAutospell()
Returns the autospell attribute value

Returns:
autospell attribute value

setAutospell

public void setAutospell(boolean autospell)
Sets the autospell attribute value

Parameters:
autospell - autospell attribute value

getDocSort

public StructuredQueryRequest.DocSort getDocSort()
Returns the docSort attribute value

Returns:
docSort attribute value

setDocSort

public void setDocSort(StructuredQueryRequest.DocSort docSort)
Sets the docSort attribute value

Parameters:
docSort - docSort attribute value

getDocSortProp

public java.lang.String getDocSortProp()
Returns the doc sort property

Returns:
the doc sort property

setDocSortProp

public void setDocSortProp(java.lang.String docSortProp)
Sets the doc sort property

Parameters:
docSortProp - the doc sort property

getDocSortPropVal

public DocSortPropVal getDocSortPropVal()
Returns the docsort prop val

Returns:
docsort prop val

setDocSortPropVal

public void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
Sets the docsort prop val

Parameters:
pDocSortPropVal - docsort prop val

getDocSortPropDefault

public java.lang.String getDocSortPropDefault()
Returns the default doc sort property val

Returns:
the default doc sort property val

setDocSortPropDefault

public void setDocSortPropDefault(java.lang.String docSortPropDefault)
Sets the default doc sort property val

Parameters:
docSortPropDefault - the default doc sort property val

getDocSortOrder

public StructuredQueryRequest.DocSortOrder getDocSortOrder()
Returns the doc sort order

Returns:
the doc sort order

setDocSortOrder

public void setDocSortOrder(StructuredQueryRequest.DocSortOrder docSortOrder)
Sets the doc sort order

Parameters:
docSortOrder - the doc sort order

getDocumentSets

public DocumentSetConstraint getDocumentSets()
Returns the document set constraints

Returns:
document set constraints

setDocumentSets

public void setDocumentSets(DocumentSetConstraint documentSets)
Sets document set constraints

Parameters:
documentSets - document set constraints

getWeightedProperties

public DocumentSetConstraint getWeightedProperties()
Returns the weighted properties

Returns:
weighted properties

setWeightedProperties

public void setWeightedProperties(DocumentSetConstraint weightedProperties)
Sets the weighted properties

Parameters:
weightedProperties - weighted properties

getRefineConstraints

public DocumentSetConstraint getRefineConstraints()
Returns the refinement constraints

Returns:
refinement constraints

setRefineConstraints

public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
Sets the refinement constraints

Parameters:
pRefineConstraints - refinement constraints

getParserOptions

public ParserOptions getParserOptions()
Returns the text processing options

Returns:
text processing options

setParserOptions

public void setParserOptions(ParserOptions parserOptions)
Sets the text processing options

Parameters:
parserOptions - text processing options

getResponseTree

public ResponseTree getResponseTree()
Returns the categorization of the results

Returns:
The categorization of the results

setResponseTree

public void setResponseTree(ResponseTree responseTree)
Sets the categorization of the results

Parameters:
responseTree - the categorization of the results

getFeedbackReport

public FeedbackReport getFeedbackReport()
Returns query feedback data

Returns:
query feedback data

setFeedbackReport

public void setFeedbackReport(FeedbackReport feedbackReport)
Sets query feedback data

Parameters:
feedbackReport - query feedback data

getRefinements

public Refinements getRefinements()
Returns the query refinements

Returns:
query refinements

setRefinements

public void setRefinements(Refinements refinements)
Sets query refinements

Parameters:
refinements - query refinements