DLESE Tools
v1.2

org.dlese.dpc.dds.action.form
Class DDSAdminQueryForm

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

public final class DDSAdminQueryForm
extends org.apache.struts.action.ActionForm
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:
Serialized Form

Nested Class Summary
 class DDSAdminQueryForm.ParamPair
          Holds paramter, value pairs.
 
Field Summary
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
DDSAdminQueryForm()
          Constructor for the DDSAdminQueryForm object
 
Method Summary
 List getCollectionLabels()
          Gets the collectionLabels attribute of the DDSAdminQueryForm object
 List getCollections()
          Gets the collections attribute of the DDSAdminQueryForm object
 String getContextURL()
          Gets the contextURL attribute of the DDSAdminQueryForm object
 String getEnd()
          Gets the ending index for the records that will be displayed.
 List getFormatLabels()
          Gets the formatLabels attribute of the DDSAdminQueryForm object
 List getFormats()
          Gets the formats attribute of the DDSAdminQueryForm object
 List getIdMapperErrorLabels()
          Gets the idMapperErrorLabels, as strings.
 List getIdMapperErrors()
          Gets the idMapperErrors that are in the index, as integer strings.
 List getIndexedAccessionStatuses()
           
 String getLength()
          Gets the length of iterations to loop over the results array.
 String getMetadata()
          Gets the metadata attribute of the DDSAdminQueryForm object
 String getNextResultsUrl()
          Gets the HTTP parameters that should be used to retrieve the next set of results.
 String getNonPaigingParams()
          Gets all the parameters that existed in the request other than those used for paiging.
 ArrayList getNrqParams()
          Gets all request parameters except the refined query Rq parameter.
 String getNumResults()
          Gets the numResults attribute of the DDSAdminQueryForm object
 String getOffset()
          Gets the offset into the results array to begin iterating.
 String getPrevResultsUrl()
          Gets the HTTP parameters that should be used to retrieve the previous set of results.
 String getQ()
          Gets the query string entered by the user.
 String getQe()
          Gets the query string entered by the user, encoded for use in a URL string.
 String getReportTitle()
          Gets the reportTitle attribute of the DDSAdminQueryForm object
 ResultDoc getResult()
          Gets the result attribute of the DDSAdminQueryForm object
 ResultDoc[] getResults()
          Gets the search results returned by the SimpleLuceneIndex.
 String getRq()
          Gets the refined query string entered by the user, used to search within results.
 String getSc()
          Gets the collection that has been selected by the user in the UI via a Select tag.
 String getScparams()
          Gets the selected collection(s) parameter to be inserted in the URL that gets the next set of results.
 String[] getScs()
          Gets the collections that have been selected by the user in the UI.
 String[] getselectedAccessionStatuses()
           
 String[] getSelectedIdMapperErrors()
           
 String[] getSfmts()
          Gets the sfmts attribute of the DDSAdminQueryForm object
 String getShowQueryOptions()
           
 String getStart()
          Gets the starting index for the records that will be displayed.
 void reset(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
           
 void setCollectionLabels(List collectionLabels)
          Sets the collectionLabels attribute of the DDSAdminQueryForm object
 void setCollections(List collections)
          Sets the collections attribute of the DDSAdminQueryForm object
 void setContextURL(String contextURL)
          Sets the contextURL attribute of the DDSAdminQueryForm object
static void setDebug(boolean db)
          Sets the debug attribute of the object
 void setFormats(List formats)
          Sets the formats attribute of the DDSAdminQueryForm object
 void setIdMapperErrors(List errors)
          Sets the id mapper errors that are available in the index.
 void setIndexedAccessionStatuses(List statusus)
           
 void setMetadata(String metadata)
          Sets the metadata attribute of the DDSAdminQueryForm object
 void setNonPaigingParams(String nonPaigingParams)
          Sets the nonPaigingParams attribute of the DDSAdminQueryForm object
 void setNumPagingRecords(int numPagingRecords)
          Sets the number of records to display per paiging request.
 void setQ(String queryString)
          Sets the q attribute of the DDSAdminQueryForm object
 void setReportTitle(String reportTitle)
          Sets the reportTitle attribute of the DDSAdminQueryForm object
 void setRequest(HttpServletRequest request)
          Sets the request attribute of the DDSAdminQueryForm object.
 void setResult(ResultDoc resultDoc)
          Sets the result attribute of the DDSAdminQueryForm object
 void setResults(ResultDoc[] results)
          Sets the search results returned by the SimpleLuceneIndex.
 void setRq(String refineQueryString)
          Sets the refined query string entered by the user, used to search within results.
 void setSc(String selectedCollection)
          Sets the collection that has been selected by the user in the UI via a Select tag.
 void setScs(String[] selectedCollections)
          Sets the collection that has been selected by the user in the UI.
 void setselectedAccessionStatuses(String[] selectedAccessionStatuses)
           
 void setSelectedIdMapperErrors(String[] selectedIdMapperErrors)
           
 void setSfmts(String[] selectedFormats)
          Sets the sfmts attribute of the DDSAdminQueryForm object
 void setShowQueryOptions(String showQueryOptions)
           
 void setStart(int start)
          Sets the starting index for the records to display.
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDSAdminQueryForm

public DDSAdminQueryForm()
Constructor for the DDSAdminQueryForm object

Method Detail

getShowQueryOptions

public String getShowQueryOptions()

setShowQueryOptions

public void setShowQueryOptions(String showQueryOptions)

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

setIdMapperErrors

public void setIdMapperErrors(List errors)
Sets the id mapper errors that are available in the index.

Parameters:
errors - The ID mapper errors, as a list of integers.

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

setIndexedAccessionStatuses

public void setIndexedAccessionStatuses(List statusus)

getIndexedAccessionStatuses

public List getIndexedAccessionStatuses()

setCollections

public void setCollections(List collections)
Sets the collections attribute of the DDSAdminQueryForm object

Parameters:
collections - The new collections value

getCollections

public List getCollections()
Gets the collections attribute of the DDSAdminQueryForm object

Returns:
The collections value

setCollectionLabels

public void setCollectionLabels(List collectionLabels)
Sets the collectionLabels attribute of the DDSAdminQueryForm object

Parameters:
collectionLabels - The new collectionLabels value

getCollectionLabels

public List getCollectionLabels()
Gets the collectionLabels attribute of the DDSAdminQueryForm object

Returns:
The collectionLabels value

getFormats

public List getFormats()
Gets the formats attribute of the DDSAdminQueryForm object

Returns:
The formats value

setFormats

public void setFormats(List formats)
Sets the formats attribute of the DDSAdminQueryForm object

Parameters:
formats - The new formats value

getFormatLabels

public List getFormatLabels()
Gets the formatLabels attribute of the DDSAdminQueryForm object

Returns:
The formatLabels value

getSfmts

public String[] getSfmts()
Gets the sfmts attribute of the DDSAdminQueryForm object

Returns:
The sfmts value

setSfmts

public void setSfmts(String[] selectedFormats)
Sets the sfmts attribute of the DDSAdminQueryForm object

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.

getSelectedIdMapperErrors

public String[] getSelectedIdMapperErrors()

getselectedAccessionStatuses

public String[] getselectedAccessionStatuses()

setselectedAccessionStatuses

public void setselectedAccessionStatuses(String[] selectedAccessionStatuses)

setSelectedIdMapperErrors

public void setSelectedIdMapperErrors(String[] selectedIdMapperErrors)

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  HttpServletRequest request)

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

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 ResultDoc[] getResults()
Gets the search results returned by the SimpleLuceneIndex.

Returns:
The results value

setResults

public void setResults(ResultDoc[] 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

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

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

DLESE Tools
v1.2