Class DDSAdminQueryForm

java.lang.Object
org.apache.struts.action.ActionForm
org.dlese.dpc.dds.action.form.VocabForm
org.dlese.dpc.dds.action.form.DDSAdminQueryForm
All Implemented Interfaces:
Serializable

public final class DDSAdminQueryForm extends VocabForm implements Serializable
A Struts Form bean for handling query requests that access a SimpleLuceneIndex. This class works in conjuction with the DDSAdminQueryAction Struts Action class.
Author:
John Weatherley
See Also:
  • Constructor Details

    • DDSAdminQueryForm

      public DDSAdminQueryForm()
      Constructor for the DDSAdminQueryForm object
  • Method Details

    • setVocabInputState

      public void setVocabInputState(MetadataVocabInputState vocabInputState)
      Sets the vocabInputState attribute of the DDSAdminQueryForm object
      Parameters:
      vocabInputState - The new vocabInputState value
    • getVocabInputState

      public MetadataVocabInputState getVocabInputState()
      Gets the vocabInputState attribute of the DDSAdminQueryForm object
      Returns:
      The vocabInputState value
    • getShowQueryOptions

      public String getShowQueryOptions()
      Gets the showQueryOptions attribute of the DDSAdminQueryForm object
      Returns:
      The showQueryOptions value
    • setShowQueryOptions

      public void setShowQueryOptions(String showQueryOptions)
      Sets the showQueryOptions attribute of the DDSAdminQueryForm object
      Parameters:
      showQueryOptions - The new showQueryOptions value
    • getContextURL

      public String getContextURL()
      Gets the contextURL attribute of the DDSAdminQueryForm object
      Returns:
      The contextURL value
    • setContextURL

      public void setContextURL(String contextURL)
      Sets the contextURL attribute of the DDSAdminQueryForm object
      Parameters:
      contextURL - The new contextURL value
    • getIdMapperErrors

      public List getIdMapperErrors()
      Gets the idMapperErrors that are in the index, as integer strings.
      Returns:
      The idMapperErrors value
    • getIdMapperErrorLabels

      public List getIdMapperErrorLabels()
      Gets the idMapperErrorLabels, as strings.
      Returns:
      The idMapperErrorLabels value
    • getIndexedAccessionStatuses

      public List getIndexedAccessionStatuses()
      Gets the indexedAccessionStatuses attribute of the DDSAdminQueryForm object
      Returns:
      The indexedAccessionStatuses value
    • getCollections

      public List getCollections()
      Gets the collections that are configured in the repository, sorted.
      Returns:
      The collections value
    • getFormats

      public List getFormats()
      Gets all possible metadata formats that may be disiminated by the RepositoryManager. This includes formats that are available via the XMLConversionService.
      Returns:
      The formats value
    • setFormats

      public void setFormats(List formats)
      Sets the formats attribute of the DDSAdminQueryForm object
      Parameters:
      formats - The new formats value
    • getIndexedFormats

      public List getIndexedFormats()
      Gets all formats that exist natively in the index.
      Returns:
      The indexedFormats value
    • setIndexedFormats

      public void setIndexedFormats(List formats)
      Gets all formats that exist natively in the index.
      Parameters:
      formats - The new indexedFormats value
    • getIndexedFormatsLabels

      public List getIndexedFormatsLabels()
      Gets all formats that exist natively in the index.
      Returns:
      The indexedFormatsLabels value
    • setIndexedFormatsLabels

      public void setIndexedFormatsLabels(List formatsLabels)
      Gets all formats that exist natively in the index.
      Parameters:
      formatsLabels - The new indexedFormatsLabels value
    • getSifmts

      public String[] getSifmts()
      Gets the selected indexed formats.
      Returns:
      The sfmts value
    • setSifmts

      public void setSifmts(String[] selectedIndexedFormats)
      Sets the selected indexed formats.
      Parameters:
      selectedIndexedFormats - The new sifmts value
    • getFormatLabels

      public List getFormatLabels()
      Gets the formatLabels attribute of the DDSAdminQueryForm object
      Returns:
      The formatLabels value
    • getSfmts

      public String[] getSfmts()
      Gets the selected formats. These include formats that are available via the XMLConversionService.
      Returns:
      The sfmts value
    • setSfmts

      public void setSfmts(String[] selectedFormats)
      Sets the selected formats. These include formats that are available via the XMLConversionService.
      Parameters:
      selectedFormats - The new sfmts value
    • getSc

      public String getSc()
      Gets the collection that has been selected by the user in the UI via a Select tag. For example '0dcc'. For use with a Struts select tag that does not have multiple selection enabled.

      Sample HTML code using Struts:

      <html:select property="sc" size="1" >
        <html:options name="queryForm" property="collections" labelProperty="collectionLabels"/>
      </html:select>

      Returns:
      The selected collection.
    • setSc

      public void setSc(String selectedCollection)
      Sets the collection that has been selected by the user in the UI via a Select tag. For example '0dcc'. For use with a Struts select tag that does not have multiple selection enabled.
      Parameters:
      selectedCollection - The new sc value
    • getScs

      public String[] getScs()
      Gets the collections that have been selected by the user in the UI. For example '0dcc' '0comet'. For use with a Struts select tag that has multiple selection enabled.

      Sample HTML code using Struts:

      <html:select property="scs" size="5" multiple="t">
        <html:options name="queryForm" property="collections" labelProperty="collectionLabels"/>
      </html:select>

      Returns:
      The selected collections.
    • getKy

      public String[] getKy()
      Gets the collections that have been selected by the user in the UI. For example '06' '006'. For use with a Struts select tag that has multiple selection enabled.

      Returns:
      The selected collection keys
    • getSelectedIdMapperErrors

      public String[] getSelectedIdMapperErrors()
      Gets the selectedIdMapperErrors attribute of the DDSAdminQueryForm object
      Returns:
      The selectedIdMapperErrors value
    • getselectedAccessionStatuses

      public String[] getselectedAccessionStatuses()
      DESCRIPTION
      Returns:
      DESCRIPTION
    • setselectedAccessionStatuses

      public void setselectedAccessionStatuses(String[] selectedAccessionStatuses)
      DESCRIPTION
      Parameters:
      selectedAccessionStatuses - DESCRIPTION
    • setSelectedIdMapperErrors

      public void setSelectedIdMapperErrors(String[] selectedIdMapperErrors)
      Sets the selectedIdMapperErrors attribute of the DDSAdminQueryForm object
      Parameters:
      selectedIdMapperErrors - The new selectedIdMapperErrors value
    • reset

      public void reset(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
      DESCRIPTION
      Overrides:
      reset in class org.apache.struts.action.ActionForm
      Parameters:
      mapping - DESCRIPTION
      request - DESCRIPTION
    • setScs

      public void setScs(String[] selectedCollections)
      Sets the collection that has been selected by the user in the UI. For example '0dcc' '0comet'. For use with a Struts select tag that has multiple selection enabled.
      Parameters:
      selectedCollections - The new sc value
    • setKy

      public void setKy(String[] ky)
      Sets the collection that has been selected by the user in the UI. For example '06' '008'. For use with a Struts select tag that has multiple selection enabled.
      Parameters:
      ky - The new sc value
    • getScparams

      public String getScparams()
      Gets the selected collection(s) parameter to be inserted in the URL that gets the next set of results.
      Returns:
      The scparams value.
    • getResults

      public ResultDocList getResults()
      Gets the search results returned by the SimpleLuceneIndex.
      Returns:
      The results value
    • setResults

      public void setResults(ResultDocList results)
      Sets the search results returned by the SimpleLuceneIndex.
      Parameters:
      results - The new results value.
    • setResult

      public void setResult(ResultDoc resultDoc)
      Sets the result attribute of the DDSAdminQueryForm object
      Parameters:
      resultDoc - The new result value
    • getResult

      public ResultDoc getResult()
      Gets the result attribute of the DDSAdminQueryForm object
      Returns:
      The result value
    • getDocMap

      public DocumentMap getDocMap()
      Gets the DocumentMap for the search result.
      Returns:
      The DocMap value
    • getLazyDocMap

      public LazyDocumentMap getLazyDocMap()
      Gets the LazyDocumentMap for the search result.
      Returns:
      The LazyDocumentMap value
    • getDocReader

      public DocReader getDocReader()
      Gets the result attribute of the DDSAdminQueryForm object
      Returns:
      The result value
    • getMmdRec

      public MmdRec getMmdRec()
      Gets the IDMapper Mmd record for this ADN resource, otherwise null. If the given record is not in ADN, null will be returned.
      Returns:
      The Mmd Record, or null
    • getMmdDupesInOtherCollections

      public MmdRec[] getMmdDupesInOtherCollections()
      Gets the IDMapper Mmd records for dupulicate resources in other collections, or null.
      Returns:
      The duplicate Mmd Records, or null
    • getMmdDupesInSameCollection

      public MmdRec[] getMmdDupesInSameCollection()
      Gets the IDMapper Mmd records for dupulicate resources in the same as this resource collection, or null.
      Returns:
      The duplicate Mmd Records, or null
    • setMetadata

      public void setMetadata(String metadata)
      Sets the metadata attribute of the DDSAdminQueryForm object
      Parameters:
      metadata - The new metadata value
    • getMetadata

      public String getMetadata()
      Gets the metadata attribute of the DDSAdminQueryForm object
      Returns:
      The metadata value
    • getNumResults

      public String getNumResults()
      Gets the numResults attribute of the DDSAdminQueryForm object
      Returns:
      The numResults value
    • getQ

      public String getQ()
      Gets the query string entered by the user.
      Returns:
      The query value.
    • getQe

      public String getQe()
      Gets the query string entered by the user, encoded for use in a URL string.
      Returns:
      The query value ncoded for use in a URL string.
    • setQ

      public void setQ(String queryString)
      Sets the q attribute of the DDSAdminQueryForm object
      Parameters:
      queryString - The new q value
    • getRq

      public String getRq()
      Gets the refined query string entered by the user, used to search within results.
      Returns:
      The query value.
    • setRq

      public void setRq(String refineQueryString)
      Sets the refined query string entered by the user, used to search within results.
      Parameters:
      refineQueryString - The new rq value
    • getNrqParams

      public ArrayList getNrqParams()
      Gets all request parameters except the refined query Rq parameter.
      Returns:
      The nrqParams value.
    • setReportTitle

      public void setReportTitle(String reportTitle)
      Sets the reportTitle attribute of the DDSAdminQueryForm object
      Parameters:
      reportTitle - The new reportTitle value
    • getReportTitle

      public String getReportTitle()
      Gets the reportTitle attribute of the DDSAdminQueryForm object
      Returns:
      The reportTitle value
    • setStart

      public void setStart(int start)
      Sets the starting index for the records to display.
      Parameters:
      start - The new start value
    • getStart

      public String getStart()
      Gets the starting index for the records that will be displayed.
      Returns:
      The start value
    • getEnd

      public String getEnd()
      Gets the ending index for the records that will be displayed.
      Returns:
      The end value
    • getOffset

      public String getOffset()
      Gets the offset into the results array to begin iterating.
      Returns:
      The offset value
    • getS

      public int getS()
      Gets the s attribute of the DDSAdminQueryForm object
      Returns:
      The s value
    • getLength

      public String getLength()
      Gets the length of iterations to loop over the results array.
      Returns:
      The length value
    • setNumPagingRecords

      public void setNumPagingRecords(int numPagingRecords)
      Sets the number of records to display per paiging request. Defaults to 10.
      Parameters:
      numPagingRecords - The new numPagingRecords value
    • getNextResultsUrl

      public String getNextResultsUrl()
      Gets the HTTP parameters that should be used to retrieve the next set of results.
      Returns:
      Everything after the ? that should be included in the pager URL.
    • getPrevResultsUrl

      public String getPrevResultsUrl()
      Gets the HTTP parameters that should be used to retrieve the previous set of results.
      Returns:
      Everything after the ? that should be included in the pager URL.
    • setRequest

      public void setRequest(HttpServletRequest request)
      Sets the request attribute of the DDSAdminQueryForm object.
      Parameters:
      request - The new request value
    • setNonPaigingParams

      public void setNonPaigingParams(String nonPaigingParams)
      Sets the nonPaigingParams attribute of the DDSAdminQueryForm object
      Parameters:
      nonPaigingParams - The new nonPaigingParams value
    • getNonPaigingParams

      public final String getNonPaigingParams()
      Gets all the parameters that existed in the request other than those used for paiging.
      Returns:
      The NonPaigingParams returned as an HTTP query string.
    • setDebug

      public static void setDebug(boolean db)
      Sets the debug attribute of the object
      Parameters:
      db - The new debug value