public abstract class AsnCATPlugin extends AbstractCATHelperPlugin
These plugins make use of a GradeRangeHelper to map GradeRange
vocabs defined in the schema to corresponding CAT API constraints.
| Constructor and Description |
|---|
AsnCATPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected CATServiceHelper |
getCatHelper()
Gets the catHelper attribute of the AsnCATPlugin object
|
java.lang.String |
getDerivedCATEndGrade()
Gets the gradeRangeOptionValue corresponding to the highest selected
gradeRange in the current instance document.
|
java.lang.String |
getDerivedCATStartGrade()
Gets the gradeRangeOptionValue corresponding to the lowest selected
gradeRange in the current instance document.
|
abstract java.lang.String |
getDescriptionPath()
Gets the descriptionPath for the plugin's framework
|
protected java.lang.String |
getGradeLevelOptionValue(int i)
Convert the provided CAT API gradeLevel to the corresponding option value
|
protected GradeRangeHelper |
getGradeRangeHelper()
Gets the gradeRangeHelper attribute of the AsnCATPlugin object
|
abstract java.util.List |
getGradeRangeOptions()
Gets the gradeRanges corresponding to the grades searchable in the CAT
service (and which can be specified in the control box).
|
abstract java.lang.String |
getGradeRangePath()
Gets the gradeRangePath attribute of the SuggestionServiceHelper object
|
abstract java.lang.String |
getKeywordPath()
Gets the keywordPath for the plugin's framework
|
abstract java.util.List |
getOptionalCatUIFields()
Specifies the fields besides url, description and gradeRanges that a
particular framework wants to control via the CAT UI.
|
int |
getSelectedCATEndGrade(java.lang.String[] gradeConstraints)
Returns the lesser of the selected gradeLevel constraints selected in the
CAT UI (as an integer).
|
int |
getSelectedCATStartGrade(java.lang.String[] gradeConstraints)
Returns the greater of the selected gradeLevel constraints selected in the
CAT UI (as an integer).
|
abstract java.lang.String |
getSubjectPath()
Gets the subjectPath for the plugin's framework
|
protected abstract GradeRangeHelper |
gradeRangeHelperInit()
Initialize a gradeRangeHelper instance for the gradeRange Vocab values of a
specific framework.
|
static void |
prtlnErr(java.lang.String s)
NOT YET DOCUMENTED
|
getRecordDescription, getRecordGradeRanges, getRecordKeywords, getRecordSubjects, getRecordSubjects, init, normalizeSubjectValueprotected CATServiceHelper getCatHelper()
getCatHelper in class AbstractCATHelperPluginprotected GradeRangeHelper getGradeRangeHelper()
protected abstract GradeRangeHelper gradeRangeHelperInit()
GradeRangeHelperpublic abstract java.util.List getOptionalCatUIFields()
For example, some frameworks want to provide controls for the "subject" field. In this case the list returned would contain "subjects"
getOptionalCatUIFields in interface CATHelperPlugingetOptionalCatUIFields in class AbstractCATHelperPluginprotected java.lang.String getGradeLevelOptionValue(int i)
i - a string representation of the provided int that can be used as a
value in the CAT UIpublic java.lang.String getDerivedCATStartGrade()
NOTE: We have to convert from the lowest gradeRangeVocab to it's gradeRangeOption value
getDerivedCATStartGrade in interface CATHelperPlugingetDerivedCATStartGrade in class AbstractCATHelperPluginpublic java.lang.String getDerivedCATEndGrade()
NOTE: We return an gradeRangeOptionValue, so we have to convert from the lowest gradeRangeVocab to it's gradeRangeOption value
getDerivedCATEndGrade in interface CATHelperPlugingetDerivedCATEndGrade in class AbstractCATHelperPluginpublic abstract java.lang.String getGradeRangePath()
getGradeRangePath in class AbstractCATHelperPluginpublic abstract java.lang.String getKeywordPath()
getKeywordPath in class AbstractCATHelperPluginpublic abstract java.lang.String getDescriptionPath()
getDescriptionPath in class AbstractCATHelperPluginpublic abstract java.lang.String getSubjectPath()
getSubjectPath in class AbstractCATHelperPluginpublic int getSelectedCATStartGrade(java.lang.String[] gradeConstraints)
NOTE: Assumes CAT UI specifies two constraints, and that both can be parsed as integers.
getSelectedCATStartGrade in interface CATHelperPlugingetSelectedCATStartGrade in class AbstractCATHelperPlugingradeConstraints - NOT YET DOCUMENTEDpublic int getSelectedCATEndGrade(java.lang.String[] gradeConstraints)
NOTE: Assumes CAT UI specifies two constraints, and that both can be parsed as integers.
getSelectedCATEndGrade in interface CATHelperPlugingetSelectedCATEndGrade in class AbstractCATHelperPlugingradeConstraints - NOT YET DOCUMENTEDpublic abstract java.util.List getGradeRangeOptions()
NOTE: the "values" should correspond to what the service expects, while the "labels" are human-meaningful representations of the values. E.g., one member of the gradeRangeOption list might be (value: "1", label: "1st Grade")
getGradeRangeOptions in interface CATHelperPlugingetGradeRangeOptions in class AbstractCATHelperPluginpublic static void prtlnErr(java.lang.String s)
s - NOT YET DOCUMENTED