|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.node.AbstractNode
org.qtitools.qti.node.AbstractObject
org.qtitools.qti.node.UniqueObject
org.qtitools.qti.node.item.AssessmentItem
public class AssessmentItem
AssessmentItem encompasses the information that is presented to A candidate and information about how to score the item. Scoring takes place when candidate responses are transformed into outcomes by response processing rules. It is sometimes desirable to have several different items that appear the same to the candidate but which are scored differently. In this specification, these are distinct items by definition and must therefore have distinct identifiers.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_ADAPTIVE_NAME
Name of adaptive attribute in xml schema. |
static java.lang.String |
ATTR_DEFAULT_NAME_SPACE_NAME
Name of xmlns attribute in xml schema. |
static java.lang.String |
ATTR_DEFAULT_NAME_SPACE_VALUE
Value of xmlns attribute. |
static java.lang.String |
ATTR_LABEL_DEFAULT_VALUE
Default value of label attribute. |
static java.lang.String |
ATTR_LABEL_NAME
Name of label attribute in xml schema. |
static java.lang.String |
ATTR_LANG_DEFAULT_VALUE
Default value of lang attribute. |
static java.lang.String |
ATTR_LANG_NAME
Name of lang attribute in xml schema. |
static java.lang.String |
ATTR_TIME_DEPENDENT_NAME
Name of timeDependant attribute in xml schema. |
static java.lang.String |
ATTR_TITLE_NAME
Name of title attribute in xml schema. |
static java.lang.String |
ATTR_TOOL_NAME_DEFAULT_VALUE
Default value of toolName attribute. |
static java.lang.String |
ATTR_TOOL_NAME_NAME
Name of toolName attribute in xml schema. |
static java.lang.String |
ATTR_TOOL_VERSION_DEFAULT_VALUE
Default value of toolVersion attribute. |
static java.lang.String |
ATTR_TOOL_VERSION_NAME
Name of toolVersion attribute in xml schema. |
static java.lang.String |
ATTR_XSI_NAME_SPACE_NAME
Name of xmlns:xsi attribute in xml schema. |
static java.lang.String |
ATTR_XSI_NAME_SPACE_VALUE
Value of xmlns:xsi attribute. |
static java.lang.String |
ATTR_XSI_SCHEMA_LOCATION_NAME
Name of xsi:schemaLocation attribute in xml schema. |
static java.lang.String |
ATTR_XSI_SCHEMA_LOCATION_VALUE
Value of xsi:schemaLocation attribute. |
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
protected static org.slf4j.Logger |
logger
logger. |
static java.lang.String |
VALUE_ITEM_IS_COMPLETED
Value of completion status built-in variable. |
static java.lang.String |
VALUE_ITEM_IS_NOT_ATTEMPTED
Value of completion status built-in variable. |
static java.lang.String |
VALUE_ITEM_IS_UNKNOWN
Value of completion status built-in variable. |
static java.lang.String |
VARIABLE_COMPLETION_STATUS
Name of completion status built-in variable. |
static java.lang.String |
VARIABLE_DURATION_NAME
Name of duration built-in variable. |
static java.lang.String |
VARIABLE_NUMBER_OF_ATTEMPTS
Name of number of attempts built-in variable. |
static java.lang.String |
XML
Header of xml file. |
| Fields inherited from class org.qtitools.qti.node.UniqueObject |
|---|
ATTR_IDENTIFIER_NAME |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
AssessmentItem()
Constructs assessmentItem. |
|
AssessmentItem(java.lang.String identifier,
java.lang.String title,
boolean adaptive,
boolean timeDependent)
Convenience constructor for assessmentItem. |
|
| Method Summary | |
|---|---|
int |
countCorrect()
Returns the number of correct responses |
int |
countIncorrect()
Returns the number of incorrect responses |
java.lang.Boolean |
getAdaptive()
Gets value of adaptive attribute. |
java.lang.String |
getClassTag()
Gets QTI class name of this node. |
ItemBody |
getItemBody()
Gets itemBody child. |
java.lang.String |
getLabel()
Gets value of label attribute. |
java.lang.String |
getLang()
Gets value of lang attribute. |
java.util.List<ModalFeedback> |
getModalFeedbacks()
Gets modalFeedback children. |
OutcomeDeclaration |
getOutcomeDeclaration(java.lang.String identifier)
Gets outcomeDeclaration with given identifier or null. |
java.util.List<OutcomeDeclaration> |
getOutcomeDeclarations()
Gets outcomeDeclaration children. |
Value |
getOutcomeValue(java.lang.String identifier)
Gets value of outcomeDeclaration with given identifier or null. |
java.util.Map<java.lang.String,Value> |
getOutcomeValues()
Returns an unmodifiable map of outcome identifiers to outcome values. |
ResponseDeclaration |
getResponseDeclaration(java.lang.String identifier)
Gets responseDeclaration with given identifier or null. |
java.util.List<ResponseDeclaration> |
getResponseDeclarations()
Gets responseDeclaration children. |
ResponseProcessing |
getResponseProcessing()
Gets responseProcessing child. |
Value |
getResponseValue(java.lang.String identifier)
Gets A response variable with given identifier or null |
java.util.Map<java.lang.String,Value> |
getResponseValues()
Returns an unmodifiable map of response identifiers to response values. |
java.util.List<Stylesheet> |
getStylesheets()
Gets stylesheet children. |
TemplateDeclaration |
getTemplateDeclaration(java.lang.String identifier)
Gets templateDeclaration with given identifier or null. |
java.util.List<TemplateDeclaration> |
getTemplateDeclarations()
Gets templateDeclaration children. |
TemplateProcessing |
getTemplateProcessing()
Gets templateProcessing child. |
Value |
getTemplateValue(java.lang.String identifier)
Gets value of templateDeclaration with given identifier or null. |
java.util.Map<java.lang.String,Value> |
getTemplateValues()
Returns an unmodifiable map of template identifiers to template values. |
java.lang.Boolean |
getTimeDependent()
Gets value of timeDependent attribute. |
ItemTimeRecord |
getTimeRecord()
Gets time record of this item. |
java.lang.String |
getTitle()
Gets value of title attribute. |
java.lang.String |
getToolName()
Gets value of toolName attribute. |
java.lang.String |
getToolVersion()
Gets value of toolVersion attribute. |
Value |
getValue(java.lang.String identifier)
Gets A template or outcome variable with given identifier or null |
void |
initialize(java.util.List<TemplateDefault> templateDefaults)
Initialize the item by setting the template defaults, resetting variables, and performing templateProcessing An item should only be initialized if it is going to be rendered/presented |
java.lang.Boolean |
isCorrect()
Returns true if this item reference was correctly responded; Correctly responded means ALL defined responseVars match their associated correctResponse. |
java.lang.Boolean |
isIncorrect()
Returns true if this item reference was incorrectly responded; Incorrectly responded means ANY defined responseVars didn't match their associated correctResponse. |
void |
processResponses()
Process the responses |
void |
setAdaptive(java.lang.Boolean adaptive)
Sets new value of adaptive attribute. |
void |
setCompletionStatus(java.lang.String completionStatus)
Set the completionStatus to the given value. |
void |
setItemBody(ItemBody itemBody)
Sets new itemBody child. |
void |
setLabel(java.lang.String label)
Sets new value of label attribute. |
void |
setLang(java.lang.String lang)
Sets new value of lang attribute. |
void |
setResponseProcessing(ResponseProcessing responseProcessing)
Sets new responseProcessing child. |
void |
setResponses(java.util.Map<java.lang.String,java.util.List<java.lang.String>> responses)
Set the responses for this assessmentItem. |
void |
setTemplateProcessing(TemplateProcessing templateProcessing)
Sets new templateProcessing child. |
void |
setTimeDependent(java.lang.Boolean timeDependent)
Sets new value of timeDependent attribute. |
void |
setTimeRecord(ItemTimeRecord timeRecord)
Sets time record of this item. |
void |
setTitle(java.lang.String title)
Sets new value of title attribute. |
void |
setToolName(java.lang.String toolName)
Sets new value of toolName attribute. |
void |
setToolVersion(java.lang.String toolVersion)
Sets new value of toolVersion attribute. |
java.lang.String |
toXmlString(int depth,
boolean printDefaultAttributes)
Prints this node and all its children into string. |
boolean |
validateResponses()
Validate the responses set for each of the interactions |
| Methods inherited from class org.qtitools.qti.node.UniqueObject |
|---|
getIdentifier, getSimpleName, setIdentifier, validateAttributes |
| Methods inherited from class org.qtitools.qti.node.AbstractObject |
|---|
getParent, getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from class org.qtitools.qti.node.AbstractNode |
|---|
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, validate, validateChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.qtitools.qti.node.XmlNode |
|---|
getAttributes, getFullName, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString |
| Methods inherited from interface org.qtitools.qti.validation.Validatable |
|---|
validate |
| Field Detail |
|---|
protected static org.slf4j.Logger logger
public static final java.lang.String CLASS_TAG
public static final java.lang.String XML
public static final java.lang.String ATTR_DEFAULT_NAME_SPACE_NAME
public static final java.lang.String ATTR_DEFAULT_NAME_SPACE_VALUE
public static final java.lang.String ATTR_XSI_NAME_SPACE_NAME
public static final java.lang.String ATTR_XSI_NAME_SPACE_VALUE
public static final java.lang.String ATTR_XSI_SCHEMA_LOCATION_NAME
public static final java.lang.String ATTR_XSI_SCHEMA_LOCATION_VALUE
public static final java.lang.String ATTR_TITLE_NAME
public static final java.lang.String ATTR_LABEL_NAME
public static final java.lang.String ATTR_LABEL_DEFAULT_VALUE
public static final java.lang.String ATTR_LANG_NAME
public static final java.lang.String ATTR_LANG_DEFAULT_VALUE
public static final java.lang.String ATTR_ADAPTIVE_NAME
public static final java.lang.String ATTR_TIME_DEPENDENT_NAME
public static final java.lang.String ATTR_TOOL_NAME_NAME
public static final java.lang.String ATTR_TOOL_NAME_DEFAULT_VALUE
public static final java.lang.String ATTR_TOOL_VERSION_NAME
public static final java.lang.String ATTR_TOOL_VERSION_DEFAULT_VALUE
public static final java.lang.String VARIABLE_COMPLETION_STATUS
public static final java.lang.String VALUE_ITEM_IS_NOT_ATTEMPTED
public static final java.lang.String VALUE_ITEM_IS_UNKNOWN
public static final java.lang.String VALUE_ITEM_IS_COMPLETED
public static final java.lang.String VARIABLE_NUMBER_OF_ATTEMPTS
public static final java.lang.String VARIABLE_DURATION_NAME
| Constructor Detail |
|---|
public AssessmentItem()
public AssessmentItem(java.lang.String identifier,
java.lang.String title,
boolean adaptive,
boolean timeDependent)
identifier - Value of the identifier attribute.title - Value of the title attribute.adaptive - Value of the adaptive attribute.timeDependent - Value of the timeDependent attribute.| Method Detail |
|---|
public ItemTimeRecord getTimeRecord()
public void setTimeRecord(ItemTimeRecord timeRecord)
timeRecord - timeRecord to setpublic java.lang.String getClassTag()
XmlNodeQTI class name has very important role during loading/saving nodes.
For example: Java class name is AssessmentTest; QTI class name is assessmentTest.
getClassTag in interface XmlNodegetClassTag in class AbstractNodepublic java.lang.String getTitle()
setTitle(java.lang.String)public void setTitle(java.lang.String title)
title - new value of title attributegetTitle()public java.lang.String getLabel()
setLabel(java.lang.String)public void setLabel(java.lang.String label)
label - new value of label attributegetLabel()public java.lang.String getLang()
setLang(java.lang.String)public void setLang(java.lang.String lang)
lang - new value of lang attributegetLang()public java.lang.Boolean getAdaptive()
setAdaptive(java.lang.Boolean)public void setAdaptive(java.lang.Boolean adaptive)
adaptive - new value of adaptive attributegetAdaptive()public java.lang.Boolean getTimeDependent()
setTimeDependent(java.lang.Boolean)public void setTimeDependent(java.lang.Boolean timeDependent)
timeDependent - new value of timeDependent attributegetTimeDependent()public java.lang.String getToolName()
setToolName(java.lang.String)public void setToolName(java.lang.String toolName)
toolName - new value of toolName attributegetToolName()public java.lang.String getToolVersion()
setToolVersion(java.lang.String)public void setToolVersion(java.lang.String toolVersion)
toolVersion - new value of toolVersion attributegetToolVersion()public java.util.List<Stylesheet> getStylesheets()
public java.util.List<ModalFeedback> getModalFeedbacks()
public java.util.List<OutcomeDeclaration> getOutcomeDeclarations()
public OutcomeDeclaration getOutcomeDeclaration(java.lang.String identifier)
identifier - given identifier
public void setCompletionStatus(java.lang.String completionStatus)
completionStatus - value to setpublic java.util.List<ResponseDeclaration> getResponseDeclarations()
public ResponseDeclaration getResponseDeclaration(java.lang.String identifier)
identifier - given identifier
public java.util.List<TemplateDeclaration> getTemplateDeclarations()
public TemplateDeclaration getTemplateDeclaration(java.lang.String identifier)
identifier - given identifier
public TemplateProcessing getTemplateProcessing()
setTemplateProcessing(org.qtitools.qti.node.item.template.processing.TemplateProcessing)public void setTemplateProcessing(TemplateProcessing templateProcessing)
templateProcessing - new templateProcessing childgetTemplateProcessing()public ResponseProcessing getResponseProcessing()
setTemplateProcessing(org.qtitools.qti.node.item.template.processing.TemplateProcessing)public void setResponseProcessing(ResponseProcessing responseProcessing)
responseProcessing - new responseProcessing childgetResponseProcessing()public ItemBody getItemBody()
setItemBody(org.qtitools.qti.node.content.ItemBody)public void setItemBody(ItemBody itemBody)
itemBody - new itemBody childgetItemBody()
public java.lang.String toXmlString(int depth,
boolean printDefaultAttributes)
XmlNode
toXmlString in interface XmlNodetoXmlString in class AbstractNodedepth - indent (0 = no indent)printDefaultAttributes - whether print attribute's default values
XmlNode.toXmlString()public Value getValue(java.lang.String identifier)
identifier - given identifier
public Value getResponseValue(java.lang.String identifier)
identifier - given identifier
public Value getTemplateValue(java.lang.String identifier)
identifier - given identifier
public Value getOutcomeValue(java.lang.String identifier)
identifier - given identifier
public void initialize(java.util.List<TemplateDefault> templateDefaults)
templateDefaults - given templateDefaults valuespublic void setResponses(java.util.Map<java.lang.String,java.util.List<java.lang.String>> responses)
responses - Responses to set.public void processResponses()
public java.util.Map<java.lang.String,Value> getOutcomeValues()
public java.util.Map<java.lang.String,Value> getTemplateValues()
public java.util.Map<java.lang.String,Value> getResponseValues()
public boolean validateResponses()
public java.lang.Boolean isCorrect()
isIncorrect()public int countCorrect()
countIncorrect()public java.lang.Boolean isIncorrect()
isCorrect()public int countIncorrect()
countIncorrect()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||