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. \\
)
Examples of valid expressions:
- "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)
Examples of non valid expressions:
- "bla ${myAttName" (unclosed expression section)
- "bla } bla" (
}
is reserved, should have been escaped)
- Author:
- Andrea Aime - TOPP
- Module:
modules/library/render (gt-render.jar)
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionExtractor
public ExpressionExtractor()
extractCqlExpressions
public static Expression extractCqlExpressions(String expression)
Copyright © 1996-2009 Geotools. All Rights Reserved.