gov.ornl.mercury3.web

## Class SolrClientController

- java.lang.Object
- - org.springframework.context.support.ApplicationObjectSupport
  - - org.springframework.web.context.support.WebApplicationObjectSupport
    - - org.springframework.web.servlet.support.WebContentGenerator
      - - org.springframework.web.servlet.mvc.AbstractController
        - - org.springframework.web.servlet.mvc.multiaction.MultiActionController
          - - gov.ornl.mercury3.web.SolrClientController

- All Implemented Interfaces:
    org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller, org.springframework.web.servlet.mvc.LastModified

      public class SolrClientController
      extends org.springframework.web.servlet.mvc.multiaction.MultiActionController

  Super class for all the Mercury3 Web Application Controllers.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Map<String,String>` | `datasourceMapNames` Hashmap of names -vs- datasources .
    `boolean` | `debug` Boolean flag which controls database access (must be true for db usage).
    `String` | `fromEMAIL` Email address which will show up as the "from in error email notifications"
    `boolean` | `singletonFullView` Boolean switch for returning full -vs- brief page if response size equals one.
    `String` | `solrdb` Full path to the MySQL database for this Instance as parsed from the XML.
    `String` | `solrSelectURL` Full URL for accessing the SOLR Index for the current mercury Instance, as parsed from XML file.
    `HashMap<String,String>` | `term1Map` Hash map containing the term1 attribute constraints.
    `HashMap<String,String>` | `termMap` Local holder for the allowed terms and map to full names for the view.
    `String` | `toEMAIL` Email To address for error notifications
    `boolean` | `transformFullPage` Boolean flag which controls fullPage display behavior (must be true for transforms to be employed).

    - ### Fields inherited from class org.springframework.web.servlet.mvc.multiaction.MultiActionController

      `DEFAULT_COMMAND_NAME, LAST_MODIFIED_METHOD_SUFFIX, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger`

    - ### Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator

      `METHOD_GET, METHOD_HEAD, METHOD_POST`

    - ### Fields inherited from class org.springframework.context.support.ApplicationObjectSupport

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrClientController()` Instantiates a new solr client controller.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `build_base_request(Search_Terms st)` Builds an embeddable querystring from the terms contained in the search_terms object.
    `org.springframework.web.servlet.ModelAndView` | `echoOpenSearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Echo OpenSearch.
    `org.springframework.web.servlet.ModelAndView` | `esip_opensearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, EsipOpenSearchBean esip)`
    `org.springframework.web.servlet.ModelAndView` | `facetsQuerry2(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Facets querry2.
    `Search_Terms` | `get_base_st(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Constructs a search_terms object by parsing the request.
    `void` | `get_solr_json(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Gets the JSON Array for a web based tree node using a HttpServletResponse writer object .
    `void` | `get_TM_json(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Gets the JSON Array for a TimeMap using a HttpServletResponse writer object .
    `String` | `getPageNavBar(int tCurPage, int tPageSize, int tRsSize, int tPageCnt, String tPrevText, String tNextText, String pageName)`
    `String` | `getPageNavBar(int tCurPage, int tPageSize, int tRsSize, int tPageCnt, String tPrevText, String tNextText, String pageName, String mercury3_query_string, Search_Terms st)` Gets the page nav bar.
    `org.springframework.web.servlet.ModelAndView` | `lpdaac_granule_opensearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, OpenSearchBean opensearch)`
    `org.springframework.web.servlet.ModelAndView` | `multiple_facets(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
    `ArrayList` | `nu_get_base_st(javax.servlet.http.HttpServletRequest request, String PathInfo)` Nu_get_base_st.
    `org.springframework.web.servlet.ModelAndView` | `opensearch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, OpenSearchBean opensearch)`
    `org.springframework.web.servlet.ModelAndView` | `processCustomMLT(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Process custom mlt.
    `org.springframework.web.servlet.ModelAndView` | `processCustomRss(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Process custom rss.
    `org.springframework.web.servlet.ModelAndView` | `processRss(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Process rss.
    `org.springframework.web.servlet.ModelAndView` | `query(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Entry point for the Mercury Querying process.
    `org.springframework.web.servlet.ModelAndView` | `referralReDirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SolrTransactionDetail solrTransactionDetail)` Referral re direct.
    `org.springframework.web.servlet.ModelAndView` | `results_navigation2(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Results_navigation2.
    `org.springframework.web.servlet.ModelAndView` | `solrPass(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Solr pass through to avoid same origin policy restrictions on xhr calls to solr when mercury is running on another host than the index.
    `org.springframework.web.servlet.ModelAndView` | `xsltText2(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Xslt text2.

    - ### Methods inherited from class org.springframework.web.servlet.mvc.multiaction.MultiActionController

      `bind, createBinder, getCommandName, getExceptionHandler, getLastModified, getMethodNameResolver, getValidators, getWebBindingInitializer, handleNoSuchRequestHandlingMethod, handleRequestInternal, initBinder, initBinder, invokeNamedMethod, newCommandObject, setDelegate, setMethodNameResolver, setValidators, setWebBindingInitializer`

    - ### Methods inherited from class org.springframework.web.servlet.mvc.AbstractController

      `handleRequest, isSynchronizeOnSession, setSynchronizeOnSession`

    - ### Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator

      `applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader`

    - ### Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport

      `getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext`

    - ### Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

      `getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext`

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

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

- - ### Field Detail

    - #### toEMAIL

          public String toEMAIL

      Email To address for error notifications

    - #### fromEMAIL

          public String fromEMAIL

      Email address which will show up as the "from in error email notifications"

    - #### debug

          public boolean debug

      Boolean flag which controls database access (must be true for db usage).

    - #### transformFullPage

          public boolean transformFullPage

      Boolean flag which controls fullPage display behavior (must be true for transforms to be employed). First created for DataOne

    - #### singletonFullView

          public boolean singletonFullView

      Boolean switch for returning full -vs- brief page if response size equals one.

    - #### termMap

          public HashMap<String,String> termMap

      Local holder for the allowed terms and map to full names for the view.

    - #### term1Map

          public HashMap<String,String> term1Map

      Hash map containing the term1 attribute constraints.

    - #### datasourceMapNames

          public Map<String,String> datasourceMapNames

      Hashmap of names -vs- datasources .

    - #### solrdb

          public String solrdb

      Full path to the MySQL database for this Instance as parsed from the XML.

    - #### solrSelectURL

          public String solrSelectURL

      Full URL for accessing the SOLR Index for the current mercury Instance, as parsed from XML file.

  - ### Constructor Detail

    - #### SolrClientController

          public SolrClientController()

      Instantiates a new solr client controller.

  - ### Method Detail

    - #### solrPass

          public org.springframework.web.servlet.ModelAndView solrPass(javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)
                                                                throws Exception

      Solr pass through to avoid same origin policy restrictions on xhr calls to solr when mercury is running on another host than the index. Forwards original request to solr and returns the response.
      Parameters:
        `request` -
        `response` -
      Returns:
      Throws:
        `Exception`

    - #### get_solr_json

          public void get_solr_json(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp)
                             throws Exception

      Gets the JSON Array for a web based tree node using a HttpServletResponse writer object .
      Parameters:
        `req` - the HttpServletRequest
        `resp` - the HttpServletResponse
      Throws:
        `Exception` - the exception

    - #### get_TM_json

          public void get_TM_json(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                           throws Exception

      Gets the JSON Array for a TimeMap using a HttpServletResponse writer object .
      Parameters:
        `req` - the HttpServletRequest
        `resp` - the HttpServletResponse
      Throws:
        `Exception` - the exception

    - #### query

          public org.springframework.web.servlet.ModelAndView query(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                             throws Exception

      Entry point for the Mercury Querying process.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### facetsQuerry2

          public org.springframework.web.servlet.ModelAndView facetsQuerry2(javax.servlet.http.HttpServletRequest request,
                                                                   javax.servlet.http.HttpServletResponse response)
                                                                     throws Exception

      Facets querry2.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### results_navigation2

          public org.springframework.web.servlet.ModelAndView results_navigation2(javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response)
                                                                           throws Exception

      Results_navigation2.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### xsltText2

          public org.springframework.web.servlet.ModelAndView xsltText2(javax.servlet.http.HttpServletRequest request,
                                                               javax.servlet.http.HttpServletResponse response)
                                                                 throws Exception

      Xslt text2.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception modified 10/2011 add switch logic for full page transforms jmg

    - #### referralReDirect

          public org.springframework.web.servlet.ModelAndView referralReDirect(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response,
                                                                      SolrTransactionDetail solrTransactionDetail)
                                                                        throws Exception

      Referral re direct.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
        `solrTransactionDetail` - the solr transaction detail
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### esip_opensearch

          public org.springframework.web.servlet.ModelAndView esip_opensearch(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     EsipOpenSearchBean esip)
                                                                       throws Exception

      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
        `esip` - command bean with the request params
      Returns:
        A Spring Framework ModelAndView object, containing the formatted response.
      Throws:
        `Exception`

    - #### opensearch

          public org.springframework.web.servlet.ModelAndView opensearch(javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response,
                                                                OpenSearchBean opensearch)
                                                                  throws Exception

      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
        `opensearch` - command bean with the validated request params
      Returns:
        A Spring Framework ModelAndView object, containing the formatted response.
      Throws:
        `Exception`

    - #### lpdaac_granule_opensearch

          public org.springframework.web.servlet.ModelAndView lpdaac_granule_opensearch(javax.servlet.http.HttpServletRequest request,
                                                                               javax.servlet.http.HttpServletResponse response,
                                                                               OpenSearchBean opensearch)
                                                                                 throws Exception

      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
        `opensearch` - command bean with the validated request params
      Returns:
        A Spring Framework ModelAndView object, containing the formatted response.
      Throws:
        `Exception`

    - #### processRss

          public org.springframework.web.servlet.ModelAndView processRss(javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
                                                                  throws Exception

      Process rss.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### echoOpenSearch

          public org.springframework.web.servlet.ModelAndView echoOpenSearch(javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)
                                                                      throws Exception

      Echo OpenSearch.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### processCustomRss

          public org.springframework.web.servlet.ModelAndView processCustomRss(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response)
                                                                        throws Exception

      Process custom rss.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### processCustomMLT

          public org.springframework.web.servlet.ModelAndView processCustomMLT(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response)
                                                                        throws Exception

      Process custom mlt.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        SpringFramework ModelAndView object
      Throws:
        `Exception` - the exception

    - #### multiple_facets

          public org.springframework.web.servlet.ModelAndView multiple_facets(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response)
                                                                       throws Exception

      Throws:
        `Exception`

    - #### getPageNavBar

          public String getPageNavBar(int tCurPage,
                             int tPageSize,
                             int tRsSize,
                             int tPageCnt,
                             String tPrevText,
                             String tNextText,
                             String pageName)

    - #### getPageNavBar

          public String getPageNavBar(int tCurPage,
                             int tPageSize,
                             int tRsSize,
                             int tPageCnt,
                             String tPrevText,
                             String tNextText,
                             String pageName,
                             String mercury3_query_string,
                             Search_Terms st)

      Gets the page nav bar.
      Parameters:
        `tCurPage` - the t cur page
        `tPageSize` - the t page size
        `tRsSize` - the t rs size
        `tPageCnt` - the t page cnt
        `tPrevText` - the t prev text
        `tNextText` - the t next text
        `pageName` - the page name
        `mercury3_query_string` - the mercury3_query_string
        `st` - the st
      Returns:
        the page nav bar

    - #### nu_get_base_st

          public ArrayList nu_get_base_st(javax.servlet.http.HttpServletRequest request,
                                 String PathInfo)
                                   throws Exception

      Nu_get_base_st.
      Parameters:
        `request` - the HttpServletRequest
        `PathInfo` - the path info
      Returns:
        the array list
      Throws:
        `Exception` - the exception

    - #### get_base_st

          public Search_Terms get_base_st(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                                   throws Exception

      Constructs a search_terms object by parsing the request.
      Parameters:
        `request` - the HttpServletRequest
        `response` - the HttpServletResponse
      Returns:
        a populated search_terms object.
      Throws:
        `Exception` - the exception

    - #### build_base_request

          public String build_base_request(Search_Terms st)
                                    throws Exception

      Builds an embeddable querystring from the terms contained in the search_terms object.
      Parameters:
        `st` - the search terms object
      Returns:
        an embeddable queerystring
      Throws:
        `Exception`

Copyright © 2016. All rights reserved.