Package org.geotools.filter.text.cqljson
Class CQL2Json
Object
CQL2Json
OGC API CQL2-Json. This class presents the operations available to convert filters into the CQL2-Json language
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
toCQL2
(Expression expression) ConvertsExpression
object to JSON String.static String
Generates the CQL2-Json predicate as a string associated to theFilter
object.static JsonNode
toCQL2Json
(Expression expression) ConvertsExpression
object to JsonNode.static JsonNode
toCQL2Json
(Filter filter) Generates the CQL2-Json predicate associated to theFilter
object.static Expression
toExpression
(String cql2Json) Converts JSON String toExpression
object.static Filter
Converts CQL2-Json to aFilter
object.
-
Method Details
-
toCQL2Json
Generates the CQL2-Json predicate associated to theFilter
object.- Returns:
- CQL2-Json predicate
-
toCQL2
Generates the CQL2-Json predicate as a string associated to theFilter
object.- Parameters:
filter
- the filter to convert- Returns:
- the CQL2-Json predicate as a string
-
toFilter
Converts CQL2-Json to aFilter
object.- Parameters:
cql2Json
- CQL2-Json predicate- Returns:
Filter
object- Throws:
CQLException
- if the CQL2-Json predicate is not valid
-
toCQL2
ConvertsExpression
object to JSON String.- Parameters:
expression
- the expression to convert- Returns:
- the JSON String
-
toCQL2Json
ConvertsExpression
object to JsonNode.- Parameters:
expression
- the expression to convert- Returns:
- the JsonNode
-
toExpression
public static Expression toExpression(String cql2Json) throws CQLException, IOException, ParseException Converts JSON String toExpression
object.- Parameters:
cql2Json
- the JSON String- Returns:
- the
Expression
object - Throws:
CQLException
- if the JSON String is not validIOException
- if an error occurs while parsing the JSON StringParseException
- if an error occurs while parsing the JSON String
-