Class ItemHelperBase
- java.lang.Object
-
- org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperBase
-
- All Implemented Interfaces:
ItemHelperIfc
- Direct Known Subclasses:
ItemHelper12Impl,ItemHelper20Impl
public abstract class ItemHelperBase extends Object implements ItemHelperIfc
-
-
Field Summary
Fields Modifier and Type Field Description protected static longITEM_AUDIOprotected static longITEM_CALCQprotected static longITEM_EMIprotected static longITEM_ESSAYprotected static longITEM_FIBprotected static longITEM_FILEprotected static longITEM_FINprotected static longITEM_IMAGMQprotected static longITEM_MATCHINGprotected static longITEM_MCMCprotected static longITEM_MCMC_SSprotected static longITEM_MCSCprotected static longITEM_MXSURVEYprotected static longITEM_SURVEYprotected static longITEM_TF-
Fields inherited from interface org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc
itemTypes
-
-
Constructor Summary
Constructors Constructor Description ItemHelperBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AuthoringXmlgetAuthoringXml()We will have a versioned AuthoringXml in subclasses.protected abstract intgetQtiVersion()Get the QTI version for each subclass.protected StringmakeItemNodeText(Item itemXml, String xpath)Concatenate nodes for xpathItemreadTypeSurveyItem(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 TypeIfc.ItemreadXMLDocument(InputStream inputStream)Read an item XML document from a stream into an Item XML objectItemupdateItemXml(Item itemXml, String xpath, String value)Update path with value-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc
addCorrectAnswer, addIncorrectAnswer, addMaxScore, addMinScore, getItemType, getMetaLabelXPath, getMetaXPath, getText, setAnswers, setAttachments, setFeedback, setItemLabel, setItemText, setItemText, setItemTexts, setPresentationFlowResponseIdent, setPresentationLabel
-
-
-
-
Field Detail
-
ITEM_AUDIO
protected static final long ITEM_AUDIO
-
ITEM_ESSAY
protected static final long ITEM_ESSAY
-
ITEM_FILE
protected static final long ITEM_FILE
-
ITEM_FIB
protected static final long ITEM_FIB
-
ITEM_FIN
protected static final long ITEM_FIN
-
ITEM_MCSC
protected static final long ITEM_MCSC
-
ITEM_SURVEY
protected static final long ITEM_SURVEY
-
ITEM_MCMC
protected static final long ITEM_MCMC
-
ITEM_MCMC_SS
protected static final long ITEM_MCMC_SS
-
ITEM_TF
protected static final long ITEM_TF
-
ITEM_MATCHING
protected static final long ITEM_MATCHING
-
ITEM_MXSURVEY
protected static final long ITEM_MXSURVEY
-
ITEM_CALCQ
protected static final long ITEM_CALCQ
-
ITEM_IMAGMQ
protected static final long ITEM_IMAGMQ
-
ITEM_EMI
protected static final long ITEM_EMI
-
-
Method Detail
-
getAuthoringXml
protected abstract AuthoringXml getAuthoringXml()
We will have a versioned AuthoringXml in subclasses.- Returns:
-
getQtiVersion
protected abstract int getQtiVersion()
Get the QTI version for each subclass.- Returns:
- a QTIVersion.VERSION_... constant
-
readXMLDocument
public Item readXMLDocument(InputStream inputStream)
Read an item XML document from a stream into an Item XML object- Specified by:
readXMLDocumentin interfaceItemHelperIfc- Parameters:
inputStream- XML document stream- Returns:
- an Item XML object
-
readTypeXMLItem
public Item readTypeXMLItem(Long type)
Get Item Xml for a given item type as a TypeIfc.- Specified by:
readTypeXMLItemin interfaceItemHelperIfc- Parameters:
type- item type as a TypeIfc- Returns:
-
readTypeSurveyItem
public Item readTypeSurveyItem(String scaleName)
Get Item Xml for a given survey item scale name.- Specified by:
readTypeSurveyItemin interfaceItemHelperIfc- Parameters:
scaleName-- Returns:
-
updateItemXml
public Item updateItemXml(Item itemXml, String xpath, String value)
Update path with value- Specified by:
updateItemXmlin interfaceItemHelperIfc- Parameters:
itemXml- the item xmlxpath- the xpathvalue- the value to set- Returns:
- the item xml
-
-