Class Search


  • public final class Search
    extends java.lang.Object
    Search is the lexical token parsing component of the search argument system. Search is responsible for interpreting textual search queries during argument parsing. The structures represented by the Search class are transformed into database-friendly clauses by a SearchHandler, using its SearchArgumentHandler bindings, which are defined by implementors of the API.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Search EMPTY  
    • Method Summary

      Modifier and Type Method Description
      Search.LexicalClause getLexicalClause()
      Gets the root lexical clause encapsulated by this Search instance.
      java.util.Collection<Search.Order> getOrders()
      Gets the orders that this search has.
      int getPage()  
      static Search parse​(java.lang.String queryString)
      Lexically parses a queryString and forms a machine-readable clause structure from the input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMPTY

        public static final Search EMPTY
    • Method Detail

      • getOrders

        public java.util.Collection<Search.Order> getOrders()
        Gets the orders that this search has.
        Returns:
        collection of order statements.
      • getLexicalClause

        public Search.LexicalClause getLexicalClause()
        Gets the root lexical clause encapsulated by this Search instance.
        Returns:
        root lexical clause.
      • getPage

        public int getPage()
      • parse

        public static Search parse​(java.lang.String queryString)
                            throws java.lang.IllegalArgumentException
        Lexically parses a queryString and forms a machine-readable clause structure from the input. Most of the processing logical processing itself occurs in private class ClauseParser, as the string itself is a clause.
        Parameters:
        queryString - query string to parse.
        Returns:
        Search object, encapsulating the Clause structure.
        Throws:
        java.lang.IllegalArgumentException - if there was a problem interpreting the given query string.