Class DCSQueryForm
java.lang.Object
org.apache.struts.action.ActionForm
org.dlese.dpc.schemedit.action.form.DCSQueryForm
- All Implemented Interfaces:
Serializable
A Struts Form bean for handling query requests that access a
SimpleLuceneIndex. This class works in conjuction with
the DCSQueryAction Struts Action
class.- Author:
- Jonathan Ostwald
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the contextURL attribute of the DCSQueryForm objectreturn the list of Editors for the currently selected collection; we don't use "selectedCollection" but rather getSelectedSet().getSetSpec() because the former does not seem to be properly initialized after system restart?getEnd()Gets the ending index for the records that will be displayed.Gets the formatLabels attribute of the DCSQueryForm objectGets all possible metadata formats that may be disiminated by the RepositoryManager.getHits()Gets the idMapperErrorLabels, as strings.Gets the idMapperErrors that are in the index, as integer strings.Gets the indexedAccessionStatuses attribute of the DCSQueryForm objectGets all formats that exist natively in the index.Gets all formats that exist natively in the index.Gets the length of iterations to loop over the results array.Gets the metadata attribute of the DCSQueryForm objectGets the HTTP parameters that should be used to retrieve the next set of results.final StringGets all the parameters that existed in the request other than those used for paiging.Gets all request parameters except the refined query Rq parameter.intGets the numPagingRecords attribute of the DCSQueryForm objectGets the numResults attribute of the DCSQueryForm objectGets the offset into the results array to begin iterating.intthe current result page.intGets the HTTP parameters that should be used to retrieve the previous set of results.getQ()Gets the query string entered by the user.getQe()Gets the query string entered by the user, encoded for use in a URL string.Gets the reportTitle attribute of the DCSQueryForm objectA string representation of the numPagingRecords attributeString[]Gets the resultsPerPageOptions attribute of the DCSQueryForm objectgetRq()Gets the refined query string entered by the user, used to search within results.getSc()Gets the collection that has been selected by the user in the UI via a Select tag.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.Gets the searchMode attribute of the DCSQueryForm objectString[]DESCRIPTIONString[]Gets the selectedIdMapperErrors attribute of the DCSQueryForm objectString[]getSes()Gets the ses (Selected Editors) attribute of the DCSBrowseForm objectString[]getSfmts()Gets the selected formats.Gets the showQueryOptions attribute of the DCSQueryForm objectGets the sortField attribute of the DCSQueryForm objectfinal StringGets all the parameters that existed in the request other than those used for paiging or sorting.The sortField of the widgets must be indexed! The sortWidgets key must match the sortField for each widget.String[]getSrcs()Gets the ses (Selected Creators) attribute of the DCSBrowseForm objectString[]getSss()Gets the sss (selectedStatuses) attribute of the DCSBrowseForm objectgetStart()Gets the starting index for the records that will be displayed.return the list of Statuses for the currently selected collection; we don't use "selectedCollection" but rather getSelectedSet().getSetSpec() because the former does not seem to be properly initialized after system restart?getVld()Gets the vld attribute of the DCSQueryForm objectvoidreset(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request) DESCRIPTIONvoidsetContextURL(String contextURL) Sets the contextURL attribute of the DCSQueryForm objectstatic voidsetDebug(boolean db) Sets the debug attribute of the objectvoidsetEditors(List editors) Sets the editors attribute of the DCSBrowseForm objectvoidsetFormats(List formats) Sets the formats attribute of the DCSQueryForm objectvoidsetIdMapperErrors(List errors) Sets the id mapper errors that are available in the index.voidsetIndexedAccessionStatuses(List statusus) Sets the indexedAccessionStatuses attribute of the DCSQueryForm objectvoidsetIndexedFormats(List formats) Gets all formats that exist natively in the index.voidsetIndexedFormatsLabels(List formatsLabels) Gets all formats that exist natively in the index.voidsetMetadata(String metadata) Sets the metadata attribute of the DCSQueryForm objectvoidsetNonPaigingParams(String nonPaigingParams) Sets the nonPaigingParams attribute of the DCSQueryForm objectvoidsetNumPagingRecords(int numPagingRecords) Sets the number of records to display per paiging request.voidSets the q attribute of the DCSQueryForm objectvoidsetReportTitle(String reportTitle) Sets the reportTitle attribute of the DCSQueryForm objectvoidsetRequest(HttpServletRequest request) Sets the request attribute of the DCSQueryForm object.voidsetResults(SearchHelper results) Sets the search results returned by theSimpleLuceneIndexafter sorting them.voidSets the resultsPerPage attribute of the DCSQueryForm objectvoidSets the refined query string entered by the user, used to search within results.voidSets the collection that has been selected by the user in the UI via a Select tag.voidSets the collection that has been selected by the user in the UI.voidSets the searchMode attribute of the DCSQueryForm objectvoidsetselectedAccessionStatuses(String[] selectedAccessionStatuses) DESCRIPTIONvoidsetSelectedIdMapperErrors(String[] selectedIdMapperErrors) Sets the selectedIdMapperErrors attribute of the DCSQueryForm objectvoidSets the collection that has been selected by the user in the UI.voidSets the selected formats.voidsetShowQueryOptions(String showQueryOptions) Sets the showQueryOptions attribute of the DCSQueryForm objectvoidsetSortField(String sortField) Sets the sortField attribute of the DCSQueryForm objectvoidsetSortWidgetParams(String sortWidgetParams) Sets the sortWidgetParams attribute of the DCSQueryForm object.voidSets the collection that has been selected by the user in the UI.voidSets the sss (selectedStatuses) attribute of the DCSBrowseForm objectvoidsetStart(int start) Sets the starting index for the records to display.voidsetStatuses(Map statuses) Sets the statuses attribute of the DCSBrowseForm objectvoidSets the vld attribute of the DCSQueryForm objectMethods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate, validate
-
Field Details
-
DEFAULT_REC_SORT
-
RELEVANCE_REC_SORT
-
-
Constructor Details
-
DCSQueryForm
public DCSQueryForm()Constructor for the DCSQueryForm object
-
-
Method Details
-
getResultsPerPageOptions
Gets the resultsPerPageOptions attribute of the DCSQueryForm object- Returns:
- The resultsPerPageOptions value
-
setSortField
Sets the sortField attribute of the DCSQueryForm object- Parameters:
sortField- The new sortField value
-
getSortField
Gets the sortField attribute of the DCSQueryForm object- Returns:
- The sortField value
-
getSortWidgets
The sortField of the widgets must be indexed! The sortWidgets key must match the sortField for each widget. -
getCurrentSortWidget
-
getRecordIdWidget
-
getLastEditorWidget
-
getStatusWidget
-
getLastTouchDateWidget
-
getResultsPerPage
A string representation of the numPagingRecords attribute- Returns:
- The resultsPerPage value
-
setResultsPerPage
Sets the resultsPerPage attribute of the DCSQueryForm object- Parameters:
s- The new resultsPerPage value
-
getSearchMode
Gets the searchMode attribute of the DCSQueryForm object- Returns:
- The searchMode value
-
setSearchMode
Sets the searchMode attribute of the DCSQueryForm object- Parameters:
s- The new searchMode value
-
getShowQueryOptions
Gets the showQueryOptions attribute of the DCSQueryForm object- Returns:
- The showQueryOptions value
-
setShowQueryOptions
Sets the showQueryOptions attribute of the DCSQueryForm object- Parameters:
showQueryOptions- The new showQueryOptions value
-
getContextURL
Gets the contextURL attribute of the DCSQueryForm object- Returns:
- The contextURL value
-
setContextURL
Sets the contextURL attribute of the DCSQueryForm object- Parameters:
contextURL- The new contextURL value
-
getEditors
return the list of Editors for the currently selected collection; we don't use "selectedCollection" but rather getSelectedSet().getSetSpec() because the former does not seem to be properly initialized after system restart?- Returns:
- The editors value
-
setEditors
Sets the editors attribute of the DCSBrowseForm object- Parameters:
editors- The new editors value
-
getVld
Gets the vld attribute of the DCSQueryForm object- Returns:
- The vld value
-
setVld
Sets the vld attribute of the DCSQueryForm object- Parameters:
v- The new vld value
-
getSrcs
Gets the ses (Selected Creators) attribute of the DCSBrowseForm object- Returns:
- The ses value
-
setSrcs
Sets the collection that has been selected by the user in the UI. For example 'jones'. For use with a Struts select tag that has multiple selection enabled.- Parameters:
selectedCreators- The new ses value
-
getSes
Gets the ses (Selected Editors) attribute of the DCSBrowseForm object- Returns:
- The ses value
-
setSes
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:
selectedEditors- The new ses value
-
getStatuses
return the list of Statuses for the currently selected collection; we don't use "selectedCollection" but rather getSelectedSet().getSetSpec() because the former does not seem to be properly initialized after system restart?- Returns:
- The statuses value
-
setStatuses
Sets the statuses attribute of the DCSBrowseForm object- Parameters:
statuses- The new statuses value
-
getSss
Gets the sss (selectedStatuses) attribute of the DCSBrowseForm object- Returns:
- The sss value
-
setSss
Sets the sss (selectedStatuses) attribute of the DCSBrowseForm object- Parameters:
selectedStatuses- The new sss value
-
setIdMapperErrors
Sets the id mapper errors that are available in the index.- Parameters:
errors- The ID mapper errors, as a list of integers.
-
getIdMapperErrors
Gets the idMapperErrors that are in the index, as integer strings.- Returns:
- The idMapperErrors value
-
getIdMapperErrorLabels
Gets the idMapperErrorLabels, as strings.- Returns:
- The idMapperErrorLabels value
-
setIndexedAccessionStatuses
Sets the indexedAccessionStatuses attribute of the DCSQueryForm object- Parameters:
statusus- The new indexedAccessionStatuses value
-
getIndexedAccessionStatuses
Gets the indexedAccessionStatuses attribute of the DCSQueryForm object- Returns:
- The indexedAccessionStatuses value
-
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
Sets the formats attribute of the DCSQueryForm object- Parameters:
formats- The new formats value
-
getIndexedFormats
Gets all formats that exist natively in the index.- Returns:
- The indexedFormats value
-
setIndexedFormats
Gets all formats that exist natively in the index.- Parameters:
formats- The new indexedFormats value
-
getIndexedFormatsLabels
Gets all formats that exist natively in the index.- Returns:
- The indexedFormatsLabels value
-
setIndexedFormatsLabels
Gets all formats that exist natively in the index.- Parameters:
formatsLabels- The new indexedFormatsLabels value
-
getFormatLabels
Gets the formatLabels attribute of the DCSQueryForm object- Returns:
- The formatLabels value
-
getSfmts
Gets the selected formats. These include formats that are available via the XMLConversionService.- Returns:
- The sfmts value
-
setSfmts
Sets the selected formats. These include formats that are available via the XMLConversionService.- Parameters:
selectedFormats- The new sfmts value
-
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
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
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
Gets the selectedIdMapperErrors attribute of the DCSQueryForm object- Returns:
- The selectedIdMapperErrors value
-
getselectedAccessionStatuses
DESCRIPTION- Returns:
- DESCRIPTION
-
setselectedAccessionStatuses
DESCRIPTION- Parameters:
selectedAccessionStatuses- DESCRIPTION
-
setSelectedIdMapperErrors
Sets the selectedIdMapperErrors attribute of the DCSQueryForm object- Parameters:
selectedIdMapperErrors- The new selectedIdMapperErrors value
-
reset
DESCRIPTION- Overrides:
resetin classorg.apache.struts.action.ActionForm- Parameters:
mapping- DESCRIPTIONrequest- DESCRIPTION
-
setScs
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
Gets the selected collection(s) parameter to be inserted in the URL that gets the next set of results.- Returns:
- The scparams value.
-
setResults
Sets the search results returned by theSimpleLuceneIndexafter sorting them.we DON'T want to sort results if:
- this is a NEW sort (if searchString is different from lastSearchString)
- there is no sortField value to sort it by (note: we explicitly set sortField to null in the case of a new search)
- Parameters:
results- The new results value.
-
setMetadata
Sets the metadata attribute of the DCSQueryForm object- Parameters:
metadata- The new metadata value
-
getMetadata
Gets the metadata attribute of the DCSQueryForm object- Returns:
- The metadata value
-
getHits
-
getNumResults
Gets the numResults attribute of the DCSQueryForm object- Returns:
- The numResults value
-
getQ
Gets the query string entered by the user.- Returns:
- The query value.
-
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
Sets the q attribute of the DCSQueryForm object- Parameters:
queryString- The new q value
-
getRq
Gets the refined query string entered by the user, used to search within results.- Returns:
- The query value.
-
setRq
Sets the refined query string entered by the user, used to search within results.- Parameters:
refineQueryString- The new rq value
-
getNrqParams
Gets all request parameters except the refined query Rq parameter.- Returns:
- The nrqParams value.
-
setReportTitle
Sets the reportTitle attribute of the DCSQueryForm object- Parameters:
reportTitle- The new reportTitle value
-
getReportTitle
Gets the reportTitle attribute of the DCSQueryForm 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
Gets the starting index for the records that will be displayed.- Returns:
- The start value
-
getEnd
Gets the ending index for the records that will be displayed.- Returns:
- The end value
-
getOffset
Gets the offset into the results array to begin iterating.- Returns:
- The offset value
-
getLength
Gets the length of iterations to loop over the results array.- Returns:
- The length value
-
getNumPagingRecords
public int getNumPagingRecords()Gets the numPagingRecords attribute of the DCSQueryForm object- Returns:
- The numPagingRecords 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
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
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
Sets the request attribute of the DCSQueryForm object.- Parameters:
request- The new request value
-
setNonPaigingParams
Sets the nonPaigingParams attribute of the DCSQueryForm object- Parameters:
nonPaigingParams- The new nonPaigingParams value
-
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.
-
getPaigingParam
public int getPaigingParam()the current result page. -
getPaigingParam
-
setSortWidgetParams
Sets the sortWidgetParams attribute of the DCSQueryForm object.Used by the sortWidget (see tags/sortWidget.tag) to contstruct a URL that will reproduce search but accomodate new sorting, ordering, and paiging params.
- Parameters:
sortWidgetParams- The new sortWidgetParams value
-
getSortWidgetParams
Gets all the parameters that existed in the request other than those used for paiging or sorting.- Returns:
- The SortWidgetParams 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
-