Class 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 Detail

      • toCQL2Json

        public static JsonNode toCQL2Json​(Filter filter)
        Generates the CQL2-Json predicate associated to the Filter object.
        Returns:
        CQL2-Json predicate
      • toCQL2

        public static String toCQL2​(Filter filter)
        Generates the CQL2-Json predicate as a string associated to the Filter 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 a Filter 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)
        Converts Expression object to JSON String.
        Parameters:
        expression - the expression to convert
        Returns:
        the JSON String
      • toCQL2Json

        public static JsonNode toCQL2Json​(Expression expression)
        Converts Expression 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 to Expression object.
        Parameters:
        cql2Json - the JSON String
        Returns:
        the Expression object
        Throws:
        CQLException - if the JSON String is not valid
        IOException - if an error occurs while parsing the JSON String
        ParseException - if an error occurs while parsing the JSON String