Package org.geotools.filter.text.cqljson
Class CQL2Json
- Object
-
- CQL2Json
-
public class CQL2Json extends Object
OGC API CQL2-Json. This class presents the operations available to convert filters into the CQL2-Json language
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
toCQL2(Expression expression)
ConvertsExpression
object to JSON String.static String
toCQL2(Filter filter)
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
toFilter(String cql2Json)
Converts CQL2-Json to aFilter
object.
-
-
-
Method Detail
-
toCQL2Json
public static JsonNode toCQL2Json(Filter filter)
Generates the CQL2-Json predicate associated to theFilter
object.- Returns:
- CQL2-Json predicate
-
toCQL2
public static String toCQL2(Filter filter)
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
public static Filter toFilter(String cql2Json) throws CQLException
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
public static String toCQL2(Expression expression)
ConvertsExpression
object to JSON String.- Parameters:
expression
- the expression to convert- Returns:
- the JSON String
-
toCQL2Json
public static JsonNode toCQL2Json(Expression expression)
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
-
-