public class DateRefinement extends Refinement<java.util.Calendar>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
DateRefinement.DateClause  | 
static interface  | 
DateRefinement.DateRefinementListener  | 
Refinement.Clause<T>| Constructor and Description | 
|---|
DateRefinement(java.util.Calendar date,
              int count,
              DateRefinement.DateRefinementListener listener)
Constructs a DateRefinement with one single Calendar value and the
 number of times that Calendar value shows up. 
 | 
DateRefinement(java.util.List<Refinement.Clause<java.util.Calendar>> clauses,
              int count,
              DateRefinement.DateRefinementListener listener)
Constructs a DateRefinement with a List of clauses and a count. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addAttributePredicate(java.util.List<Predicate> children,
                     AttributePredicate<java.util.Calendar> newPredicate)
Adds an attribute predicate to the list of Predicate objects
 held within a top-level ComplexPredicate. 
 | 
protected void | 
buildName(java.util.Calendar calendar)
Builds the name of the DateRefinement with a Calendar by formatting
 it and setting the name to be that String value. 
 | 
protected AttributePredicate<java.util.Calendar> | 
createPredicate(QName name,
               java.lang.String comparator,
               java.util.Calendar value)  | 
java.util.Calendar | 
getCalendarSinceNumDays(java.util.Calendar cal)  | 
static java.util.Calendar | 
getCalendarSinceNumDays(java.util.Calendar cal,
                       java.util.TimeZone timeZone)
Get Calendar object for query execution of SinceNumDays comparator 
 | 
ComplexPredicate.ConjunctionOp | 
getConjunctionOp()
Returns the conjunction operator for this DateRefinement. 
 | 
static int | 
getNumDays(java.util.Date date)
Get number of days from Date object of operand of SinceNumDays comparator 
 | 
static java.util.Calendar | 
getNumDaysAsCalendar(int num)
Get Calendar object for operand of SinceNumDays comparator 
 | 
java.util.Calendar | 
getYear()
If refinement is a yearly refinement, return a calendar object
 of the year. 
 | 
boolean | 
hasMatch(java.util.Calendar value)
Returns whether the calendar value passed in matches
 the criteria held in this Refinement. 
 | 
boolean | 
hasMatch(java.util.Calendar value,
        java.lang.String comparator,
        java.util.Calendar clauseValue)
Matches a Calendar value with a criterion made up
 of a comparator and another Calendar. 
 | 
protected java.util.List<Refinement.Clause<java.util.Calendar>> | 
initClauses(java.util.Calendar value,
           java.lang.String comparator)  | 
boolean | 
isAccumulative()
Is this refinement accumulative over another refinement? 
 | 
boolean | 
isDaily()
Is calendar type daily? 
 | 
boolean | 
isMonthly()
Is calendar type monthly? 
 | 
boolean | 
isSinceNumDays()
Is calender type since num days? 
 | 
boolean | 
isYearly()
Is calendar type yearly? 
 | 
void | 
setAccumulative(boolean value)
Set the accumulative characteristic of this refinement 
 | 
void | 
setCalendarType(int value)
Set calendar type 
 | 
buildName, buildName, getClauses, getCount, getName, getValue, increment, increment, isCurrent, refine, setCount, setCurrent, setName, toStringpublic DateRefinement(java.util.List<Refinement.Clause<java.util.Calendar>> clauses, int count, DateRefinement.DateRefinementListener listener)
clauses - the List off Refinement.Clause objects to be used
 in this Refinement.count - the number of results expected when this 
 DateRefinement is appliedlistener - the implementation class of the listener interfacepublic DateRefinement(java.util.Calendar date,
                      int count,
                      DateRefinement.DateRefinementListener listener)
date - the Calendar value based on which an EQUALS clause is builtcount - the number of results expected when this DateRefinementlistener - the implementation class of the listener interface
 is appliedprotected java.util.List<Refinement.Clause<java.util.Calendar>> initClauses(java.util.Calendar value, java.lang.String comparator)
initClauses in class Refinement<java.util.Calendar>public boolean isAccumulative()
public void setAccumulative(boolean value)
public void setCalendarType(int value)
value - Calendar field constantpublic boolean isYearly()
public boolean isMonthly()
public boolean isDaily()
public boolean isSinceNumDays()
public java.util.Calendar getYear()
protected AttributePredicate<java.util.Calendar> createPredicate(QName name, java.lang.String comparator, java.util.Calendar value)
createPredicate in class Refinement<java.util.Calendar>protected void buildName(java.util.Calendar calendar)
buildName in class Refinement<java.util.Calendar>calendar - the Calendar value to use to build the namepublic ComplexPredicate.ConjunctionOp getConjunctionOp()
getConjunctionOp in class Refinement<java.util.Calendar>protected void addAttributePredicate(java.util.List<Predicate> children, AttributePredicate<java.util.Calendar> newPredicate) throws ContradictionException
addAttributePredicate in class Refinement<java.util.Calendar>children - a List of child Predicates coming from a
 ComplexPredicate dedicated to a DateRefiner.newPredicate - the new Predicate to be added to the
 list of child Predicates.ContradictionExceptionpublic final boolean hasMatch(java.util.Calendar value)
hasMatch in class Refinement<java.util.Calendar>value - the Calendar value to be matched.public final boolean hasMatch(java.util.Calendar value,
                              java.lang.String comparator,
                              java.util.Calendar clauseValue)
value - the value to comparecomparator - the comparator to useclauseValue - the value to compare againstpublic static final java.util.Calendar getNumDaysAsCalendar(int num)
num - number of dayspublic final java.util.Calendar getCalendarSinceNumDays(java.util.Calendar cal)
public static final java.util.Calendar getCalendarSinceNumDays(java.util.Calendar cal,
                                                               java.util.TimeZone timeZone)
cal - representing the operand of SinceNumDays comparatorpublic static final int getNumDays(java.util.Date date)
date - Date object of operand of SinceNumDays comparatorint - value of NumDays