atg.search.routing.command.search
Class ItemFormatConstraint

java.lang.Object
  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  ItemFormatConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml, int rootIdx)
           
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
 java.lang.String toXml()
          Converts this constraint to the XML representation that can be sent in request.
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, equals, escapeToXml, getParser, getPropConstraints, toString
 
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()

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

toXml

public java.lang.String toXml()
Description copied from class: DocumentSetConstraint
Converts this constraint to the XML representation that can be sent in request. You must override this to provide constraint-specific XML generation.

Specified by:
toXml in class DocumentSetConstraint
Returns:
xml

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 ItemFormatConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml,
                                                int rootIdx)
Specified by:
createFromParser in class DocumentSetConstraint