Class QueryCanonicalizer


  • public class QueryCanonicalizer
    extends Object
    Query normalizer and sanity checker.
    Author:
    bratseth
    • Field Detail

      • queryCanonicalization

        public static final String queryCanonicalization
        The name of the operation performed by this, for use in search chain ordering
        See Also:
        Constant Field Values
    • Constructor Detail

      • QueryCanonicalizer

        public QueryCanonicalizer()
    • Method Detail

      • canonicalize

        public static String canonicalize​(Query query)
        Validates this query and carries out possible operations on this query which simplifies it without changing its semantics.
        Returns:
        null if the query is valid, an error message if it is invalid
      • canonicalize

        public static String canonicalize​(QueryTree query)
        Canonicalizes this query
        Returns:
        null if the query is valid, an error message if it is invalid