DLESE Tools
v1.6.0

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

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.dlese.dpc.dds.action.form.DDSViewResourceForm
          extended by org.dlese.dpc.dds.action.form.DDSQueryForm
All Implemented Interfaces:
Serializable

public final class DDSQueryForm
extends DDSViewResourceForm
implements 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:
DDSQueryAction, Serialized Form

Nested Class Summary
 class DDSQueryForm.ParamPair
          Holds paramter, value pairs.
 
Field Summary
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
DDSQueryForm()
          Constructor for the DDSQueryForm object
 
Method Summary
 void addDateString(String add)
          Adds a feature to the DateString attribute of the DDSQueryForm object
 void addDateStringForUI(String add)
          Adds a feature to the DateStringForUI attribute of the DDSQueryForm object
 void clearDateStrings()
          Description of the Method
 String getContextURL()
          Gets the contextURL attribute of the SimpleQueryForm object
 String getCs()
          Gets the cs attribute of the DDSQueryForm object
 ArrayList getDateStrings()
          Gets the dateStrings attribute of the DDSQueryForm object
 String getDateStringsForUI()
          Gets the dateStringsForUI attribute of the DDSQueryForm object
 String getEnd()
          Gets the ending index for the records that will be displayed.
 String getError()
          Gets the error attribute of the DDSQueryForm object
 String getGr()
          Gets the gr attribute of the DDSQueryForm object
 String getHasViewableReview(int index)
          Gets the hasViewableReview attribute of the DDSQueryForm object
 String getIsEmptySearch()
          If no keyword entered and no vocabs have been selected, return "true", otherwise return "false"
 String getIsPartOfDRC(int index)
          Is the resource in the DRC?
 String getKeywords()
          Gets the keywords attribute of the DDSQueryForm object
 String getKeywordsTruncated()
          Gets the user keywords, truncated for feedback display
 String getKy()
          Gets the ky attribute of the DDSQueryForm object
 String getLength()
          Gets the length of iterations to loop over the results array.
 String getMetadata()
          Gets the metadata attribute of the SimpleQueryForm object
 ArrayList getNrqParams()
          Gets all request parameters except the refined query Rq parameter.
 String getNumResults()
          Gets the numResults attribute of the SimpleQueryForm object
 String getOffset()
          Gets the offset into the results array to begin iterating.
 String getPagingLinks()
          Gets the pagingLinks attribute of the DDSQueryForm object
 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 getRe()
          Gets the re attribute of the DDSQueryForm object
 String getResourceResultLinkRedirectURL()
          Gets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object
 ResultDocList getResults()
          Gets the search results returned by the SimpleLuceneIndex.
 List getResultsList()
          Gets the search results returned by the SimpleLuceneIndex as a List (compatible with c:forEach iteration)
 String getRq()
          Gets the refined query string entered by the user, used to search within results.
 String getSearchType()
          Gets the searchType attribute of the DDSQueryForm object
 String getStart()
          Gets the starting index for the records that will be displayed.
 String getSu()
          Gets the su attribute of the DDSQueryForm object
 String getTotalNumResources()
          Gets the total number of resources that are currently discoverable.
 String getView()
          view indicates which flavor of UI display is rendered (RSS for example)
 MetadataVocabInputState getVocabInputState()
          Gets the vocab attribute of the DDSQueryForm object
 String getWnfrom()
          Gets the wnfrom attribute of the DDSQueryForm object
 void resetPagingLinks()
          Description of the Method
 void setContextURL(String contextURL)
          Sets the contextURL attribute of the SimpleQueryForm object
 void setCs(String contentStandard)
          Sets the cs attribute of the DDSQueryForm object
static void setDebug(boolean db)
          Sets the debug attribute of the object
 void setError(String error)
          Sets the error attribute of the DDSQueryForm object
 void setGr(String gradeLevel)
          Sets the gr attribute of the DDSQueryForm object
 void setIsEmptySearch(boolean isEmptySearch)
          Sets the isEmptySearch attribute of the DDSQueryForm object
 void setKy(String collection)
          Sets the ky attribute of the DDSQueryForm object
 void setMetadata(String metadata)
          Sets the metadata attribute of the SimpleQueryForm object
 void setQ(String queryString)
          Sets the q attribute of the SimpleQueryForm object
 void setRe(String resourceType)
          Sets the re attribute of the DDSQueryForm object
 void setRequest(HttpServletRequest request)
          Sets the request attribute of the SimpleQueryForm object.
 void setResourceResultLinkRedirectURL(String str)
          Sets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object
 void setResults(ResultDocList 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 setSearchType(String str)
          Sets the searchType attribute of the DDSQueryForm object
 void setStart(int start)
          Sets the starting index for the records to display.
 void setSu(String subject)
          Sets the su attribute of the DDSQueryForm object
 void setTotalNumResources(int numResources)
          Sets the totalNumResources that are currently discoverable.
 void setView(String view)
          view indicates which flavor of UI display is rendered (RSS for example)
 void setVocabInputState(MetadataVocabInputState vocabInputState)
          Sets the vocabInputState attribute of the DDSQueryForm object
 void setWnfrom(String wnfrom)
          Sets the wnfrom attribute of the DDSQueryForm object
 
Methods 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, setVocabCacheValue
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, 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

DDSQueryForm

public DDSQueryForm()
Constructor for the DDSQueryForm object

Method Detail

resetPagingLinks

public void resetPagingLinks()
Description of the Method


setView

public void setView(String view)
view indicates which flavor of UI display is rendered (RSS for example)

Parameters:
view - The new view value

getView

public String getView()
view indicates which flavor of UI display is rendered (RSS for example)

Returns:
The viewType value

setWnfrom

public void setWnfrom(String wnfrom)
Sets the wnfrom attribute of the DDSQueryForm object

Parameters:
wnfrom - The new wnfrom value

getWnfrom

public String getWnfrom()
Gets the wnfrom attribute of the DDSQueryForm object

Returns:
The wnfrom value

getDateStrings

public ArrayList getDateStrings()
Gets the dateStrings attribute of the DDSQueryForm object

Returns:
The dateStrings value

clearDateStrings

public void clearDateStrings()
Description of the Method


addDateString

public void addDateString(String add)
Adds a feature to the DateString attribute of the DDSQueryForm object

Parameters:
add - The feature to be added to the DateString attribute

addDateStringForUI

public void addDateStringForUI(String add)
Adds a feature to the DateStringForUI attribute of the DDSQueryForm object

Parameters:
add - The feature to be added to the DateStringForUI attribute

getDateStringsForUI

public String getDateStringsForUI()
Gets the dateStringsForUI attribute of the DDSQueryForm object

Returns:
The dateStringsForUI value

setSearchType

public void setSearchType(String str)
Sets the searchType attribute of the DDSQueryForm object

Parameters:
str - The new searchType value

getSearchType

public String getSearchType()
Gets the searchType attribute of the DDSQueryForm object

Returns:
The searchType value

setVocabInputState

public void setVocabInputState(MetadataVocabInputState vocabInputState)
Sets the vocabInputState attribute of the DDSQueryForm object

Parameters:
vocabInputState - The new vocabInputState value

getVocabInputState

public MetadataVocabInputState getVocabInputState()
Gets the vocab attribute of the DDSQueryForm object

Returns:
The vocab value

setError

public void setError(String error)
Sets the error attribute of the DDSQueryForm object

Overrides:
setError in class DDSViewResourceForm
Parameters:
error - The new error value

getError

public String getError()
Gets the error attribute of the DDSQueryForm object

Overrides:
getError in class DDSViewResourceForm
Returns:
The error value

setResourceResultLinkRedirectURL

public void setResourceResultLinkRedirectURL(String str)
Sets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object

Overrides:
setResourceResultLinkRedirectURL in class DDSViewResourceForm
Parameters:
str - The new resourceResultLinkRedirectURL value

getResourceResultLinkRedirectURL

public String getResourceResultLinkRedirectURL()
Gets the resourceResultLinkRedirectURL attribute of the DDSQueryForm object

Overrides:
getResourceResultLinkRedirectURL in class DDSViewResourceForm
Returns:
The resourceResultLinkRedirectURL value

getContextURL

public String getContextURL()
Gets the contextURL attribute of the SimpleQueryForm object

Returns:
The contextURL value

setContextURL

public void setContextURL(String contextURL)
Sets the contextURL attribute of the SimpleQueryForm object

Parameters:
contextURL - The new contextURL value

getResults

public ResultDocList getResults()
Gets the search results returned by the SimpleLuceneIndex.

Returns:
The results value

getResultsList

public List getResultsList()
Gets the search results returned by the SimpleLuceneIndex as a List (compatible with c:forEach iteration)

Returns:
The resultsList value

setResults

public void setResults(ResultDocList results)
Sets the search results returned by the SimpleLuceneIndex.

Parameters:
results - The new results value.

getIsPartOfDRC

public String getIsPartOfDRC(int index)
Is the resource in the DRC?

Parameters:
index -
Returns:
The isPartOfDRC value

getHasViewableReview

public String getHasViewableReview(int index)
Gets the hasViewableReview attribute of the DDSQueryForm object

Parameters:
index -
Returns:
The hasViewableReview value

setMetadata

public void setMetadata(String metadata)
Sets the metadata attribute of the SimpleQueryForm object

Parameters:
metadata - The new metadata value

getMetadata

public String getMetadata()
Gets the metadata attribute of the SimpleQueryForm object

Returns:
The metadata value

getNumResults

public String getNumResults()
Gets the numResults attribute of the SimpleQueryForm object

Returns:
The numResults value

getTotalNumResources

public String 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

public String getQ()
Gets the query string entered by the user.

Returns:
The query value.

getGr

public String getGr()
Gets the gr attribute of the DDSQueryForm object

Returns:
The gr value

setGr

public void setGr(String gradeLevel)
Sets the gr attribute of the DDSQueryForm object

Parameters:
gradeLevel - The new gr value

getRe

public String getRe()
Gets the re attribute of the DDSQueryForm object

Returns:
The re value

setRe

public void setRe(String resourceType)
Sets the re attribute of the DDSQueryForm object

Parameters:
resourceType - The new re value

getCs

public String getCs()
Gets the cs attribute of the DDSQueryForm object

Returns:
The cs value

setCs

public void setCs(String contentStandard)
Sets the cs attribute of the DDSQueryForm object

Parameters:
contentStandard - The new cs value

getSu

public String getSu()
Gets the su attribute of the DDSQueryForm object

Returns:
The su value

setSu

public void setSu(String subject)
Sets the su attribute of the DDSQueryForm object

Parameters:
subject - The new su value

getKy

public String getKy()
Gets the ky attribute of the DDSQueryForm object

Returns:
The ky value

setKy

public void setKy(String collection)
Sets the ky attribute of the DDSQueryForm object

Parameters:
collection - The new ky 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.

getKeywordsTruncated

public String getKeywordsTruncated()
Gets the user keywords, truncated for feedback display

Returns:
The keywordsTruncated value

getKeywords

public String getKeywords()
Gets the keywords attribute of the DDSQueryForm object

Returns:
The keywords value

setQ

public void setQ(String queryString)
Sets the q attribute of the SimpleQueryForm 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

getIsEmptySearch

public String 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

public ArrayList 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

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

getPagingLinks

public String getPagingLinks()
Gets the pagingLinks attribute of the DDSQueryForm object

Returns:
The pagingLinks 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

setRequest

public void setRequest(HttpServletRequest request)
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

DLESE Tools
v1.6.0