Class SearchStringParser


  • public class SearchStringParser
    extends java.lang.Object
    Parses search strings entered by the user.
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchStringParser​(java.lang.String searchString, java.util.Map<java.lang.String,​ResultSetColumn> availableColumns)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSimpleString()  
      boolean isSimpleString()
      Checks if the search string is just a simple string and does not define one or more column/value pairs.
      java.util.Map<java.lang.String,​java.lang.String> parse()
      Parses the string.
      • Methods inherited from class java.lang.Object

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

      • SearchStringParser

        public SearchStringParser​(java.lang.String searchString,
                                  java.util.Map<java.lang.String,​ResultSetColumn> availableColumns)
        Constructor.
        Parameters:
        searchString - string to parse
        availableColumns - map with all available columns and their labels
    • Method Detail

      • isSimpleString

        public boolean isSimpleString()
        Checks if the search string is just a simple string and does not define one or more column/value pairs.
        Returns:
        true if no column/value pairs exist
      • parse

        public java.util.Map<java.lang.String,​java.lang.String> parse()
                                                                     throws SearchSyntaxException
        Parses the string.
        Returns:
        Map containing column, filter pairs.
        Throws:
        SearchSyntaxException - on syntax error