public class YPredicateParser
extends java.lang.Object
Constructor and Description |
---|
YPredicateParser() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
dateTimeString(long time)
Converts a time value to a full date & time string
|
protected java.lang.String |
evaluateQuery(java.lang.String s,
Element data)
Evaluates an XQuery embedded within a delimited expression
|
protected java.lang.String |
evaluateXQuery(java.lang.String s,
Document dataDoc) |
protected java.lang.String |
evaluateXQuery(java.lang.String s,
Element data)
Evaluates an XQuery
|
protected java.lang.String |
getAttributeValue(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String s)
Extracts a key from the delimited expression passed, then seeks the value
corresponding to that key from the map passed
|
protected java.lang.String |
namesToCSV(java.util.Set<java.lang.String> names)
Transforms a Set of Strings into a string of comma separated values
|
java.lang.String |
parse(java.lang.String s)
Parses a string, replacing substrings within of the form ${expression} with the
result of the expression evaluation
|
protected java.lang.String |
stripDelimiters(java.lang.String s)
removes the surrounding ${...} from a String
|
protected java.lang.String |
valueOf(java.lang.String s)
Evaluates an expression and returns the result.
|
public java.lang.String parse(java.lang.String s)
s
- the string to parseprotected java.lang.String valueOf(java.lang.String s)
s
- the string representing the expression, of the form ${expression}protected java.lang.String dateTimeString(long time)
time
- the time valueprotected java.lang.String getAttributeValue(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String s)
map
- a map of String pairss
- a string representing an expression, of the form ${expression:key},
containing the keyprotected java.lang.String namesToCSV(java.util.Set<java.lang.String> names)
names
- the Set of Strings to transformprotected java.lang.String evaluateQuery(java.lang.String s, Element data)
s
- the delimited expression, either of the form ${query} or ${expression:query}data
- XML'd data that may be referenced by the expression. May be null if
the expression doesn't reference any dataprotected java.lang.String evaluateXQuery(java.lang.String s, Element data)
s
- the query expressiondata
- XML'd data that may be referenced by the expression. May be null if
the expression doesn't reference any dataprotected java.lang.String evaluateXQuery(java.lang.String s, Document dataDoc)
protected java.lang.String stripDelimiters(java.lang.String s)
s
- the delimited StringCopyright © 2004-2014 The YAWL Foundation.