atg.search.routing.command.search
Class DateConstraint

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

public class DateConstraint
extends BaseConstraint

Allows a constraint to a specific date or a date range. See setDate1(String) and setDate2(String).

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String TAG
           
 
Constructor Summary
DateConstraint()
           
 
Method Summary
protected  DateConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml, int rootIdx)
           
 java.lang.String getDate1()
          Returns the first (and possibly the only) date.
 java.lang.String getDate2()
          Returns the second date if the date is a range of dates.
 NumOp getOperation()
          Returns the number operation
static java.lang.String getTag()
           
 java.lang.Float getWeight()
          Returns the weight of the constraint
 void setDate1(java.lang.String pDate1)
          If the second date is not set via setDate2(String), then this date will be the only date; the operation (see setOperation(atg.search.routing.command.search.NumOp)) will apply.
 void setDate2(java.lang.String pDate2)
          Sets the second date, making this a range constraint.
 void setOperation(NumOp pOperation)
          Sets the number operation
 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 DateConstraint valueOf(java.lang.String pXml)
           
 
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

TAG

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

DateConstraint

public DateConstraint()
Method Detail

getTag

public static java.lang.String getTag()

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 pWeight)
Sets the weight of the constraint

Parameters:
pWeight -

getOperation

public NumOp getOperation()
Returns the number operation

Returns:
the number operation

setOperation

public void setOperation(NumOp pOperation)
Sets the number operation

Parameters:
pOperation -

getDate1

public java.lang.String getDate1()
Returns the first (and possibly the only) date. See getDate2() and setDate1(String)

Returns:
Returns the date.

setDate1

public void setDate1(java.lang.String pDate1)
If the second date is not set via setDate2(String), then this date will be the only date; the operation (see setOperation(atg.search.routing.command.search.NumOp)) will apply. If the second date is specified, then it will be a range delimited according to the chosen operation (see (atg.search.routing.command.search.NumOp)). The only acceptable date formats are as follows:

Parameters:
pDate1 - a date string, in an appropriate form

getDate2

public java.lang.String getDate2()
Returns the second date if the date is a range of dates.

Returns:
second date in the case of a range

setDate2

public void setDate2(java.lang.String pDate2)
Sets the second date, making this a range constraint. See setDate1(java.lang.String) for acceptable formats.

Parameters:
pDate2 - second date in the case of a range

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 DateConstraint valueOf(java.lang.String pXml)

createFromParser

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