gov.ornl.mercury3.services

## Class Mercury3_EditBoxParser

- java.lang.Object
- - gov.ornl.mercury3.services.Mercury3_EditBoxParser

-     public class Mercury3_EditBoxParser
      extends Object

  Mercury3_EditBoxParser is a class which is intended to allow making changes to a string retrieved from an edit box which might contain one or more quoted selections and one or more boolean operators which might need to be uppercased. Only those operators which are NOT quoted will be changed. The list of words to be uppercased is embedded. ( currently and,or). a string of Control characters which need escaping is also embedded. This change also is ONLY applied to those tokens NOT inside quotes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mercury3_EditBoxParser(String aSearchText)`
    `Mercury3_EditBoxParser(String aSearchText, String afacet)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getStringwithBools(List<Tokenz> ltz)` test string :"land cover" or landcover and global fails...zero for nbii from advanced:title test string :("land cover" or landcover) and global returns 6
    `static void` | `main(String... aArguments)` main method included to allow testing using fixed string.
    `List<Tokenz>` | `parseSearchText_adv()`
    `List<Tokenz>` | `parseSearchText()` Builds an ArrayList of Tokenz objects using a class scoped String initialized by constructor
    `List<Tokenz>` | `parseSearchText(String querystring)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Mercury3_EditBoxParser

          public Mercury3_EditBoxParser(String aSearchText)

    - #### Mercury3_EditBoxParser

          public Mercury3_EditBoxParser(String aSearchText,
                                String afacet)

  - ### Method Detail

    - #### main

          public static void main(String... aArguments)

      main method included to allow testing using fixed string. the () which are NOT inside the quotes will be escaped Usage: Mercury3_EditBoxParser parser = new Mercury3_EditBoxParser(String); List ltz = parser.parseSearchText(); String fragment = parser.getStringwithBools( ltz);

    - #### getStringwithBools

          public String getStringwithBools(List<Tokenz> ltz)

      test string :"land cover" or landcover and global fails...zero for nbii from advanced:title test string :("land cover" or landcover) and global returns 6
      Parameters:
        `ltz` -
      Returns:
        formatted query string for solr

    - #### parseSearchText

          public List<Tokenz> parseSearchText()

      Builds an ArrayList of Tokenz objects using a class scoped String initialized by constructor

    - #### parseSearchText

          public List<Tokenz> parseSearchText(String querystring)

    - #### parseSearchText_adv

          public List<Tokenz> parseSearchText_adv()

Copyright © 2016. All rights reserved.