Interface QueryTreeBuilder

  • All Known Implementing Classes:
    QueryBuilder, QueryBuilder

    public interface QueryTreeBuilder
    Specifies an interface for a query tree builder.
    • Method Detail

      • createQueryTree

        QueryRootNode createQueryTree​(String statement,
                                      NameResolver resolver,
                                      QueryNodeFactory factory)
                               throws InvalidQueryException
        Creates a QueryNode tree from a statement using the passed query node factory.
        statement - the statement.
        resolver - the name resolver to use.
        factory - the query node factory to use.
        the QueryNode tree for the statement.
        InvalidQueryException - if the statement is malformed.
      • canHandle

        boolean canHandle​(String language)
        Returns true if this query tree builder can handle a statement in language.
        language - the language of a query statement to build a query tree.
        true if this builder can handle language; false otherwise.
      • getSupportedLanguages

        String[] getSupportedLanguages()
        Returns the set of query languages supported by this builder.
        String array containing the names of the supported languages.
      • toString

        String toString​(QueryRootNode root,
                        NameResolver resolver)
                 throws InvalidQueryException
        Creates a String representation of the query node tree in the syntax this QueryTreeBuilder can handle.
        root - the root of the query node tree.
        resolver - to resolve Names.
        a String representation of the query node tree.
        InvalidQueryException - if the query node tree cannot be converted into a String representation due to restrictions in this syntax.