Package org.dlese.dpc.action.form
Class SimpleQueryForm
java.lang.Object
org.apache.struts.action.ActionForm
org.dlese.dpc.action.form.SimpleQueryForm
- All Implemented Interfaces:
Serializable
public final class SimpleQueryForm
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 SimpleQueryAction Struts Action class.- Author:
- John Weatherley
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the collectionLabels attribute of the SimpleQueryForm objectGets the collections attribute of the SimpleQueryForm objectGets the contextURL attribute of the SimpleQueryForm objectgetEnd()Gets the ending index for the records that will be displayed.Gets the formatLabels attribute of the SimpleQueryForm objectGets the formats attribute of the SimpleQueryForm objectGets the length of iterations to loop over the results array.Gets the metadata attribute of the SimpleQueryForm 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.Gets the numResults attribute of the SimpleQueryForm objectGets the OAI SetSpecs for this repository, or null if none.Gets the offset into the results array to begin iterating.Gets 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 SimpleQueryForm objectGets the result attribute of the SimpleQueryForm objectGets the search results returned by theSimpleLuceneIndex.getRq()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.String[]Gets the OAI SetSpecs that have been selected by the user in the UI.String[]Gets the selStatus attribute of the SimpleQueryForm objectString[]getSfmts()Gets the sfmts attribute of the SimpleQueryForm objectgetStart()Gets the starting index for the records that will be displayed.Gets the status attribute of the SimpleQueryForm objectGets the statusLabels attribute of the SimpleQueryForm objectvoidsetCollectionLabels(List collectionLabels) Sets the collectionLabels attribute of the SimpleQueryForm objectvoidsetCollections(List collections) Sets the collections attribute of the SimpleQueryForm objectvoidsetContextURL(String contextURL) Sets the contextURL attribute of the SimpleQueryForm objectstatic voidsetDebug(boolean db) Sets the debug attribute of the objectvoidsetFormats(List formats) Sets the formats attribute of the SimpleQueryForm objectvoidsetMetadata(String metadata) Sets the metadata attribute of the SimpleQueryForm objectvoidsetNonPaigingParams(String nonPaigingParams) Sets the nonPaigingParams attribute of the SimpleQueryForm objectvoidsetNumPagingRecords(int numPagingRecords) Sets the number of records to display per paiging request.voidSets the q attribute of the SimpleQueryForm objectvoidsetReportTitle(String reportTitle) Sets the reportTitle attribute of the SimpleQueryForm objectvoidsetRequest(HttpServletRequest request) Sets the request attribute of the SimpleQueryForm object.voidSets the result attribute of the SimpleQueryForm objectvoidsetResults(ResultDocList results) Sets the search results returned by theSimpleLuceneIndex.voidSets 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.voidsetSelSetSpecs(String[] value) Gets the OAI SetSpecs that have been selected by the user in the UI.voidsetSelStatus(String[] s) Sets the selStatus attribute of the SimpleQueryForm objectvoidSets the sfmts attribute of the SimpleQueryForm objectvoidsetStart(int start) Sets the starting index for the records to display.Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate
-
Constructor Details
-
SimpleQueryForm
public SimpleQueryForm()Constructor for the SimpleQueryForm object
-
-
Method Details
-
getContextURL
Gets the contextURL attribute of the SimpleQueryForm object- Returns:
- The contextURL value
-
setContextURL
Sets the contextURL attribute of the SimpleQueryForm object- Parameters:
contextURL- The new contextURL value
-
setCollections
Sets the collections attribute of the SimpleQueryForm object- Parameters:
collections- The new collections value
-
getCollections
Gets the collections attribute of the SimpleQueryForm object- Returns:
- The collections value
-
setCollectionLabels
Sets the collectionLabels attribute of the SimpleQueryForm object- Parameters:
collectionLabels- The new collectionLabels value
-
getCollectionLabels
Gets the collectionLabels attribute of the SimpleQueryForm object- Returns:
- The collectionLabels value
-
getOaiSets
Gets the OAI SetSpecs for this repository, or null if none.- Returns:
- The OAI SetSpecs
-
getFormats
Gets the formats attribute of the SimpleQueryForm object- Returns:
- The formats value
-
setFormats
Sets the formats attribute of the SimpleQueryForm object- Parameters:
formats- The new formats value
-
getFormatLabels
Gets the formatLabels attribute of the SimpleQueryForm object- Returns:
- The formatLabels value
-
getStatus
Gets the status attribute of the SimpleQueryForm object- Returns:
- The status value
-
getStatusLabels
Gets the statusLabels attribute of the SimpleQueryForm object- Returns:
- The statusLabels value
-
getSelStatus
Gets the selStatus attribute of the SimpleQueryForm object- Returns:
- The selStatus value
-
setSelStatus
Sets the selStatus attribute of the SimpleQueryForm object- Parameters:
s- The new selStatus value
-
getSfmts
Gets the sfmts attribute of the SimpleQueryForm object- Returns:
- The sfmts value
-
setSfmts
Sets the sfmts attribute of the SimpleQueryForm object- 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
-
getSelSetSpecs
Gets the OAI SetSpecs that have been selected by the user in the UI. For example 'dcc' 'comet'. For use with a Struts select tag that has multiple selection enabled.- Returns:
- The selected setSpecs
-
setSelSetSpecs
Gets the OAI SetSpecs that have been selected by the user in the UI. For example 'dcc' 'comet'. For use with a Struts select tag that has multiple selection enabled.- Parameters:
value- The selected setSpecs
-
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.
-
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.
-
getResults
Gets the search results returned by theSimpleLuceneIndex.- Returns:
- The results value
-
setResults
Sets the search results returned by theSimpleLuceneIndex.- Parameters:
results- The new results value.
-
setResult
Sets the result attribute of the SimpleQueryForm object- Parameters:
resultDoc- The new result value
-
getResult
Gets the result attribute of the SimpleQueryForm object- Returns:
- The result value
-
setMetadata
Sets the metadata attribute of the SimpleQueryForm object- Parameters:
metadata- The new metadata value
-
getMetadata
Gets the metadata attribute of the SimpleQueryForm object- Returns:
- The metadata value
-
getNumResults
Gets the numResults attribute of the SimpleQueryForm 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 SimpleQueryForm 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 SimpleQueryForm object- Parameters:
reportTitle- The new reportTitle value
-
getReportTitle
Gets the reportTitle attribute of the SimpleQueryForm 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
-
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 SimpleQueryForm object.- Parameters:
request- The new request value
-
setNonPaigingParams
Sets the nonPaigingParams attribute of the SimpleQueryForm 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.
-
setDebug
public static void setDebug(boolean db) Sets the debug attribute of the object- Parameters:
db- The new debug value
-