| Modifier and Type | Field and Description |
|---|---|
static QName |
any
A wildcard for labels.
|
static AnyValue |
anyval
The null constraint.
|
static boolean |
C
A marker for condition edges.
|
| Constructor and Description |
|---|
Patterns() |
| Modifier and Type | Method and Description |
|---|---|
static After |
after(Calendar c)
Returns a
After constraint for a given calendar. |
static AfterDate |
afterDate(Date d)
Returns an
AfterDate constraint for a given date. |
static <T> All<T> |
all(Constraint<T> constraint1,
Constraint<T> constraint2)
Returns an
All constraint that combines two or more Constraints. |
static AnyPattern |
any()
The
AnyPattern. |
static AtLeastPattern |
atleast(QName label,
Pattern pattern)
Returns an
AtLeastPattern for a given label and a given Pattern. |
static AtLeastPattern |
atleast(String label,
Pattern pattern)
Returns an
AtLeastPattern for a given label and a given Pattern. |
static Before |
before(Calendar c)
Returns a
Before constraint for a given calendar. |
static BeforeDate |
before(Date d)
Returns a
BeforeDate constraint for a given date. |
static BoolPattern |
bool()
Returns an unconstrained
BoolPattern predicate. |
static BoolPattern |
bool(Constraint<? super Boolean> c)
Returns a
BoolPattern with a given constraint. |
static CalendarPattern |
calendar()
Returns an unconstrained
CalendarPattern. |
static CalendarPattern |
calendar(Constraint<? super Calendar> c)
Returns a
CalendarPatternwith a given constraint. |
static EdgePattern |
clone(EdgePattern pattern)
Clones an
EdgePattern. |
static Pattern |
clone(Pattern pattern)
Clones a
Pattern. |
static EdgePattern |
cond(EdgePattern p)
Marks an
EdgePattern as a condition. |
static CutTreePattern |
cut(TreePattern pattern)
Returns a
CutTreePattern with the EdgePatterns of a given TreePattern but removes all
the edges of a matching node under pruning |
static DatePattern |
date()
Returns an unconstrained
DatePattern. |
static DatePattern |
date(Constraint<? super Date> c)
Returns a
DatePattern with a given constraint. |
static <T> Either<T> |
either(Constraint<T> constraint1,
Constraint<T> constraint2)
Returns an
Either constraint that combines two or more Constraints. |
static After |
future()
Returns an
After constraint for the current date. |
static AfterDate |
futureDate()
Returns an
AfterDate constraint for the current date. |
static Marshaller |
getMarshaller()
Returns a
Marshaller for Patterns. |
static Unmarshaller |
getUnMarshaller()
Returns an
Unmarshaller for Patterns. |
static TreePattern |
hasLabelPath(QName... labels)
Returns a
TreePattern that matches InnerNodes with a path of one or more edge labels. |
static TreePattern |
hasLabelPath(String... labels)
Returns a
TreePattern that matches InnerNodes with a path of one or more edge labels. |
static Pattern |
hasPath(String... ids)
|
static <T extends AbstractPattern> |
id(LeafPattern<?,?> idp,
T p)
Adds a
LeafPattern over the identifier of nodes matched by an AbstractPattern. |
static <T extends AbstractPattern> |
id(String identifier,
T pattern)
Adds a
LeafPattern for text equality over the identifier of nodes matched by a AbstractPattern. |
static <T> Same<T> |
is(T v)
Returns a
Same constraint for a given value. |
static Less |
less(double than)
Returns a
Less constraint for a given value. |
static ManyPattern |
many(QName label,
Pattern pattern)
Returns a
ManyPattern for a given label and a given Pattern. |
static ManyPattern |
many(String label,
Pattern pattern)
Returns a
ManyPattern for a given label and a given Pattern. |
static Match |
matches(String regex)
Returns a
Match constraint for a given regular expression. |
static More |
more(double than)
Returns a
More constraint for a given value. |
static <T> Not<T> |
not(Constraint<T> constraint)
Returns an
Not constraint for a given constraint. |
static NumPattern |
num()
Returns an unconstrained
NumPattern. |
static NumPattern |
num(Constraint<? super Double> c)
Returns a
NumPattern with a given constraint. |
static OnePattern |
one(QName label,
Pattern pattern)
Returns a
OnePattern for a given label and a given Pattern. |
static OnePattern |
one(String label,
Pattern pattern)
Returns a
OnePattern for a given label and a given Pattern. |
static OnlyPattern |
only(QName label,
Pattern pattern)
Returns an
OnlyPattern for a given label and a given Pattern. |
static OnlyPattern |
only(String label,
Pattern pattern)
Returns an
OnlyPattern for a given label and a given Pattern. |
static OptPattern |
opt(QName label,
Pattern pattern)
Returns an
OptPattern for a given label and a given Pattern. |
static OptPattern |
opt(String label,
Pattern pattern)
Returns an
OptPattern for a given label and a given Pattern. |
static Before |
past()
Returns an
Before constraint for the current date. |
static BeforeDate |
pastDate()
Returns a
BeforeDate constraint for the current date. |
static ManyPattern |
tail()
Returns a
ManyPattern that matches all the children of a node not previously matched by the EdgePatterns of a TreePattern. |
static TextPattern |
text()
Returns an unconstrained
TextPattern. |
static TextPattern |
text(Constraint<? super String> constraint)
Returns a
TextPattern with a given constraint. |
static TreePattern |
tree(EdgePattern... patterns)
Returns a
TreePattern with one or more EdgePatterns. |
static URIPattern |
uri()
Returns an unconstrained
URIPattern. |
static URIPattern |
uri(Constraint<? super URI> c)
Returns a
URIPattern with a given constraint. |
public static final QName any
public static final boolean C
public static final AnyValue anyval
public static Marshaller getMarshaller() throws JAXBException
Marshaller for Patterns.MarshallerJAXBException - if the Marshaller could not be returned.public static Unmarshaller getUnMarshaller() throws JAXBException
Unmarshaller for Patterns.UnmarshallerJAXBException - if the Unmarshaller could not be returned.public static final AnyPattern any()
AnyPattern.public static final Pattern clone(Pattern pattern) throws Exception
Pattern.pattern - the pattern to cloneException - if the pattern could not be clonedpublic static final EdgePattern clone(EdgePattern pattern) throws Exception
EdgePattern.pattern - the pattern to cloneException - if the pattern could not be clonedpublic static final TreePattern tree(EdgePattern... patterns)
TreePattern with one or more EdgePatterns.patterns - the EdgePatternsTreePatternpublic static final Pattern hasPath(String... ids) throws IllegalArgumentException
ids - the identifiersIllegalArgumentException - if it is invoked with null or no inputpublic static final TreePattern hasLabelPath(String... labels) throws IllegalArgumentException
TreePattern that matches InnerNodes with a path of one or more edge labels.labels - the local names of the labels.IllegalArgumentException - if it is invoked with null or no input.public static final TreePattern hasLabelPath(QName... labels) throws IllegalArgumentException
TreePattern that matches InnerNodes with a path of one or more edge labels.labels - the local names of the labels.IllegalArgumentException - if it is invoked with null or no input.public static EdgePattern cond(EdgePattern p)
EdgePattern as a condition.p - the patternpublic static final <T extends AbstractPattern> T id(LeafPattern<?,?> idp, T p)
LeafPattern over the identifier of nodes matched by an AbstractPattern.idp - the LeafPatternp - the AbstractPatternAbstractPattern obtained from the original AbstractPattern by adding the LeafPatternpublic static final <T extends AbstractPattern> T id(String identifier, T pattern)
LeafPattern for text equality over the identifier of nodes matched by a AbstractPattern.identifier - the string to compare with node identifierspattern - the AbstractPatternAbstractPattern obtained from the original TreePattern by adding the AbstractPatternpublic static final OnePattern one(QName label, Pattern pattern)
OnePattern for a given label and a given Pattern.label - the labelpattern - the patternOnePatternpublic static final OnePattern one(String label, Pattern pattern)
OnePattern for a given label and a given Pattern.label - the labelpattern - the patternOnePatternpublic static final OptPattern opt(QName label, Pattern pattern)
OptPattern for a given label and a given Pattern.label - the labelpattern - the patternOptPatternpublic static final OptPattern opt(String label, Pattern pattern)
OptPattern for a given label and a given Pattern.label - the labelpattern - the patternOptPatternpublic static final AtLeastPattern atleast(QName label, Pattern pattern)
AtLeastPattern for a given label and a given Pattern.label - the labelpattern - the PatternAtLeastPatternpublic static final AtLeastPattern atleast(String label, Pattern pattern)
AtLeastPattern for a given label and a given Pattern.label - the labelpattern - the PatternAtLeastPatternpublic static final ManyPattern many(QName label, Pattern pattern)
ManyPattern for a given label and a given Pattern.label - the labelpattern - the Pattern.ManyPattern.public static final ManyPattern many(String label, Pattern pattern)
ManyPattern for a given label and a given Pattern.label - the labelpattern - the Pattern.ManyPattern.public static final OnlyPattern only(QName label, Pattern pattern)
OnlyPattern for a given label and a given Pattern.label - the labelpattern - the PatternOnlyPatternpublic static final OnlyPattern only(String label, Pattern pattern)
OnlyPattern for a given label and a given Pattern.label - the labelpattern - the PatternOnlyPatternpublic static ManyPattern tail()
ManyPattern that matches all the children of a node not previously matched by the EdgePatterns of a TreePattern.public static CutTreePattern cut(TreePattern pattern)
CutTreePattern with the EdgePatterns of a given TreePattern but removes all
the edges of a matching node under pruningpattern - the PatternCutTreePatternpublic static TextPattern text(Constraint<? super String> constraint)
TextPattern with a given constraint.constraint - the constraintTextPatternpublic static TextPattern text()
TextPattern.TextPatternpublic static NumPattern num(Constraint<? super Double> c)
NumPattern with a given constraint.c - the constraintNumPatternpublic static NumPattern num()
NumPattern.NumPatternpublic static BoolPattern bool(Constraint<? super Boolean> c)
BoolPattern with a given constraint.c - the constraintBoolPatternpublic static BoolPattern bool()
BoolPattern predicate.BoolPatternpublic static DatePattern date(Constraint<? super Date> c)
DatePattern with a given constraint.c - the constraintDatePatternpublic static DatePattern date()
DatePattern.DatePatternpublic static URIPattern uri(Constraint<? super URI> c)
URIPattern with a given constraint.c - the constraintURIPatternpublic static URIPattern uri()
URIPattern.URIPatternpublic static CalendarPattern calendar(Constraint<? super Calendar> c)
CalendarPatternwith a given constraint.c - the constraintCalendarPatternpublic static CalendarPattern calendar()
CalendarPattern.CalendarPatternpublic static <T> Same<T> is(T v)
Same constraint for a given value.v - the valuepublic static Match matches(String regex)
Match constraint for a given regular expression.regex - the expressionpublic static <T> All<T> all(Constraint<T> constraint1, Constraint<T> constraint2)
All constraint that combines two or more Constraints.T - the type of constrained valuesconstraint1 - the first constraintconstraint2 - the second constraintAll constraintpublic static <T> Either<T> either(Constraint<T> constraint1, Constraint<T> constraint2)
Either constraint that combines two or more Constraints.T - the type of constrained valuesconstraint1 - the first constraintconstraint2 - the second constraintEither constraintpublic static <T> Not<T> not(Constraint<T> constraint)
Not constraint for a given constraint.T - the type of constrained valuesconstraint - the constraintNot constraintpublic static More more(double than)
More constraint for a given value.than - the valuepublic static Less less(double than)
Less constraint for a given value.than - the valuepublic static BeforeDate before(Date d)
BeforeDate constraint for a given date.d - the datepublic static AfterDate afterDate(Date d)
AfterDate constraint for a given date.d - the datepublic static AfterDate futureDate()
AfterDate constraint for the current date.public static BeforeDate pastDate()
BeforeDate constraint for the current date.public static Before before(Calendar c)
Before constraint for a given calendar.c - the calendarpublic static After after(Calendar c)
After constraint for a given calendar.c - the calendarpublic static After future()
After constraint for the current date.Copyright © 2017. All Rights Reserved.