atg.search.routing.command.search
Class CategoryDocument

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.search.Document
          extended by atg.search.routing.command.search.CategoryDocument
All Implemented Interfaces:
Groupable, java.io.Serializable

public class CategoryDocument
extends Document
implements Groupable

A category document is a Document with a few extra properties unique to the browse response.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CategoryDocument()
           
 
Method Summary
 atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
          Returns a new DocumentAnswerGroup
 boolean equals(java.lang.Object pObject)
           
 int getAnswerGroup()
          Returns the document's answer group
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
 Document getDocument()
          Returns the associated document
 int getOriginalAnswerGroup()
          Returns the original answer group identifier, from before the merge.
 java.lang.String getRankCalc()
          Returns the rank calculation
 float getScore()
          Returns the score based on ranking configuration calculation
 java.lang.String getSortProp()
          returns the value of the grouping property
 int hashCode()
           
 void setAnswerGroup(int answerGroup)
          Sets the answer group
 void setId(int pId)
          Not used for category docs
 void setRankCalc(java.lang.String rankCalc)
          Sets the rank calculation
 void setScore(float score)
          Sets the score
 void setSortProp(java.lang.String sortProp)
          Sets the sort property
 
Methods inherited from class atg.search.routing.command.search.Document
getAddress, getBodyXML, getContentId, getContextInfo, getDocset, getEscapedUrl, getFileName, getGoto, getGotoLink, getHdoc, getLanguage, getPaAnswerText, getPaQuestionText, getProperties, getRelatedDocsets, getRequestTag, getSizeBytes, getSummary, getTimestamp, getTitle, getType, getUrl, isListPropertiesAllowed, setAddress, setContentId, setContextInfo, setDocset, setFileName, setGoto, setHdoc, setLanguage, setListPropertiesAllowed, setPaAnswerText, setPaQuestionText, setProperties, setRelatedDocsets, setSizeBytes, setSummary, setTimestamp, setTitle, setType, setUrl
 
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, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface atg.search.routing.command.search.Groupable
getContentId, setContentId
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CategoryDocument

public CategoryDocument()
Method Detail

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Document

getAnswerGroup

public int getAnswerGroup()
Returns the document's answer group

Specified by:
getAnswerGroup in interface Groupable
Returns:
Group id of document

setAnswerGroup

public void setAnswerGroup(int answerGroup)
Sets the answer group

Specified by:
setAnswerGroup in interface Groupable
Parameters:
answerGroup -

getOriginalAnswerGroup

public int getOriginalAnswerGroup()
Returns the original answer group identifier, from before the merge. This is only used for merge.

Specified by:
getOriginalAnswerGroup in interface Groupable
Returns:
original answer group identifier

getDocument

public Document getDocument()
Returns the associated document

Specified by:
getDocument in interface Groupable
Returns:
the associated document

setId

public void setId(int pId)
Not used for category docs

Specified by:
setId in interface Groupable
Parameters:
pId -

createNewAnswerGroup

public atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
Returns a new DocumentAnswerGroup

Specified by:
createNewAnswerGroup in interface Groupable
Returns:
new answer group

getSortProp

public java.lang.String getSortProp()
returns the value of the grouping property

Specified by:
getSortProp in interface Groupable
Returns:
The value of the grouping property

setSortProp

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

Parameters:
sortProp - the sort property

getRankCalc

public java.lang.String getRankCalc()
Returns the rank calculation

Returns:
rank calculation

setRankCalc

public void setRankCalc(java.lang.String rankCalc)
Sets the rank calculation

Parameters:
rankCalc - rank calculation

getScore

public float getScore()
Returns the score based on ranking configuration calculation

Specified by:
getScore in interface Groupable
Returns:
Score based on ranking configuration calculation

setScore

public void setScore(float score)
Sets the score

Specified by:
setScore in interface Groupable
Parameters:
score -

getAttributeXML

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