|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.standards.CATServiceHelper
public abstract class CATServiceHelper
Run-time support for CAT suggestion service, which acts as intermediary between CAT Service client and Form bean/JSP pages.
The CAT service UI involves extraction of several values from the item
record being edited for each framework, such as selected keywords, selected
graderanges, etc. The functionality to extract these values is delegated to
the framework-specific plug-in, which implments CATHelperPlugin
.
Field Summary | |
---|---|
static String |
ALL_CONTENT
NOT YET DOCUMENTED |
static String |
BOTH_CONTENT
NOT YET DOCUMENTED |
static String |
LIST_MODE
NOT YET DOCUMENTED |
static String |
SELECTED_CONTENT
NOT YET DOCUMENTED |
static String |
SUGGESTIONS_CONTENT
NOT YET DOCUMENTED |
static String |
TREE_MODE
NOT YET DOCUMENTED |
Constructor Summary | |
---|---|
CATServiceHelper(SchemEditForm sef,
CATHelperPlugin frameworkPlugin)
Constructor for the CATServiceHelper object |
Method Summary | |
---|---|
void |
displaySuggestions(List standardsList)
Debugging |
SchemEditForm |
getActionForm()
Gets the actionForm attribute of the CATServiceHelper object |
String |
getAuthor()
Resolves author from the asnDocument (which it gets from the StandardsDocument) |
List |
getAvailableDocs()
Gets the availableDocs attribute of the CATServiceHelper object |
protected CATRequestConstraints |
getConstraints()
Build a MetadataContraint instance from current CATServiceHelper attributes, including keywords, description, gradeRanges (when the corresponding "use" attributes return true). |
String |
getCurrentDoc()
Gets the currentDoc attribute of the CATServiceHelper object |
String |
getDerivedCATEndGrade()
Gets the gradeRangeOptionValue corresponding to the highest selected gradeRange in the current instance document. |
String |
getDerivedCATStartGrade()
Gets the gradeRangeOptionValue corresponding to the lowest selected gradeRange in the current instance document. |
String |
getDisplayContent()
Determines what standards to display (SUGGESTED_CONTENT, STANDARDS_CONTENT, BOTH, ALL) |
String |
getDisplayMode()
Determines whether standards are displayed as a heirarchical tree or flat list. |
protected MetaDataFramework |
getFramework()
Gets the framework attribute of the CATServiceHelper object |
CATHelperPlugin |
getFrameworkPlugin()
Gets the frameworkPlugin attribute of the SuggestionServiceHelper object |
List |
getGradeRangeOptions()
Gets the gradeRanges corresponding to the grades searchable in the current framework |
protected abstract String |
getIdFromCATStandard(CATStandard std)
Gets the idFromCATStandard attribute of the CATServiceHelper object |
static CATServiceHelper |
getInstance(SchemEditForm sef)
Gets the instance attribute of the CATServiceHelper class |
protected Document |
getInstanceDocument()
Gets the document attribute of the CATServiceHelper object |
int |
getKeywordWeighting()
|
int |
getNumSelectedStandards()
Gets the numSelectedStandards attribute of the CATServiceHelper object |
List |
getOptionalCatUIFields()
Gets a list specifying what optional fields (e.g., "subject", "keyword") is exported by this framework. |
Map |
getOtherSelectedStandards()
Gets the otherSelectedStandards attribute of the CATServiceHelper object |
String |
getRecordDescription()
Gets the value of the description field of the current metadata record |
String[] |
getRecordGradeRanges()
Gets the gradeRanges assigned for the current record |
String[] |
getRecordKeywords()
Gets the value of the description field of the current metadata record |
String[] |
getRecordSubjects()
Gets the recordSubjects attribute of the CATServiceHelper object |
String |
getRecordUrl()
Gets the recordUrl specified in the instance document (via the SchemEditForm ). |
StandardsNode |
getRootStandardNode()
Gets the rootStandardNode attribute of the CATServiceHelper object |
String[] |
getSelectedGradeRanges()
Gets the GradeRanges curently selected in the CAT UI. |
String |
getSelectedKeywords()
Gets the keywords currently selected in the service controls. |
List |
getSelectedStandards()
Retrieves a list of selected standards that can be fed into the "moreLikeThis" method. |
protected List |
getSelectedStandards(Document doc)
Retrieves a list of selected standards from the provided instance document that can be fed into the "moreLikeThis" method. |
boolean |
getServiceIsActive()
Gets the serviceIsActive attribute of the CATServiceHelper object |
abstract StandardsDocument |
getStandardsDocument()
Gets the standardsDocument from which suggestions are requested and received. |
abstract String |
getStandardsFormat()
Gets the standardsFormat attribute of the CATServiceHelper object |
StandardsManager |
getStandardsManager()
Gets the standardsManager attribute of the CATServiceHelper object |
List |
getStandardsNodes()
Gets a list of all standardsNodes in the current StandardsDocument in standards document order. |
List |
getSuggestedStandards()
Gets the suggested Standards represented in ADN format. |
String |
getTopic()
Resolves topic for this asnDocument asnDocument (which it gets from the StandardsDocument) |
String |
getUrl()
Gets the url attribute of the CATServiceHelper object |
boolean |
getUseDescription()
Specifies whether user has chosen to constrain suggestion service using current value of description field in the current metadata record. |
boolean |
getUseGradeRanges()
Specifies whether user has chosen to constrain suggestion service using current value of gradeRange checkboxes in the suggestion service interface. |
boolean |
getUseKeywords()
Specifies whether user has chosen to constrain suggestion service using current value of keywords box in the suggestion service interface. |
boolean |
getUseSubjects()
Specifies whether user has chosen to constrain suggestion service using current value of keywords box in the suggestion service interface. |
String |
getXmlFormat()
Gets the xmlFormat attribute of the CATServiceHelper object |
String |
getXpath()
Gets the xpath of the metadata element containing the managedStandards |
void |
moreLikeThis()
Update the suggestions based on the currently selected standards and the current suggestionConstraints. |
void |
setDisplayContent(String content)
Sets the displayContent attribute of the CATServiceHelper object |
void |
setDisplayMode(String mode)
Sets the displayMode attribute to either TREE_MODE (to display all standards) or LIST_MODE (to display either suggested or selected standards); |
protected void |
setFrameworkPlugin(CATHelperPlugin plugin)
Sets the frameworkPlugin attribute of the CATServiceHelper object |
void |
setKeywordWeighting(int weight)
Keywordweighting specifies how many times the keyword contents are repeated before they are inserted into the keyword field of the Contraint instance. |
void |
setSelectedGradeRanges(String[] grs)
Sets the selectedGradeRanges attribute of the CATServiceHelper object |
void |
setSelectedKeywords(String kws)
Sets the selectedKeywords attribute of the CATServiceHelper object |
void |
setServiceIsActive(boolean b)
Sets the serviceIsActive attribute of the CATServiceHelper object |
void |
setSuggestedStandards(List stds)
Sets the suggestedStandards attribute of the CATServiceHelper object |
void |
setUrl(String url)
Sets the url attribute of the CATServiceHelper object |
void |
setUseDescription(boolean useIt)
Sets the useDescription attribute of the CATServiceHelper object |
void |
setUseGradeRanges(boolean useIt)
Sets the useGradeRanges attribute of the CATServiceHelper object |
void |
setUseKeywords(boolean useIt)
Sets the useKeywords attribute of the CATServiceHelper object |
void |
setUseSubjects(boolean useIt)
Sets the useSubjects attribute of the CATServiceHelper object |
void |
updateDisplayControls(HttpServletRequest request)
Sets various control attributes from the information contained in the request, such as displayMode, displayContent, and whether description, grade ranges, subjects, keywords, will be used in the CAT Service request. |
void |
updateStandardsDisplay(String displayContent)
Initialize the collapse bean to show selected and suggested standards nodes in the display specified by "displayContent". |
void |
updateSuggestions()
Description of the Method |
void |
updateSuggestions(List feedbackStandards)
Performs a query on the suggestion server using the current contraints, and updates the suggestedStandards attribute of the CATServiceHelper with the results, which is a list of standards IDS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TREE_MODE
public static final String LIST_MODE
public static final String SELECTED_CONTENT
public static final String SUGGESTIONS_CONTENT
public static final String BOTH_CONTENT
public static final String ALL_CONTENT
Constructor Detail |
---|
public CATServiceHelper(SchemEditForm sef, CATHelperPlugin frameworkPlugin)
sef
- Description of the ParameterframeworkPlugin
- NOT YET DOCUMENTEDMethod Detail |
---|
public abstract StandardsDocument getStandardsDocument()
public abstract String getStandardsFormat()
public CATHelperPlugin getFrameworkPlugin()
protected void setFrameworkPlugin(CATHelperPlugin plugin)
plugin
- The new frameworkPlugin valuepublic StandardsManager getStandardsManager()
getStandardsManager
in interface SuggestionServiceHelper
public StandardsNode getRootStandardNode()
public List getStandardsNodes()
public String getAuthor()
public String getTopic()
public List getAvailableDocs()
public String getCurrentDoc()
getCurrentDoc
in interface SuggestionServiceHelper
public static CATServiceHelper getInstance(SchemEditForm sef) throws Exception
sef
- Description of the Parameter
Exception
- Description of the Exceptionpublic SchemEditForm getActionForm()
protected MetaDataFramework getFramework()
protected Document getInstanceDocument()
public boolean getServiceIsActive()
getServiceIsActive
in interface SuggestionServiceHelper
public void setServiceIsActive(boolean b)
b
- The new serviceIsActive valuepublic String getXpath()
getXpath
in interface SuggestionServiceHelper
public String getXmlFormat()
getXmlFormat
in interface SuggestionServiceHelper
public List getSuggestedStandards()
getSuggestedStandards
in interface SuggestionServiceHelper
public int getNumSelectedStandards()
getNumSelectedStandards
in interface SuggestionServiceHelper
public List getSelectedStandards()
getSelectedStandards
in interface SuggestionServiceHelper
protected List getSelectedStandards(Document doc)
NOTE: used to support asyncronous calls, in which the instance document of the formBean may not reflect the most recent values.
doc
- the instance document
public Map getOtherSelectedStandards()
public void setSuggestedStandards(List stds)
setSuggestedStandards
in interface SuggestionServiceHelper
stds
- The new suggestedStandards valuepublic boolean getUseDescription()
public void setUseDescription(boolean useIt)
useIt
- The new useDescription valuepublic boolean getUseKeywords()
public void setUseKeywords(boolean useIt)
useIt
- The new useKeywords valuepublic boolean getUseSubjects()
public void setUseSubjects(boolean useIt)
useIt
- The new useSubjects valuepublic boolean getUseGradeRanges()
public void setUseGradeRanges(boolean useIt)
useIt
- The new useGradeRanges valuepublic String getDisplayMode()
getDisplayMode
in interface SuggestionServiceHelper
public void setDisplayMode(String mode)
mode
- The new displayMode valuepublic String getDisplayContent()
getDisplayContent
in interface SuggestionServiceHelper
public void setDisplayContent(String content)
content
- The new displayContent valuepublic String getUrl()
getUrl
in interface SuggestionServiceHelper
public void setUrl(String url)
url
- The new url valuepublic List getOptionalCatUIFields()
public String[] getRecordGradeRanges()
public String[] getSelectedGradeRanges()
public String getDerivedCATStartGrade()
NOTE: this requires converting from possible gradeRange metadata values to the values supplied for gradeRangeOptions.
getDerivedCATStartGrade
in interface SuggestionServiceHelper
public String getDerivedCATEndGrade()
NOTE: this requires converting from possible gradeRange metadata values to the values supplied for gradeRangeOptions.
getDerivedCATEndGrade
in interface SuggestionServiceHelper
public void setSelectedGradeRanges(String[] grs)
grs
- The new selectedGradeRanges valuepublic int getKeywordWeighting()
public void setKeywordWeighting(int weight)
weight
- The new keywordWeighting valuepublic List getGradeRangeOptions()
public String getRecordDescription()
public String[] getRecordKeywords()
public String[] getRecordSubjects()
public String getSelectedKeywords()
public void setSelectedKeywords(String kws)
kws
- The new selectedKeywords valuepublic String getRecordUrl()
SchemEditForm
).Note: this method depends on the url path being defined in the framework configuration.
getRecordUrl
in interface SuggestionServiceHelper
public void updateSuggestions() throws Exception
updateSuggestions
in interface SuggestionServiceHelper
Exception
- Description of the Exceptionpublic void updateSuggestions(List feedbackStandards) throws Exception
feedbackStandards
- Description of the Parameter
Exception
- NOT YET DOCUMENTEDpublic void moreLikeThis() throws Exception
Exception
- NOT YET DOCUMENTEDprotected CATRequestConstraints getConstraints()
NOTE: Author and Topic hardcoded to "National Science Education Standards (NSES)" and "Science", respectively
protected abstract String getIdFromCATStandard(CATStandard std)
std
- NOT YET DOCUMENTED
public void updateDisplayControls(HttpServletRequest request) throws Exception
request
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic void updateStandardsDisplay(String displayContent) throws Exception
updateStandardsDisplay
in interface SuggestionServiceHelper
displayContent
- Description of the Parameter
Exception
- NOT YET DOCUMENTEDpublic void displaySuggestions(List standardsList)
standardsList
- A list of StandardsWrapper instances to display.
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |