atg.search.routing.command.search
Class CollectionConstraint

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.CollectionConstraint
All Implemented Interfaces:
java.io.Serializable

public class CollectionConstraint
extends BaseConstraint

Collection constraint is used to constraint the result on a directory path of the indexed documents. This will be typically used when there is a large number of collections (document sets).

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String TAG
           
 
Constructor Summary
CollectionConstraint()
           
 
Method Summary
protected  DocumentSetConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml, int rootIdx)
           
 boolean equals(java.lang.Object pObject)
          compares this with another by an XML comparison Note that this will generate full xml.
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
protected  void getBodyXML(java.lang.StringBuilder sb)
           
 java.lang.String getPath()
          Returns the collection path
 java.lang.String getRequestTag()
           
static java.lang.String getTag()
           
 java.lang.Float getWeight()
          Returns the weight of the constraint
 void setPath(java.lang.String pPath)
          Sets the collection path
 void setWeight(java.lang.Float weight)
          Sets the weight of the constraint
 java.lang.String toXml()
          Converts this constraint to the XML representation that can be sent in request.
static CollectionConstraint valueOf(java.lang.String pXml)
          Constructs a collection constraint from xml.
 
Methods inherited from class atg.search.routing.command.search.BaseConstraint
getXml, setXml
 
Methods inherited from class atg.search.routing.command.search.DocumentSetConstraint
createFromXML, 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

TAG

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

CollectionConstraint

public CollectionConstraint()
Method Detail

getTag

public static java.lang.String getTag()

equals

public boolean equals(java.lang.Object pObject)
Description copied from class: DocumentSetConstraint
compares this with another by an XML comparison Note that this will generate full xml. It's not fast.

Overrides:
equals in class DocumentSetConstraint
Parameters:
pObject - another DocumentSetConstraint
Returns:
true if they produce identical XML

setPath

public void setPath(java.lang.String pPath)
Sets the collection path

Parameters:
pPath - the collection path

getWeight

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

Returns:
the weight of the constraint

setWeight

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

Parameters:
weight - the weight of the constraint

getPath

public java.lang.String getPath()
Returns the collection path

Returns:
the collection path

getBodyXML

protected void getBodyXML(java.lang.StringBuilder sb)
                   throws atg.search.routing.command.IncompleteCommandException
Throws:
atg.search.routing.command.IncompleteCommandException

getAttributeXML

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

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 CollectionConstraint valueOf(java.lang.String pXml)
Constructs a collection constraint from xml.

Parameters:
pXml - xml
Returns:
a new collection constraint

createFromParser

protected DocumentSetConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml,
                                                 int rootIdx)
Specified by:
createFromParser in class DocumentSetConstraint

getRequestTag

public java.lang.String getRequestTag()