com.primus.searchcommon.constraint
Class ItemFormatConstraint

java.lang.Object
  extended by com.primus.searchcommon.constraint.BaseConstraint
      extended by com.primus.searchcommon.constraint.ItemFormatConstraint
All Implemented Interfaces:
DocumentSetConstraint, java.io.Serializable

public class ItemFormatConstraint
extends BaseConstraint

Used to constraint the result based on the indexed item type. Use the constants defined in this class.

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 TEXT
          Raw Text Format
static java.lang.String XHTML
          w3.org XML schema for HTML
 
Constructor Summary
ItemFormatConstraint(java.lang.String pType)
           
ItemFormatConstraint(java.lang.String pType, java.lang.Float pWeight)
           
 
Method Summary
 java.lang.String toXml()
          Converts this constraint to the XML representation that can be sent in the ES Query.
 
Methods inherited from class com.primus.searchcommon.constraint.BaseConstraint
escapeToXml, toString
 
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
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
Constructor Detail

ItemFormatConstraint

public ItemFormatConstraint(java.lang.String pType)
Parameters:
pType - The item type to constraint for. Use the constants defined in this class.

ItemFormatConstraint

public ItemFormatConstraint(java.lang.String pType,
                            java.lang.Float pWeight)
Parameters:
pType - The item type to constraint for. Use the constants defined in this class.
pWeight - weight
Method Detail

toXml

public java.lang.String toXml()
Description copied from interface: DocumentSetConstraint
Converts this constraint to the XML representation that can be sent in the ES Query.

Returns: