Package org.geotools.renderer.style
Class ExpressionExtractor
- Object
-
- ExpressionExtractor
-
public class ExpressionExtractor extends Object
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
- whatever is between
-
-
Constructor Summary
Constructors Constructor Description ExpressionExtractor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanExpressionCache()
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
-
-
-
Method Detail
-
extractCqlExpressions
public static 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
-
cleanExpressionCache
public static void cleanExpressionCache()
Clears the CQL expression cache
-
-