|
||||||||||
| 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.item.CorrectResponse
public class CorrectResponse
A response declaration may assign an optional correctResponse.
This value may indicate the only possible value of the response variable to be considered correct or merely just A correct value.
For responses that are being measured against A more complex scale than correct/incorrect this value should be set to the (or an) optimal value.
Finally, for responses for which no such optimal value is defined the correctResponse must be omitted.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_INTERPRETATION_DEFAULT_VALUE
Default value of interpretation attribute. |
static java.lang.String |
ATTR_INTERPRETATION_NAME
Name of interpretation attribute in xml schema. |
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
CorrectResponse(XmlObject xmlObject)
Creates object. |
|
CorrectResponse(XmlObject xmlObject,
Value value)
Creates object with given value. |
|
| Method Summary | |
|---|---|
Value |
evaluate()
Evaluates value of this defaultValue. |
BaseType |
getBaseType()
Gets required baseType of result value (when all FieldValues are put together). |
Cardinality |
getCardinality()
Gets required cardinality of result value (when all FieldValues are put together). |
java.lang.String |
getClassTag()
Gets QTI class name of this node. |
java.util.List<FieldValue> |
getFieldValues()
Gets fieldValue children. |
java.lang.String |
getInterpretation()
Gets value of interpretation attribute. |
ResponseDeclaration |
getParent()
Gets parent of this node or null (if node is root; for example AssessmentTest). |
Value |
getValue()
Gets value of this defaultValue. |
void |
load(org.w3c.dom.Node sourceNode)
Loads this node from given source node (DOM). |
void |
setInterpretation(java.lang.String interpretation)
Sets new value of interpretation attribute. |
protected ValidationResult |
validateChildren()
Validates children (body) of this node. |
| Methods inherited from class org.qtitools.qti.node.AbstractObject |
|---|
getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from class org.qtitools.qti.node.AbstractNode |
|---|
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validate, validateAttributes |
| 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.XmlObject |
|---|
getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from interface org.qtitools.qti.node.XmlNode |
|---|
getAttributes, getFullName, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString |
| Methods inherited from interface org.qtitools.qti.validation.Validatable |
|---|
validate |
| Field Detail |
|---|
public static final java.lang.String CLASS_TAG
public static final java.lang.String ATTR_INTERPRETATION_NAME
public static final java.lang.String ATTR_INTERPRETATION_DEFAULT_VALUE
| Constructor Detail |
|---|
public CorrectResponse(XmlObject xmlObject)
xmlObject - parent of this object
public CorrectResponse(XmlObject xmlObject,
Value value)
xmlObject - parent of this objectvalue - value to use| Method Detail |
|---|
public ResponseDeclaration getParent()
XmlNodeWhile testing some nodes (for example expressions) don't have properly set parent, but it is usable only for testing. (Some nodes cannot exists without parent even for testing).
getParent in interface XmlNodegetParent in interface XmlObjectgetParent in class AbstractObjectpublic 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 getInterpretation()
setInterpretation(java.lang.String)public void setInterpretation(java.lang.String interpretation)
interpretation - new value of interpretation attributegetInterpretation()public java.util.List<FieldValue> getFieldValues()
public Value getValue()
public Cardinality getCardinality()
FieldValueParent
getCardinality in interface FieldValueParentpublic BaseType getBaseType()
FieldValueParent
getBaseType in interface FieldValueParentprotected ValidationResult validateChildren()
AbstractNode
validateChildren in class AbstractNodepublic Value evaluate()
public void load(org.w3c.dom.Node sourceNode)
XmlNode
load in interface XmlNodeload in class AbstractNodesourceNode - source node (DOM) for this node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||