atg.search.routing.command.search
Class TypeAheadRequest.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.TypeAheadRequest.Response
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TypeAheadRequest

public static class TypeAheadRequest.Response
extends SearchResponse

Response class for the TypeAheadRequest class

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
TypeAheadRequest.Response(atg.search.routing.command.SearchEngineResponse response)
          Constructor for a new response.
TypeAheadRequest.Response(SearchRequest pRequest, java.util.List<SearchResponse> pParsedResponses)
           
 
Method Summary
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
protected  void getBodyXML(java.lang.StringBuilder sb)
           
 java.util.List<java.lang.String> getClasses()
          Type Ahead data may also include optional String class values.
 java.util.List<java.lang.String> getIds()
          Type Ahead data consists of matchable strings and optional String id values.
 java.lang.String getMatch()
          Get the string that the engine matched on in processing the Request.
 java.lang.String getRequestTag()
           
 java.util.List<java.lang.String> getStrings()
          Get the list of matching strings found by the engine when processing the request
 java.util.List<java.lang.Integer> getValues()
          Type Ahead data consists of matchable strings and associated integer values.
protected  void merge(SearchRequest pRequest, java.util.List<SearchResponse> pParsedResponses)
          This is local merge.
 
Methods inherited from class atg.search.routing.command.search.SearchResponse
addError, getBuildTimeMs, getContentId, getErrors, getListableProperties, getMergeTimeMs, getParseTimeMs, getPartitionResponses, getRequestChainToken, getRequestIdentifier, getRequestTime, getSearchTargetNames, getTotalResponseTimeMs, 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, equals, 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

TypeAheadRequest.Response

public TypeAheadRequest.Response(atg.search.routing.command.SearchEngineResponse response)
Constructor for a new response. Normally not called directly by client code.

Parameters:
response - the SearchEngineResponse object from the associated request.

TypeAheadRequest.Response

public TypeAheadRequest.Response(SearchRequest pRequest,
                                 java.util.List<SearchResponse> pParsedResponses)
                          throws atg.search.routing.MergeException
Throws:
atg.search.routing.MergeException
Method Detail

getMatch

public java.lang.String getMatch()
Get the string that the engine matched on in processing the Request. This string may have been normalized, and thus might differ from that in the request.

Returns:
the string the was matched on

getStrings

public java.util.List<java.lang.String> getStrings()
Get the list of matching strings found by the engine when processing the request

Returns:
the list of matching strings

getValues

public java.util.List<java.lang.Integer> getValues()
Type Ahead data consists of matchable strings and associated integer values. This returns the list of such values, which correlate one-to-one with the strings returned in getStrings(). These values can optionally be used in client code, possibly for end-user display.

Returns:
the list of Integer values associated with the matching strings

getIds

public java.util.List<java.lang.String> getIds()
Type Ahead data consists of matchable strings and optional String id values. This returns the list of such values, which correlate one-to-one with the strings returned in getStrings(). These values can optionally be used in client code, possibly for end-user display. If a matchable string did not have an id value provided, the corresponding value will be null

Returns:
the list of user-provided id strings

getClasses

public java.util.List<java.lang.String> getClasses()
Type Ahead data may also include optional String class values. This returns the list of such values, which correlate one-to-one with the strings returned in getStrings(). These values can optionally be used in client code, possibly for end-user display or to classify the type of item matched. If a matchable string did not have a class value provided, the corresponding value will be null

Returns:
the list of user-provided class strings

merge

protected void merge(SearchRequest pRequest,
                     java.util.List<SearchResponse> pParsedResponses)
              throws atg.search.routing.MergeException
Description copied from class: SearchResponse
This is local merge. Implementations do not need to check the array for nullness or size. Nor do implementations need to allocate or set a SearchEngineResponse or provide any timing. The Response class must provide a constructor that looks like the one below and invokes SearchResponse.handleMerge(atg.search.routing.command.search.SearchRequest,java.util.List). The implementation of this method should only handle merge. See QueryRequest.Response.merge(SearchRequest, java.util.List)

public Response(YourRequest pRequest, List<SearchResponse> pParsedResponses) throws MergeException
{
  handleMerge(pRequest, pParsedResponses);
}

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

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder sb)
                        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 sb)
                   throws atg.search.routing.command.IncompleteCommandException
Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException