Class SearchStringParser

java.lang.Object
com.saperion.ngc.resultset.SearchStringParser

public class SearchStringParser extends Object
Parses search strings entered by the user.
  • Constructor Details

    • SearchStringParser

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

    • 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
    • getSimpleString

      public String getSimpleString() throws SearchSyntaxException
      Returns:
      the search string without escape characters.
      Throws:
      SearchSyntaxException - when the string is too short
    • parse

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