Class AdnFrameworkPlugin

java.lang.Object
org.dlese.dpc.schemedit.standards.AbstractCATHelperPlugin
org.dlese.dpc.schemedit.standards.adn.AdnFrameworkPlugin
All Implemented Interfaces:
CATHelperPlugin

public class AdnFrameworkPlugin extends AbstractCATHelperPlugin
CATHelperPlugin for the ADN framework
Author:
ostwald
  • Constructor Details

    • AdnFrameworkPlugin

      public AdnFrameworkPlugin()
  • Method Details

    • getCatHelper

      protected DleseSuggestionServiceHelper getCatHelper()
      Gets the catHelper attribute of the AdnFrameworkPlugin object
      Overrides:
      getCatHelper in class AbstractCATHelperPlugin
      Returns:
      The catHelper value
    • getOptionalCatUIFields

      public List getOptionalCatUIFields()
      Gets the optionalCatUIFields attribute of the AdnFrameworkPlugin object
      Specified by:
      getOptionalCatUIFields in interface CATHelperPlugin
      Overrides:
      getOptionalCatUIFields in class AbstractCATHelperPlugin
      Returns:
      The optionalCatUIFields value
    • getGradeRangePath

      public String getGradeRangePath()
      Gets the gradeRangePath attribute of the DleseSuggestionServiceHelper object
      Specified by:
      getGradeRangePath in class AbstractCATHelperPlugin
      Returns:
      The gradeRangePath value
    • getDescriptionPath

      public String getDescriptionPath()
      Gets the descriptionPath attribute of the AdnFrameworkPlugin object
      Specified by:
      getDescriptionPath in class AbstractCATHelperPlugin
      Returns:
      The descriptionPath value
    • getKeywordPath

      public String getKeywordPath()
      Gets the keywordPath attribute of the DleseSuggestionServiceHelper object
      Specified by:
      getKeywordPath in class AbstractCATHelperPlugin
      Returns:
      The keywordPath value
    • getRecordGradeRanges

      public String[] getRecordGradeRanges()
      Gets the recordGradeRange vocab values from the instance document (i.e., the selected gradeRange vocab values)
      Specified by:
      getRecordGradeRanges in interface CATHelperPlugin
      Overrides:
      getRecordGradeRanges in class AbstractCATHelperPlugin
      Returns:
      The recordGradeRanges value
    • getSubjectPath

      public String getSubjectPath()
      Gets the subjectPath attribute of the AdnFrameworkPlugin object
      Specified by:
      getSubjectPath in class AbstractCATHelperPlugin
      Returns:
      The subjectPath value
    • getSelectedCATStartGrade

      public int getSelectedCATStartGrade(String[] gradeConstraints)
      Compute a CAT API value for the startGrade (lowest grade level) of the selected grade ranges.

      The gradeConstraints for the adn framework are strings, such as "DLESE:Primary elementary", which represent a gradeRange (e.g., 0-2). This method determines the lowest bound of the supplied gradeConstraints.

      Specified by:
      getSelectedCATStartGrade in interface CATHelperPlugin
      Specified by:
      getSelectedCATStartGrade in class AbstractCATHelperPlugin
      Parameters:
      gradeConstraints - NOT YET DOCUMENTED
      Returns:
      The startGrade value
    • getSelectedCATEndGrade

      public int getSelectedCATEndGrade(String[] gradeConstraints)
      Compute a CAT API value for the endGrade (highest grade level) of the selected grade ranges.

      The gradeConstraints for the adn framework are strings, such as "DLESE:Primary elementary", which represent a gradeRange (e.g., 0-2). This method determines the highest bound of the supplied gradeConstraints.

      Specified by:
      getSelectedCATEndGrade in interface CATHelperPlugin
      Specified by:
      getSelectedCATEndGrade in class AbstractCATHelperPlugin
      Parameters:
      gradeConstraints - NOT YET DOCUMENTED
      Returns:
      The endGrade value
    • getGradeRangeOptions

      public List getGradeRangeOptions()
      Gets the gradeRanges options corresponding to the grades searchable in the ADN framework service.

      The returned items contain two fields

      • value - corresponding to a grade-level vocab defined for the ADN framework (e.g., "DLESE:Primary elementary")
      • label - that indicates grade-levels in a human-readable form (e.g., "Primary elementary (0-2)")
      Specified by:
      getGradeRangeOptions in interface CATHelperPlugin
      Specified by:
      getGradeRangeOptions in class AbstractCATHelperPlugin
      Returns:
      A list of LabelValueBeans used to populate the GradeRange widget in the CAT UI
    • getDerivedCATStartGrade

      public String getDerivedCATStartGrade()
      Gets the gradeRangeOptionValue corresponding to the lowest selected gradeRange vocab in the current instance document.

      NOTE: in the case of ADN, gradeRange vocab values are same as gradeRangeOption values, so there is no need to convert, as there is for frameworks in which this isn't the case!

      Specified by:
      getDerivedCATStartGrade in interface CATHelperPlugin
      Specified by:
      getDerivedCATStartGrade in class AbstractCATHelperPlugin
      Returns:
      The startGradeOptionValue value
    • getDerivedCATEndGrade

      public String getDerivedCATEndGrade()
      Gets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document.
      Specified by:
      getDerivedCATEndGrade in interface CATHelperPlugin
      Specified by:
      getDerivedCATEndGrade in class AbstractCATHelperPlugin
      Returns:
      The endGrade value