Package org.geotools.filter.text.commons
Class ExpressionToText
- Object
-
- ExpressionToText
-
- All Implemented Interfaces:
ExpressionVisitor
- Direct Known Subclasses:
CQL2ExpressionToText
public class ExpressionToText extends Object implements ExpressionVisitor
This class is responsible to convert an expression to a CQL/ECQL valid expression.Warning: This component is not published. It is part of module implementation. Client module should not use this feature.
- Author:
- Mauricio Pazos
-
-
Constructor Summary
Constructors Constructor Description ExpressionToText()
Default constructor.ExpressionToText(boolean encodeEWKT)
Builds anExpressionToText
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringBuilder
dateToText(Date date, StringBuilder output)
Uses the formatyyyy-MM-dd'T'HH:mm:ss'[+|-]##:##'
for output the provided date.protected StringBuilder
periodToText(Period period, StringBuilder output)
protected boolean
propertyNeedsDelimiters(PropertyName name)
Object
visit(Add expression, Object extraData)
Object
visit(Divide expression, Object extraData)
Object
visit(Function function, Object extraData)
Object
visit(Literal expression, Object extraData)
Object
visit(Multiply expression, Object extraData)
Object
visit(NilExpression expression, Object extraData)
Used to visit a Expression.NIL, also called fornull
where an expression is expected.Object
visit(PropertyName expression, Object extraData)
Object
visit(Subtract expression, Object extraData)
-
-
-
Constructor Detail
-
ExpressionToText
public ExpressionToText()
Default constructor. The behavior of EWKT encoding is controlled by theHints.ENCODE_EWKT
hint
-
ExpressionToText
public ExpressionToText(boolean encodeEWKT)
Builds anExpressionToText
- Parameters:
encodeEWKT
- When true, it will encodeGeometry
as EWKT when aCoordinateReferenceSystem
object is found as the geometry user data
-
-
Method Detail
-
dateToText
public StringBuilder dateToText(Date date, StringBuilder output)
Uses the formatyyyy-MM-dd'T'HH:mm:ss'[+|-]##:##'
for output the provided date.- Returns:
- output
-
visit
public Object visit(NilExpression expression, Object extraData)
Description copied from interface:ExpressionVisitor
Used to visit a Expression.NIL, also called fornull
where an expression is expected.This is particularly useful when doing data transformations, as an example when using a StyleSymbolizer Expression.NIL can be used to represent the default stroke color.
- Specified by:
visit
in interfaceExpressionVisitor
- Returns:
- implementation specific
-
visit
public Object visit(Add expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Divide expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Function function, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(Literal expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
periodToText
protected StringBuilder periodToText(Period period, StringBuilder output)
-
visit
public Object visit(Multiply expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
visit
public Object visit(PropertyName expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
propertyNeedsDelimiters
protected boolean propertyNeedsDelimiters(PropertyName name)
-
visit
public Object visit(Subtract expression, Object extraData)
- Specified by:
visit
in interfaceExpressionVisitor
-
-