Class AsnCATPlugin
- All Implemented Interfaces:
CATHelperPlugin
- Direct Known Subclasses:
EngPathFrameworkPlugin,MastFrameworkPlugin,NcsAnnoFrameworkPlugin,NcsItemFrameworkPlugin
These plugins make use of a GradeRangeHelper to map GradeRange
vocabs defined in the schema to corresponding CAT API constraints.
- Author:
- ostwald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CATServiceHelperGets the catHelper attribute of the AsnCATPlugin objectGets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document.Gets the gradeRangeOptionValue corresponding to the lowest selected gradeRange in the current instance document.abstract StringGets the descriptionPath for the plugin's frameworkprotected StringgetGradeLevelOptionValue(int i) Convert the provided CAT API gradeLevel to the corresponding option valueprotected GradeRangeHelperGets the gradeRangeHelper attribute of the AsnCATPlugin objectabstract ListGets the gradeRanges corresponding to the grades searchable in the CAT service (and which can be specified in the control box).abstract StringGets the gradeRangePath attribute of the SuggestionServiceHelper objectabstract StringGets the keywordPath for the plugin's frameworkabstract ListSpecifies the fields besides url, description and gradeRanges that a particular framework wants to control via the CAT UI.intgetSelectedCATEndGrade(String[] gradeConstraints) Returns the lesser of the selected gradeLevel constraints selected in the CAT UI (as an integer).intgetSelectedCATStartGrade(String[] gradeConstraints) Returns the greater of the selected gradeLevel constraints selected in the CAT UI (as an integer).abstract StringGets the subjectPath for the plugin's frameworkprotected abstract GradeRangeHelperInitialize a gradeRangeHelper instance for the gradeRange Vocab values of a specific framework.static voidNOT YET DOCUMENTEDMethods inherited from class org.dlese.dpc.schemedit.standards.AbstractCATHelperPlugin
getRecordDescription, getRecordGradeRanges, getRecordKeywords, getRecordSubjects, getRecordSubjects, init, normalizeSubjectValue
-
Constructor Details
-
AsnCATPlugin
public AsnCATPlugin()
-
-
Method Details
-
getCatHelper
Gets the catHelper attribute of the AsnCATPlugin object- Overrides:
getCatHelperin classAbstractCATHelperPlugin- Returns:
- The catHelper value
-
getGradeRangeHelper
Gets the gradeRangeHelper attribute of the AsnCATPlugin object- Returns:
- The gradeRangeHelper value
-
gradeRangeHelperInit
Initialize a gradeRangeHelper instance for the gradeRange Vocab values of a specific framework.- Returns:
- a gradeRange helper for the gradeRange vocabs
- See Also:
-
getOptionalCatUIFields
Specifies the fields besides url, description and gradeRanges that a particular framework wants to control via the CAT UI.For example, some frameworks want to provide controls for the "subject" field. In this case the list returned would contain "subjects"
- Specified by:
getOptionalCatUIFieldsin interfaceCATHelperPlugin- Overrides:
getOptionalCatUIFieldsin classAbstractCATHelperPlugin- Returns:
- The optionalCatUIFields value
-
getGradeLevelOptionValue
Convert the provided CAT API gradeLevel to the corresponding option value- Parameters:
i- a string representation of the provided int that can be used as a value in the CAT UI- Returns:
- The gradeLevelOptionValue, or -1 if the provided value could not be processed as a CAT UI value.
-
getDerivedCATStartGrade
Gets the gradeRangeOptionValue corresponding to the lowest selected gradeRange in the current instance document.NOTE: We have to convert from the lowest gradeRangeVocab to it's gradeRangeOption value
- Specified by:
getDerivedCATStartGradein interfaceCATHelperPlugin- Specified by:
getDerivedCATStartGradein classAbstractCATHelperPlugin- Returns:
- The startGradeOptionValue value
-
getDerivedCATEndGrade
Gets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document.NOTE: We return an gradeRangeOptionValue, so we have to convert from the lowest gradeRangeVocab to it's gradeRangeOption value
- Specified by:
getDerivedCATEndGradein interfaceCATHelperPlugin- Specified by:
getDerivedCATEndGradein classAbstractCATHelperPlugin- Returns:
- The endGrade value
-
getGradeRangePath
Gets the gradeRangePath attribute of the SuggestionServiceHelper object- Specified by:
getGradeRangePathin classAbstractCATHelperPlugin- Returns:
- The gradeRangePath value
-
getKeywordPath
Gets the keywordPath for the plugin's framework- Specified by:
getKeywordPathin classAbstractCATHelperPlugin- Returns:
- The keywordPath value
-
getDescriptionPath
Gets the descriptionPath for the plugin's framework- Specified by:
getDescriptionPathin classAbstractCATHelperPlugin- Returns:
- The descriptionPath value
-
getSubjectPath
Gets the subjectPath for the plugin's framework- Specified by:
getSubjectPathin classAbstractCATHelperPlugin- Returns:
- The subjectPath value
-
getSelectedCATStartGrade
Returns the greater of the selected gradeLevel constraints selected in the CAT UI (as an integer).NOTE: Assumes CAT UI specifies two constraints, and that both can be parsed as integers.
- Specified by:
getSelectedCATStartGradein interfaceCATHelperPlugin- Specified by:
getSelectedCATStartGradein classAbstractCATHelperPlugin- Parameters:
gradeConstraints- NOT YET DOCUMENTED- Returns:
- The startGrade value
-
getSelectedCATEndGrade
Returns the lesser of the selected gradeLevel constraints selected in the CAT UI (as an integer).NOTE: Assumes CAT UI specifies two constraints, and that both can be parsed as integers.
- Specified by:
getSelectedCATEndGradein interfaceCATHelperPlugin- Specified by:
getSelectedCATEndGradein classAbstractCATHelperPlugin- Parameters:
gradeConstraints- NOT YET DOCUMENTED- Returns:
- The endGrade value
-
getGradeRangeOptions
Gets the gradeRanges corresponding to the grades searchable in the CAT service (and which can be specified in the control box).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")
- Specified by:
getGradeRangeOptionsin interfaceCATHelperPlugin- Specified by:
getGradeRangeOptionsin classAbstractCATHelperPlugin- Returns:
- The gradeRanges value
-
prtlnErr
NOT YET DOCUMENTED- Parameters:
s- NOT YET DOCUMENTED
-