Package org.geotools.renderer.style
Class ExpressionExtractor
Object
ExpressionExtractor
Helper class that allows the extraction of CQL expressions out of a plain text string using special separators.
Parsing rules are:
- whatever is between
${
and}
is considered a CQL expression $
and}
can be used stand alone only escaped with\
(e.g.\$
and\}
)\
can be used stand alone only escaped with another\
(e.g.\\
)
- "one two three \} \$ \\" (simple literal with special chars escaped)
- "My name is ${name}" (a simple attribute reference)
- "Hi this is ${(intAtt + 2) * 10}" (cql using attribute and math expressions)
- "bla ${myAttName" (unclosed expression section)
- "bla } bla" (
}
is reserved, should have been escaped)
- Author:
- Andrea Aime - TOPP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears the CQL expression cachestatic Expression
extractCqlExpressions
(String expression) Builds a CQL expression equivalent to the specified string, see class javadocs for rules on how to build the expression in string form
-
Constructor Details
-
ExpressionExtractor
public ExpressionExtractor()
-
-
Method Details
-
extractCqlExpressions
Builds a CQL expression equivalent to the specified string, see class javadocs for rules on how to build the expression in string form -
cleanExpressionCache
public static void cleanExpressionCache()Clears the CQL expression cache
-