Interface ItemHelperIfc
-
- All Known Implementing Classes:
ItemHelper12Impl,ItemHelper20Impl,ItemHelperBase
public interface ItemHelperIfcInterface for QTI-versioned item helper implementation.Copyright: Copyright (c) 2005
Organization: Sakai Project
- Version:
- $Id$
- Author:
- Ed Smiley esmiley@stanford.edu
-
-
Field Summary
Fields Modifier and Type Field Description static longITEM_AUDIOstatic longITEM_CALCQstatic longITEM_EMIstatic longITEM_ESSAYstatic longITEM_FIBstatic longITEM_FILEstatic longITEM_FINstatic longITEM_IMAGMQstatic longITEM_MATCHINGstatic longITEM_MCMCstatic longITEM_MCMC_SSstatic longITEM_MCSCstatic longITEM_MXSURVEYstatic longITEM_SURVEYstatic longITEM_TFstatic String[]itemTypes
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCorrectAnswer(String correctAnswerLabel, Item itemXml)Flags an answer as correct.voidaddIncorrectAnswer(String incorrectAnswerLabel, Item itemXml)Flags an answer as NOT correct.voidaddMaxScore(Double score, Item itemXml)Add minimum score to item XML.voidaddMinScore(Double score, Item itemXml)Add maximum score to item XMLStringgetItemType(Item itemXml)StringgetMetaLabelXPath(String fieldlabel)Get the metadata field entry XPath for a given labelStringgetMetaXPath()Get the metadata field entry XPathStringgetText(Item itemXml)Get the text for the itemItemreadTypeSurveyItem(String scaleName)Get Item Xml for a given survey item scale name.ItemreadTypeXMLItem(Long type)Get Item Xml for a given item type as a Long .ItemreadXMLDocument(InputStream inputStream)Read XML document from input streamvoidsetAnswers(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)Set the answer texts for item.voidsetAttachments(Set<? extends org.sakaiproject.tool.assessment.data.ifc.assessment.AttachmentIfc> attachmentSet, Item item)voidsetFeedback(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)Set the feedback texts for item.voidsetItemLabel(String itemLabel, Item itemXml)Set the label for the item.voidsetItemText(String itemText, String flowClass, Item itemXml)Set the (usually instructional text) for the item for the specified flow.voidsetItemText(String itemText, Item itemXml)Set the (usually instructional text) for trhe item.voidsetItemTexts(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)Set the (one or more) item texts.voidsetPresentationFlowResponseIdent(String presentationFlowResponseIdent, Item itemXml)Set the public void Presentation Flow Response IdentvoidsetPresentationLabel(String presentationLabel, Item itemXml)Set the presentation label.ItemupdateItemXml(Item itemXml, String xpath, String value)DOCUMENTATION PENDING
-
-
-
Field Detail
-
ITEM_AUDIO
static final long ITEM_AUDIO
-
ITEM_ESSAY
static final long ITEM_ESSAY
-
ITEM_FILE
static final long ITEM_FILE
-
ITEM_FIB
static final long ITEM_FIB
-
ITEM_FIN
static final long ITEM_FIN
-
ITEM_MCSC
static final long ITEM_MCSC
-
ITEM_SURVEY
static final long ITEM_SURVEY
-
ITEM_MCMC
static final long ITEM_MCMC
-
ITEM_MCMC_SS
static final long ITEM_MCMC_SS
-
ITEM_TF
static final long ITEM_TF
-
ITEM_MATCHING
static final long ITEM_MATCHING
-
ITEM_EMI
static final long ITEM_EMI
-
ITEM_MXSURVEY
static final long ITEM_MXSURVEY
-
ITEM_CALCQ
static final long ITEM_CALCQ
-
ITEM_IMAGMQ
static final long ITEM_IMAGMQ
-
itemTypes
static final String[] itemTypes
-
-
Method Detail
-
readTypeXMLItem
Item readTypeXMLItem(Long type)
Get Item Xml for a given item type as a Long .- Parameters:
type- item type as a Long- Returns:
-
readTypeSurveyItem
Item readTypeSurveyItem(String scaleName)
Get Item Xml for a given survey item scale name.- Parameters:
scaleName-- Returns:
-
readXMLDocument
Item readXMLDocument(InputStream inputStream)
Read XML document from input stream- Parameters:
inputStream- XML docuemnt stream- Returns:
- item XML
-
updateItemXml
Item updateItemXml(Item itemXml, String xpath, String value)
DOCUMENTATION PENDING- Parameters:
itemXml- item xml to updatexpath- the XPathvalue- value to set- Returns:
- the item xml
-
addMaxScore
void addMaxScore(Double score, Item itemXml)
Add minimum score to item XML.- Parameters:
score-itemXml-
-
addMinScore
void addMinScore(Double score, Item itemXml)
Add maximum score to item XML- Parameters:
score-itemXml-
-
addCorrectAnswer
void addCorrectAnswer(String correctAnswerLabel, Item itemXml)
Flags an answer as correct.- Parameters:
correctAnswerLabel-
-
addIncorrectAnswer
void addIncorrectAnswer(String incorrectAnswerLabel, Item itemXml)
Flags an answer as NOT correct.- Parameters:
correctAnswerLabel-
-
getMetaXPath
String getMetaXPath()
Get the metadata field entry XPath- Returns:
- the XPath
-
getMetaLabelXPath
String getMetaLabelXPath(String fieldlabel)
Get the metadata field entry XPath for a given label- Parameters:
fieldlabel-- Returns:
- the XPath
-
getText
String getText(Item itemXml)
Get the text for the item- Parameters:
itemXml-- Returns:
- the text
-
setItemTexts
void setItemTexts(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)
Set the (one or more) item texts. Valid for single and multiple texts.- Parameters:
itemXml-itemText- text to be updated
-
setItemLabel
void setItemLabel(String itemLabel, Item itemXml)
Set the label for the item.- Parameters:
itemLabel-itemXml-
-
setItemText
void setItemText(String itemText, Item itemXml)
Set the (usually instructional text) for trhe item.- Parameters:
itemText-itemXml-
-
setItemText
void setItemText(String itemText, String flowClass, Item itemXml)
Set the (usually instructional text) for the item for the specified flow.- Parameters:
itemText-itemXml-
-
setPresentationLabel
void setPresentationLabel(String presentationLabel, Item itemXml)
Set the presentation label.- Parameters:
presentationLabel-itemXml-
-
setPresentationFlowResponseIdent
void setPresentationFlowResponseIdent(String presentationFlowResponseIdent, Item itemXml)
Set the public void Presentation Flow Response Ident- Parameters:
presentationFlowResponseIdent-itemXml-
-
setAnswers
void setAnswers(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)
Set the answer texts for item.- Parameters:
itemTextList- the text(s) for item
-
setFeedback
void setFeedback(List<org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc> itemTextList, Item itemXml)
Set the feedback texts for item.- Parameters:
itemTextList- the text(s) for item
-
-