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 StringtoCQL2(Expression expression) ConvertsExpressionobject to JSON String.static StringGenerates the CQL2-Json predicate as a string associated to theFilterobject.static JsonNodetoCQL2Json(Expression expression) ConvertsExpressionobject to JsonNode.static JsonNodetoCQL2Json(Filter filter) Generates the CQL2-Json predicate associated to theFilterobject.static ExpressiontoExpression(String cql2Json) Converts JSON String toExpressionobject.static FilterConverts CQL2-Json to aFilterobject.
-
Method Details
-
toCQL2Json
Generates the CQL2-Json predicate associated to theFilterobject.- Returns:
- CQL2-Json predicate
-
toCQL2
Generates the CQL2-Json predicate as a string associated to theFilterobject.- Parameters:
filter- the filter to convert- Returns:
- the CQL2-Json predicate as a string
-
toFilter
Converts CQL2-Json to aFilterobject.- Parameters:
cql2Json- CQL2-Json predicate- Returns:
Filterobject- Throws:
CQLException- if the CQL2-Json predicate is not valid
-
toCQL2
ConvertsExpressionobject to JSON String.- Parameters:
expression- the expression to convert- Returns:
- the JSON String
-
toCQL2Json
ConvertsExpressionobject 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 toExpressionobject.- Parameters:
cql2Json- the JSON String- Returns:
- the
Expressionobject - 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
-