Package org.dlese.dpc.dds.action.form
Class DDSQueryForm
java.lang.Object
org.apache.struts.action.ActionForm
org.dlese.dpc.dds.action.form.DDSViewResourceForm
org.dlese.dpc.dds.action.form.DDSQueryForm
- All Implemented Interfaces:
Serializable
A Struts Form bean for handling DDS query requests that access a
SimpleLuceneIndex. This class works in conjuction with
the DDSQueryAction Struts Action class.- Author:
- John Weatherley, Ryan Deardorff
- 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 TypeMethodDescriptionvoidaddDateString(String add) Adds a feature to the DateString attribute of the DDSQueryForm objectvoidaddDateStringForUI(String add) Adds a feature to the DateStringForUI attribute of the DDSQueryForm objectvoidDescription of the MethodGets the contextURL attribute of the SimpleQueryForm objectgetCs()Gets the cs attribute of the DDSQueryForm objectGets the dateStrings attribute of the DDSQueryForm objectGets the dateStringsForUI attribute of the DDSQueryForm objectgetEnd()Gets the ending index for the records that will be displayed.getError()Gets the error attribute of the DDSQueryForm objectgetGr()Gets the gr attribute of the DDSQueryForm objectgetHasViewableReview(int index) Gets the hasViewableReview attribute of the DDSQueryForm objectIf no keyword entered and no vocabs have been selected, return "true", otherwise return "false"getIsPartOfDRC(int index) Is the resource in the DRC?Gets the keywords attribute of the DDSQueryForm objectGets the user keywords, truncated for feedback displaygetKy()Gets the ky attribute of the DDSQueryForm objectGets the length of iterations to loop over the results array.Gets the metadata attribute of the SimpleQueryForm objectGets all request parameters except the refined query Rq parameter.Gets the numResults attribute of the SimpleQueryForm objectGets the offset into the results array to begin iterating.Gets the pagingLinks attribute of the DDSQueryForm objectgetQ()Gets the query string entered by the user.getQe()Gets the query string entered by the user, encoded for use in a URL string.getRe()Gets the re attribute of the DDSQueryForm objectGets the resourceResultLinkRedirectURL attribute of the DDSQueryForm objectGets the search results returned by theSimpleLuceneIndex.Gets the search results returned by theSimpleLuceneIndexas a List (compatible with c:forEach iteration)getRq()Gets the refined query string entered by the user, used to search within results.Gets the searchType attribute of the DDSQueryForm objectgetStart()Gets the starting index for the records that will be displayed.getSu()Gets the su attribute of the DDSQueryForm objectGets the total number of resources that are currently discoverable.getView()view indicates which flavor of UI display is rendered (RSS for example)Gets the vocab attribute of the DDSQueryForm objectGets the wnfrom attribute of the DDSQueryForm objectvoidDescription of the MethodvoidsetContextURL(String contextURL) Sets the contextURL attribute of the SimpleQueryForm objectvoidSets the cs attribute of the DDSQueryForm objectstatic voidsetDebug(boolean db) Sets the debug attribute of the objectvoidSets the error attribute of the DDSQueryForm objectvoidSets the gr attribute of the DDSQueryForm objectvoidsetIsEmptySearch(boolean isEmptySearch) Sets the isEmptySearch attribute of the DDSQueryForm objectvoidSets the ky attribute of the DDSQueryForm objectvoidsetMetadata(String metadata) Sets the metadata attribute of the SimpleQueryForm objectvoidSets the q attribute of the SimpleQueryForm objectvoidSets the re attribute of the DDSQueryForm objectvoidsetRequest(HttpServletRequest request) Sets the request attribute of the SimpleQueryForm object.voidSets the resourceResultLinkRedirectURL attribute of the DDSQueryForm objectvoidsetResults(ResultDocList results) Sets the search results returned by theSimpleLuceneIndex.voidSets the refined query string entered by the user, used to search within results.voidsetSearchType(String str) Sets the searchType attribute of the DDSQueryForm objectvoidsetStart(int start) Sets the starting index for the records to display.voidSets the su attribute of the DDSQueryForm objectvoidsetTotalNumResources(int numResources) Sets the totalNumResources that are currently discoverable.voidview indicates which flavor of UI display is rendered (RSS for example)voidsetVocabInputState(MetadataVocabInputState vocabInputState) Sets the vocabInputState attribute of the DDSQueryForm objectvoidSets the wnfrom attribute of the DDSQueryForm objectMethods inherited from class org.dlese.dpc.dds.action.form.DDSViewResourceForm
clearVocabCache, getCachedVocabValuesInOrder, getCollectionDescription, getForwardUrl, getHasChallengingLearningContexts, getHasDrcReviews, getHasIdeasForUse, getHasOtherReviews, getHasReviews, getHasTeachingTips, getIdSearchTitle, getIdSearchUrl, getIsDrcReview, getIsDrcReviewInProgress, getItemDocReader, getNumRecordCollections, getPathwayUrl, getPrimaryRequestedCollectionKey, getPrimaryResultDoc, getPrimaryResultDocId, getRecordCollection, getRecordCollections, getRecordFilename, getRecordId, getRecordIds, getRecordIds, getRelDisplayed, getResourceTitle, getResourceUrl, getVocab, getVocabCacheFeedbackString, setCollectionKey, setContextUrl, setForwardUrl, setIdSearch, setPrimaryResultDoc, setPrimaryResultDocCollectionKey, setPrimaryResultDocId, setRecordFilename, setRecordId, setRelDisplayed, setSearcher, setSystem, setVocab, setVocabCacheFeedbackString, setVocabCacheGroup, setVocabCacheValueMethods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate
-
Constructor Details
-
DDSQueryForm
public DDSQueryForm()Constructor for the DDSQueryForm object
-
-
Method Details
-
resetPagingLinks
public void resetPagingLinks()Description of the Method -
setView
view indicates which flavor of UI display is rendered (RSS for example)- Parameters:
view- The new view value
-
getView
view indicates which flavor of UI display is rendered (RSS for example)- Returns:
- The viewType value
-
setWnfrom
Sets the wnfrom attribute of the DDSQueryForm object- Parameters:
wnfrom- The new wnfrom value
-
getWnfrom
Gets the wnfrom attribute of the DDSQueryForm object- Returns:
- The wnfrom value
-
getDateStrings
Gets the dateStrings attribute of the DDSQueryForm object- Returns:
- The dateStrings value
-
clearDateStrings
public void clearDateStrings()Description of the Method -
addDateString
Adds a feature to the DateString attribute of the DDSQueryForm object- Parameters:
add- The feature to be added to the DateString attribute
-
addDateStringForUI
Adds a feature to the DateStringForUI attribute of the DDSQueryForm object- Parameters:
add- The feature to be added to the DateStringForUI attribute
-
getDateStringsForUI
Gets the dateStringsForUI attribute of the DDSQueryForm object- Returns:
- The dateStringsForUI value
-
setSearchType
Sets the searchType attribute of the DDSQueryForm object- Parameters:
str- The new searchType value
-
getSearchType
Gets the searchType attribute of the DDSQueryForm object- Returns:
- The searchType value
-
setVocabInputState
Sets the vocabInputState attribute of the DDSQueryForm object- Parameters:
vocabInputState- The new vocabInputState value
-
getVocabInputState
Gets the vocab attribute of the DDSQueryForm object- Returns:
- The vocab value
-
setError
Sets the error attribute of the DDSQueryForm object- Overrides:
setErrorin classDDSViewResourceForm- Parameters:
error- The new error value
-
getError
Gets the error attribute of the DDSQueryForm object- Overrides:
getErrorin classDDSViewResourceForm- Returns:
- The error value
-
setResourceResultLinkRedirectURL
Sets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object- Overrides:
setResourceResultLinkRedirectURLin classDDSViewResourceForm- Parameters:
str- The new resourceResultLinkRedirectURL value
-
getResourceResultLinkRedirectURL
Gets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object- Overrides:
getResourceResultLinkRedirectURLin classDDSViewResourceForm- Returns:
- The resourceResultLinkRedirectURL value
-
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
-
getResults
Gets the search results returned by theSimpleLuceneIndex.- Returns:
- The results value
-
getResultsList
Gets the search results returned by theSimpleLuceneIndexas a List (compatible with c:forEach iteration)- Returns:
- The resultsList value
-
setResults
Sets the search results returned by theSimpleLuceneIndex.- Parameters:
results- The new results value.
-
getIsPartOfDRC
Is the resource in the DRC?- Parameters:
index-- Returns:
- The isPartOfDRC value
-
getHasViewableReview
Gets the hasViewableReview attribute of the DDSQueryForm object- Parameters:
index-- Returns:
- The hasViewableReview 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
-
getTotalNumResources
Gets the total number of resources that are currently discoverable.- Returns:
- The number of resource currently discoverable.
-
setTotalNumResources
public void setTotalNumResources(int numResources) Sets the totalNumResources that are currently discoverable.- Parameters:
numResources- The totalNumResources that are currently discoverable.
-
getQ
Gets the query string entered by the user.- Returns:
- The query value.
-
getGr
Gets the gr attribute of the DDSQueryForm object- Returns:
- The gr value
-
setGr
Sets the gr attribute of the DDSQueryForm object- Parameters:
gradeLevel- The new gr value
-
getRe
Gets the re attribute of the DDSQueryForm object- Returns:
- The re value
-
setRe
Sets the re attribute of the DDSQueryForm object- Parameters:
resourceType- The new re value
-
getCs
Gets the cs attribute of the DDSQueryForm object- Returns:
- The cs value
-
setCs
Sets the cs attribute of the DDSQueryForm object- Parameters:
contentStandard- The new cs value
-
getSu
Gets the su attribute of the DDSQueryForm object- Returns:
- The su value
-
setSu
Sets the su attribute of the DDSQueryForm object- Parameters:
subject- The new su value
-
getKy
Gets the ky attribute of the DDSQueryForm object- Returns:
- The ky value
-
setKy
Sets the ky attribute of the DDSQueryForm object- Parameters:
collection- The new ky 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.
-
getKeywordsTruncated
Gets the user keywords, truncated for feedback display- Returns:
- The keywordsTruncated value
-
getKeywords
Gets the keywords attribute of the DDSQueryForm object- Returns:
- The keywords value
-
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
-
getIsEmptySearch
If no keyword entered and no vocabs have been selected, return "true", otherwise return "false"- Returns:
- The isEmptySearch value
-
setIsEmptySearch
public void setIsEmptySearch(boolean isEmptySearch) Sets the isEmptySearch attribute of the DDSQueryForm object- Parameters:
isEmptySearch- The new isEmptySearch value
-
getNrqParams
Gets all request parameters except the refined query Rq parameter.- Returns:
- The nrqParams value.
-
setStart
public void setStart(int start) Sets the starting index for the records to display.- Parameters:
start- The new start 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
-
getPagingLinks
Gets the pagingLinks attribute of the DDSQueryForm object- Returns:
- The pagingLinks 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
-
setRequest
Sets the request attribute of the SimpleQueryForm object.- Parameters:
request- The new request value
-
setDebug
public static void setDebug(boolean db) Sets the debug attribute of the object- Parameters:
db- The new debug value
-