Class Query

    • Constructor Detail

      • Query

        public Query()
        Constructor
    • Method Detail

      • parseRequest

        public void parseRequest​(Map parameterMap)
        Parse user request parameters.
        Specified by:
        parseRequest in interface QueryInterface
        Overrides:
        parseRequest in class QueryBase
        Parameters:
        parameterMap - Request details (name=value pairs)
      • doNewSearch

        protected void doNewSearch()
        Set up a URL for the new search (method = GET)
        • Set up the required SRU "searchRetrieve" parameters
        • Set the global _url (the base URL plus all SRU parameters)
      • postNewSearch

        protected void postNewSearch()
        Set up a URL for the new search (method = POST)
        • Set up the required SRU "searchRetrieve" parameters
        • Set the global _url (the base URL plus all SRU parameters)
      • doNewPage

        protected void doNewPage()
        Set up for pagination (method = GET)
        • Set up the required "searchRetrieve" parameters for pagination
        • Set the global _url (the base URL)
      • postNewPage

        protected void postNewPage()
        Set up a URL for pagination (method = POST)
        • Set up the required "searchRetrieve" parameters for pagination
        • Set the global _url (the base URL plus all pagination parameters)
      • parseStatusRecord

        protected void parseStatusRecord​(Document responseDocument)
        Parse the status record. We establish the global search status block here, saving the result set id, estimated hit count, etc.
        Parameters:
        responseDocument - The server response
      • saveResultSetId

        protected String saveResultSetId​(Document responseDocument)
        Look up the result set ID (and save it in session state)
        Parameters:
        responseDocument - The server response
        Returns:
        The ID
      • submit

        public int submit()
        Custom submit behavior (override HttpTransactionQueryBase)
        Overrides:
        submit in class HttpTransactionQueryBase
        Returns:
        Submission status code (200 = success)
      • xcsDatabase

        protected String xcsDatabase​(String databaseList)
        Make the database list (SRU extension)
        Parameters:
        databaseList - The list of databases
        Returns:
        A fully formed database parameter
      • xcsContinue

        protected String xcsContinue()
        Make a 360 Search "continue" parameter
        Returns:
        The continue parameter
      • xcsPostDatabase

        protected void xcsPostDatabase​(String databaseList)
        Make the database list (SRU extension)
        Parameters:
        databaseList - The list of databases
      • xcsPostContinue

        protected void xcsPostContinue()
        Make a 360 Search "continue" parameter
      • formatDatabaseList

        protected String formatDatabaseList​(String databaseList)
        Build up comma separated database list
        Parameters:
        databaseList - Databases: db1 bd2 bd3
        Returns:
        Comma separated list: db1,bd2,bd3
      • isNewPage

        protected boolean isNewPage()
        Is this a new page (pagination, not a brand new search)?
        Returns:
        true if so
      • flagInitialSearchComplete

        protected void flagInitialSearchComplete()
        Clear the "start a new search" flag
      • flagSearchInProgress

        protected void flagSearchInProgress()
        Set the "start a new search" flag