atg.search.routing.command.search
Class ItemFormatConstraint

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.search.DocumentSetConstraint
          extended by atg.search.routing.command.search.BaseConstraint
              extended by atg.search.routing.command.search.ItemFormatConstraint
All Implemented Interfaces:
java.io.Serializable

public class ItemFormatConstraint
extends BaseConstraint

Used to constraint the result based on the indexed item type.

See Also:
Serialized Form

Field Summary
static java.lang.String ALL
          All types of items
static java.lang.String CLASS_VERSION
           
static java.lang.String HTML
          Simple HTML of any style
static java.lang.String OTHER
          Any other format
static java.lang.String PDF
          PDF Format
static java.lang.String TAG
           
static java.lang.String TEXT
          Raw Text Format
static java.lang.String XHTML
          w3.org XML schema for HTML
 
Constructor Summary
ItemFormatConstraint()
           
 
Method Summary
protected  DocumentSetConstraint createFromParser(atg.search.routing.utils.SearchMessageNode pXml)
           
 boolean equals(java.lang.Object pObject)
           
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
protected  void getBodyXML(java.lang.StringBuilder sb)
           
 java.lang.String getRequestTag()
           
static java.lang.String getTag()
           
 java.lang.String getType()
          Returns the type
 java.lang.Float getWeight()
          Returns the weight
 void setType(java.lang.String pType)
          Sets the item format type
 void setWeight(java.lang.Float pWeight)
          Sets the weight of the constraint
static ItemFormatConstraint valueOf(java.lang.String pXml)
          Converts constraint xml into a new constraint instance
 
Methods inherited from class atg.search.routing.command.search.BaseConstraint
getXml, setXml
 
Methods inherited from class atg.search.routing.command.search.DocumentSetConstraint
createFromXML, getParser, getPropConstraints
 
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, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

HTML

public static final java.lang.String HTML
Simple HTML of any style

See Also:
Constant Field Values

TEXT

public static final java.lang.String TEXT
Raw Text Format

See Also:
Constant Field Values

PDF

public static final java.lang.String PDF
PDF Format

See Also:
Constant Field Values

XHTML

public static final java.lang.String XHTML
w3.org XML schema for HTML

See Also:
Constant Field Values

OTHER

public static final java.lang.String OTHER
Any other format

See Also:
Constant Field Values

ALL

public static final java.lang.String ALL
All types of items

See Also:
Constant Field Values

TAG

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

ItemFormatConstraint

public ItemFormatConstraint()
Method Detail

getTag

public static java.lang.String getTag()

equals

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

getType

public java.lang.String getType()
Returns the type

Returns:
the type

setType

public void setType(java.lang.String pType)
Sets the item format type

Parameters:
pType - item format type
See Also:
HTML, TEXT, PDF, XHTML, OTHER, ALL

getWeight

public java.lang.Float getWeight()
Returns the weight

Returns:
the weight

setWeight

public void setWeight(java.lang.Float pWeight)
Sets the weight of the constraint

Parameters:
pWeight - weight

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

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

valueOf

public static ItemFormatConstraint valueOf(java.lang.String pXml)
Converts constraint xml into a new constraint instance

Parameters:
pXml - item format constraint xml
Returns:
new constraint instance

createFromParser

protected DocumentSetConstraint createFromParser(atg.search.routing.utils.SearchMessageNode pXml)
Specified by:
createFromParser in class DocumentSetConstraint

getRequestTag

public java.lang.String getRequestTag()
Specified by:
getRequestTag in class atg.search.routing.command.SearchXMLObject