DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.standards
Class AbstractCATHelperPlugin

java.lang.Object
  extended by org.dlese.dpc.schemedit.standards.AbstractCATHelperPlugin
All Implemented Interfaces:
CATHelperPlugin
Direct Known Subclasses:
AdnFrameworkPlugin, AsnCATPlugin

public abstract class AbstractCATHelperPlugin
extends Object
implements CATHelperPlugin

Abstract class for framework-specific plugins to the CATServiceHelper

Author:
ostwald

Constructor Summary
AbstractCATHelperPlugin()
           
 
Method Summary
protected  CATServiceHelper getCatHelper()
          Gets the catHelper attribute of the AbstractCATHelperPlugin object
abstract  String getDerivedCATEndGrade()
          Gets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document.
abstract  String getDerivedCATStartGrade()
          Gets the startGradeContraintOptionValue corresponsing to the lowest gradeRange selected in the current record.
abstract  String getDescriptionPath()
          Gets the descriptionPath attribute of the AbstractCATHelperPlugin object
abstract  List getGradeRangeOptions()
          Gets the gradeRangeOptions attribute of the AbstractCATHelperPlugin object
abstract  String getGradeRangePath()
          Gets the gradeRangePath attribute of the SuggestionServiceHelper object
abstract  String getKeywordPath()
          Gets the keywordPath attribute of the SuggestionServiceHelper object
 List getOptionalCatUIFields()
          Gets the fields besides url, description and graderanges that a particular framework wants to control via the CAT UI.
 String getRecordDescription()
          Gets the value of the description field of the current metadata record, concatenating multiple description field values in the case where the description field is repeating.
 String[] getRecordGradeRanges()
          Returns the gradeRange vocab values currently selected in the record
 String[] getRecordKeywords()
          Gets the keyword values currently defined in the record.
 String[] getRecordSubjects()
          Gets the recordSubjects from the current instance doc using the subjectPath defined in the concrete plugin instance.
 String[] getRecordSubjects(List subjectPaths)
          Gets the recordSubjects from the current instance doc using the supplied subjectPaths.
abstract  int getSelectedCATEndGrade(String[] gradeConstraints)
          Compute a end Grade value based on currently selected CAT grade Level controls
abstract  int getSelectedCATStartGrade(String[] gradeConstraints)
          Compute a startGrade value based on currently selected CAT grade Level controls
abstract  String getSubjectPath()
          Gets the subjectPath attribute of the AbstractCATHelperPlugin object
 void init(CATServiceHelper helper)
          NOT YET DOCUMENTED
protected  String normalizeSubjectValue(String value)
          Hook to preprocess subject values before submitting them to the CAT API
static void prtlnErr(String s)
          NOT YET DOCUMENTED
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCATHelperPlugin

public AbstractCATHelperPlugin()
Method Detail

getCatHelper

protected CATServiceHelper getCatHelper()
Gets the catHelper attribute of the AbstractCATHelperPlugin object

Returns:
The catHelper value

init

public void init(CATServiceHelper helper)
NOT YET DOCUMENTED

Specified by:
init in interface CATHelperPlugin
Parameters:
helper - NOT YET DOCUMENTED

getOptionalCatUIFields

public List getOptionalCatUIFields()
Gets the fields besides url, description and graderanges that a particular framework wants to control via the CAT UI.

Specified by:
getOptionalCatUIFields in interface CATHelperPlugin
Returns:
The optionalCatUIFields value

getRecordSubjects

public String[] getRecordSubjects(List subjectPaths)
Gets the recordSubjects from the current instance doc using the supplied subjectPaths.

Parameters:
subjectPaths - a list of xpaths containing subject values
Returns:
The recordSubjects value

normalizeSubjectValue

protected String normalizeSubjectValue(String value)
Hook to preprocess subject values before submitting them to the CAT API

Parameters:
value - NOT YET DOCUMENTED
Returns:
NOT YET DOCUMENTED

getRecordSubjects

public String[] getRecordSubjects()
Gets the recordSubjects from the current instance doc using the subjectPath defined in the concrete plugin instance.

Specified by:
getRecordSubjects in interface CATHelperPlugin
Returns:
The recordSubjects value

getRecordDescription

public String getRecordDescription()
Gets the value of the description field of the current metadata record, concatenating multiple description field values in the case where the description field is repeating.

Specified by:
getRecordDescription in interface CATHelperPlugin
Returns:
The description

getRecordKeywords

public String[] getRecordKeywords()
Gets the keyword values currently defined in the record.

Specified by:
getRecordKeywords in interface CATHelperPlugin
Returns:
The recordKeywords value

getRecordGradeRanges

public String[] getRecordGradeRanges()
Returns the gradeRange vocab values currently selected in the record

Specified by:
getRecordGradeRanges in interface CATHelperPlugin
Returns:
The recordGradeRanges value

getDerivedCATStartGrade

public abstract String getDerivedCATStartGrade()
Gets the startGradeContraintOptionValue corresponsing to the lowest gradeRange selected in the current record.

Specified by:
getDerivedCATStartGrade in interface CATHelperPlugin
Returns:
The startGradeOptionValue value

getDerivedCATEndGrade

public abstract String getDerivedCATEndGrade()
Gets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document.

NOTE: this requires converting from possible gradeRange metadata values to the values supplied for gradeRangeOptions.

Specified by:
getDerivedCATEndGrade in interface CATHelperPlugin
Returns:
The endGrade value

getGradeRangePath

public abstract String getGradeRangePath()
Gets the gradeRangePath attribute of the SuggestionServiceHelper object

Returns:
The gradeRangePath value

getKeywordPath

public abstract String getKeywordPath()
Gets the keywordPath attribute of the SuggestionServiceHelper object

Returns:
The keywordPath value

getDescriptionPath

public abstract String getDescriptionPath()
Gets the descriptionPath attribute of the AbstractCATHelperPlugin object

Returns:
The descriptionPath value

getSubjectPath

public abstract String getSubjectPath()
Gets the subjectPath attribute of the AbstractCATHelperPlugin object

Returns:
The subjectPath value

getSelectedCATStartGrade

public abstract int getSelectedCATStartGrade(String[] gradeConstraints)
Compute a startGrade value based on currently selected CAT grade Level controls

Specified by:
getSelectedCATStartGrade in interface CATHelperPlugin
Returns:
The startGrade value

getSelectedCATEndGrade

public abstract int getSelectedCATEndGrade(String[] gradeConstraints)
Compute a end Grade value based on currently selected CAT grade Level controls

Specified by:
getSelectedCATEndGrade in interface CATHelperPlugin
Returns:
The endGrade value

getGradeRangeOptions

public abstract List getGradeRangeOptions()
Gets the gradeRangeOptions attribute of the AbstractCATHelperPlugin object

Specified by:
getGradeRangeOptions in interface CATHelperPlugin
Returns:
The gradeRangeOptions value

prtlnErr

public static void prtlnErr(String s)
NOT YET DOCUMENTED

Parameters:
s - NOT YET DOCUMENTED

DLESE Tools
v1.6.0