atg.search.query.messages
Class StructuredQueryMessage

java.lang.Object
  extended by atg.search.query.messages.SearchMessage
      extended by atg.search.query.messages.StructuredQueryMessage
All Implemented Interfaces:
java.io.Serializable

public class StructuredQueryMessage
extends SearchMessage
implements java.io.Serializable

A message corresponding to a <query> request/response

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String JMS_MESSAGE_TYPE
           
 
Constructor Summary
StructuredQueryMessage(ClientStructuredRequest pRequest)
          Create a instance of this class
 
Method Summary
 java.lang.String getExcludeQueryText()
          Return query text from any <structquery><statement> which uses the "negative" op attribute.
 java.lang.String getJMSType()
          Get the JMS type
 java.lang.String getQueryText()
          Return query text from any <structquery><statement> which does not use the "negative" op attribute.
protected  java.lang.StringBuffer getQueryText(boolean pInclusive)
          Get a concatenation of queryText from each StructuredStatement.
 ClientStructuredRequest getRequest()
          Return the request object used to generate this query
protected  java.util.ArrayList getStatements(boolean pInclusive)
          Get StructuredStatement objects from query request.
 
Methods inherited from class atg.search.query.messages.SearchMessage
getClientRequest, getOpitonSetName, getResultCount, getResults, getSiteName, getUserProfile, parseInt, setOptionSetName, setResults, setSiteName, setUserProfile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

JMS_MESSAGE_TYPE

public static final java.lang.String JMS_MESSAGE_TYPE
See Also:
Constant Field Values
Constructor Detail

StructuredQueryMessage

public StructuredQueryMessage(ClientStructuredRequest pRequest)
Create a instance of this class

Parameters:
pRequest - the request object
Method Detail

getJMSType

public java.lang.String getJMSType()
Get the JMS type

Specified by:
getJMSType in class SearchMessage
Returns:
the JMS type

getRequest

public ClientStructuredRequest getRequest()
Return the request object used to generate this query

Returns:
the request for this message type

getQueryText

public java.lang.String getQueryText()
Return query text from any <structquery><statement> which does not use the "negative" op attribute.

Returns:
a concatenation of all inclusive statement queryTexts

getExcludeQueryText

public java.lang.String getExcludeQueryText()
Return query text from any <structquery><statement> which uses the "negative" op attribute.

Returns:
a concatenation of all negative statement queryTexts

getQueryText

protected java.lang.StringBuffer getQueryText(boolean pInclusive)
Get a concatenation of queryText from each StructuredStatement.

Parameters:
pInclusive - if true, return all statement queryText that not's op="exclude", if false return those with op="exclude"
Returns:
a string bufffer of all matching query text

getStatements

protected java.util.ArrayList getStatements(boolean pInclusive)
Get StructuredStatement objects from query request.

Parameters:
pInclusive - if true, return statements that are not marked "negative"
Returns:
a possibly empty list of StructuredStatement request objects