|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.search.refine.Refinement<java.util.Calendar>
oracle.webcenter.search.refine.DateRefinement
public class DateRefinement
A Calendar based refinement that captures a lot of the logic dates go through when used as Refiners for a search.
Nested Class Summary | |
---|---|
static class |
DateRefinement.DateClause |
static interface |
DateRefinement.DateRefinementListener |
Nested classes/interfaces inherited from class oracle.webcenter.search.refine.Refinement |
---|
Refinement.Clause<T> |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 |
Methods inherited from class oracle.webcenter.search.refine.Refinement |
---|
buildName, buildName, getClauses, getCount, getName, getValue, increment, increment, isCurrent, refine, setCount, setCurrent, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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 appliedMethod Detail |
---|
protected 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.ContradictionException
public 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
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |