Package org.dlese.dpc.serviceclients.cat
Class CATRequestConstraints
java.lang.Object
org.dlese.dpc.serviceclients.cat.CATRequestConstraints
Data Structure to manage information passed to the CATRest Service to
constrain it's search.
- Author:
- ostwald
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStandardDocument(String docId) Adds an item to the standardDocuments attribute of the CATRequestConstraints objectasMap()Return Constraints as a map, keyed by parameter nameGets the author attribute of the CATRequestConstraints objectintGets the endGrade attribute of the CATRequestConstraints objectGets the feedbackStandards attribute of the CATRequestConstraints objectgetId()Gets the id attribute of the CATRequestConstraints objectGets the identifier attribute of the CATRequestConstraints objectGets the keywords attribute of the CATRequestConstraints objectintGets the maxResults attribute of the CATRequestConstraints objectgetQuery()Gets the query attribute of the CATRequestConstraints objectGets the standardDocuments attribute of the CATRequestConstraints object by creating a comma-delimited string joining the items in the standardDocuments listintGets the startGrade attribute of the CATRequestConstraints objectgetTopic()Gets the topic attribute of the CATRequestConstraints objectvoidSets the author attribute of the CATRequestConstraints objectvoidsetEndGrade(int endGrade) Sets the endGrade attribute of the CATRequestConstraints objectvoidSets the feedbackStandards attribute of the CATRequestConstraints objectvoidsetFeedbackStandards(List stds) Sets the feedbackStandards attribute of the CATRequestConstraints objectvoidSets the id attribute of the CATRequestConstraints objectvoidsetIdentifier(String id) Sets the identifier attribute of the CATRequestConstraints objectvoidsetKeywords(String keywords) Sets the keywords attribute of the CATRequestConstraints objectvoidsetMaxResults(int max) Sets the maxResults attribute of the CATRequestConstraints objectvoidSets the query attribute of the CATRequestConstraints objectvoidsetStartGrade(int startGrade) Sets the startGrade attribute of the CATRequestConstraints objectvoidSets the topic attribute of the CATRequestConstraints objectGenerate a queryString to be passed with CAT service requesttoString()Return string representation of constraints map, used for debugging
-
Field Details
-
ANY_GRADE
-
-
Constructor Details
-
CATRequestConstraints
public CATRequestConstraints()Constructor for the CATRequestConstraints object
-
-
Method Details
-
getQuery
Gets the query attribute of the CATRequestConstraints object- Returns:
- The query value
-
setId
Sets the id attribute of the CATRequestConstraints object- Parameters:
id- The new id value
-
getId
Gets the id attribute of the CATRequestConstraints object- Returns:
- The id value
-
setAuthor
Sets the author attribute of the CATRequestConstraints object- Parameters:
author- The new author value
-
getAuthor
Gets the author attribute of the CATRequestConstraints object- Returns:
- The author value
-
setTopic
Sets the topic attribute of the CATRequestConstraints object- Parameters:
topic- The new topic value
-
getTopic
Gets the topic attribute of the CATRequestConstraints object- Returns:
- The topic value
-
getStandardDocuments
Gets the standardDocuments attribute of the CATRequestConstraints object by creating a comma-delimited string joining the items in the standardDocuments list- Returns:
- The standardDocuments value
-
addStandardDocument
Adds an item to the standardDocuments attribute of the CATRequestConstraints object- Parameters:
docId- asn docId to be added to standardDocuments
-
setStartGrade
public void setStartGrade(int startGrade) Sets the startGrade attribute of the CATRequestConstraints object- Parameters:
startGrade- The new startGrade value
-
getStartGrade
public int getStartGrade()Gets the startGrade attribute of the CATRequestConstraints object- Returns:
- The startGrade value
-
setEndGrade
public void setEndGrade(int endGrade) Sets the endGrade attribute of the CATRequestConstraints object- Parameters:
endGrade- The new endGrade value
-
getEndGrade
public int getEndGrade()Gets the endGrade attribute of the CATRequestConstraints object- Returns:
- The endGrade value
-
setKeywords
Sets the keywords attribute of the CATRequestConstraints object- Parameters:
keywords- The new keywords value
-
getKeywords
Gets the keywords attribute of the CATRequestConstraints object- Returns:
- The keywords value
-
setQuery
Sets the query attribute of the CATRequestConstraints object- Parameters:
q- The new query value (used to specifiy resourceUrl)
-
getMaxResults
public int getMaxResults()Gets the maxResults attribute of the CATRequestConstraints object- Returns:
- The maxResults value
-
setMaxResults
public void setMaxResults(int max) Sets the maxResults attribute of the CATRequestConstraints object- Parameters:
max- The new maxResults value
-
getIdentifier
Gets the identifier attribute of the CATRequestConstraints object- Returns:
- The identifier value
-
setIdentifier
Sets the identifier attribute of the CATRequestConstraints object- Parameters:
id- The new identifier value
-
setFeedbackStandards
Sets the feedbackStandards attribute of the CATRequestConstraints object- Parameters:
stds- The new feedbackStandards value
-
setFeedbackStandards
Sets the feedbackStandards attribute of the CATRequestConstraints object- Parameters:
s- The new feedbackStandards value
-
getFeedbackStandards
Gets the feedbackStandards attribute of the CATRequestConstraints object- Returns:
- The feedbackStandards value
-
asMap
Return Constraints as a map, keyed by parameter name- Returns:
- Contraints map
-
toQueryString
Generate a queryString to be passed with CAT service request- Returns:
- a queryString
-
toString
Return string representation of constraints map, used for debugging
-