|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.9.0) E15995-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.search.util.PredicateUtils
public class PredicateUtils
This class provides some utility methods around Predicates that developers may find useful.
Constructor Summary | |
---|---|
PredicateUtils() |
Method Summary | ||
---|---|---|
static
|
addAttributePredicate(Predicate predicate, QName attrName, java.lang.String comparator, T attrValue) Joins new attribute predicates with an existing one, returning the joined result. |
|
static
|
addAttributePredicate(Predicate predicate, QName attrName, java.lang.String comparator, T attrValue, ComplexPredicate.ConjunctionOp conjunctionOp) Joins new attribute predicates with an existing one, returning the joined result. |
|
static void |
convertAllSinceNumDaysComparator(Predicate predicate, java.util.TimeZone timeZone) Convert all SinceNumDays comparators and their operands in the predicate tree |
|
static void |
filterTextPredicate(Predicate predicate, java.lang.String filterString) Filter text predicate by the filterString which is a regular expression. |
|
static
|
findPredicates(java.lang.Class<T> type, Predicate predicate) Returns a list of Predicates that matches the class passed in. |
|
static void |
flatten(ComplexPredicate predicate) Compacts the ComplexPredicate by flattening. |
|
static java.util.List<ComplexPredicate> |
getAttributePredicateParents(Predicate predicate, QName attributeName) Returns a list of parents of the given attribute predicate |
|
static
|
getFirst(java.lang.Class<T> type, Predicate predicate) Extracts the first Predicate it finds in the descendents of a Predicate that matches the type passed in. |
|
static java.lang.String |
getFirstKeywordsFromPredicate(Predicate predicate) Extracts the first keywords it finds in the Predicate by looking into TextPredicates. |
|
static java.lang.String |
getQueryPredicateScope(Predicate predicate) Get scope from query predicate. |
|
static boolean |
isQueryPredicateExecutable(Predicate predicate, java.lang.String serviceId, boolean singleScope) Determine if the query is executable by analyzing the Query Predicate predicate top predicate of the query serviceId service Id to see if there is match in the service Id attribute predicate singleScope boolean to specify if only single scope is supported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PredicateUtils()
Method Detail |
---|
public static final java.lang.String getFirstKeywordsFromPredicate(Predicate predicate)
predicate
- a Predicate that can be either Text of Complex.public static final <T extends Predicate> Predicate getFirst(java.lang.Class<T> type, Predicate predicate)
type
- The Class object we want to match from the descendents of the passed in predicatepredicate
- the Predicate whose descendents (via ComplexPredicate) we wish to discover Predicates of the type passed inpublic static final java.util.List<ComplexPredicate> getAttributePredicateParents(Predicate predicate, QName attributeName)
public static final <T extends Predicate> java.util.List<T> findPredicates(java.lang.Class<T> type, Predicate predicate)
type
- The Class object we want to match from the descendents of the passed in predicatepredicate
- the Predicate whose descendents (via ComplexPredicate) we wish to discover Predicates of the type passed inpublic static final void flatten(ComplexPredicate predicate)
predicate
- the ComplexPredicate to be flattenedpublic static void convertAllSinceNumDaysComparator(Predicate predicate, java.util.TimeZone timeZone)
predicate
- of the querypublic static void filterTextPredicate(Predicate predicate, java.lang.String filterString)
predicate
- of the queryfilterString
- the regular expression String to filter the text in the predicate by.public static <T> Predicate addAttributePredicate(Predicate predicate, QName attrName, java.lang.String comparator, T attrValue)
predicate
- The existing predicate to add this new attribute predicate toattrName
- the name of the attributecomparator
- the comparator of the predicateattrValue
- the value used in the predicate onepublic static <T> Predicate addAttributePredicate(Predicate predicate, QName attrName, java.lang.String comparator, T attrValue, ComplexPredicate.ConjunctionOp conjunctionOp)
predicate
- The existing predicate to add this new attribute predicate toattrName
- the name of the attributecomparator
- the comparator of the predicateattrValue
- the value used in the predicateconjunctionOp
- how to join the new attribute predicate with the old onepublic static boolean isQueryPredicateExecutable(Predicate predicate, java.lang.String serviceId, boolean singleScope)
public static java.lang.String getQueryPredicateScope(Predicate predicate)
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.9.0) E15995-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |