org.qtitools.qti.node.item.response.declaration
Class ResponseDeclaration

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.UniqueObject
              extended by org.qtitools.qti.node.shared.VariableDeclaration
                  extended by org.qtitools.qti.node.item.response.declaration.ResponseDeclaration
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable

public class ResponseDeclaration
extends VariableDeclaration

Response variables are declared by response declarations and bound to interactions in the itemBody.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Fields inherited from class org.qtitools.qti.node.shared.VariableDeclaration
ATTR_BASE_TYPE_DEFAULT_VALUE, ATTR_BASE_TYPE_NAME, ATTR_CARDINALITY_NAME
 
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
ResponseDeclaration(AssessmentItem parent)
          Creates object.
 
Method Summary
 AreaMapping getAreaMapping()
          Gets areaMapping child.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 CorrectResponse getCorrectResponse()
          Gets correctResponse child.
 Mapping getMapping()
          Gets mapping child.
 java.lang.Boolean isCorrectResponse()
          Returns true if this declarations value matches its correctValue.
 void setAreaMapping(AreaMapping areaMapping)
          Sets new areaMapping child.
 void setCorrectResponse(CorrectResponse correctResponse)
          Sets new correctResponse child.
 void setMapping(Mapping mapping)
          Sets new mapping child.
 ValidationResult validate()
          Validates this object.
 
Methods inherited from class org.qtitools.qti.node.shared.VariableDeclaration
getBaseType, getCardinality, getDefaultValue, getValue, resetValue, setBaseType, setCardinality, setDefaultValue, setValue, validateAttributes
 
Methods inherited from class org.qtitools.qti.node.UniqueObject
getIdentifier, getSimpleName, setIdentifier
 
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, toXmlString, 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, toXmlString
 

Field Detail

CLASS_TAG

public static final java.lang.String CLASS_TAG
Name of this class in xml schema.

See Also:
Constant Field Values
Constructor Detail

ResponseDeclaration

public ResponseDeclaration(AssessmentItem parent)
Creates object.

Parameters:
parent - parent of this object
Method Detail

getClassTag

public java.lang.String getClassTag()
Description copied from interface: XmlNode
Gets QTI class name of this node.

QTI class name has very important role during loading/saving nodes.

For example: Java class name is AssessmentTest; QTI class name is assessmentTest.

Specified by:
getClassTag in interface XmlNode
Specified by:
getClassTag in class AbstractNode
Returns:
QTI class name of this node

getCorrectResponse

public CorrectResponse getCorrectResponse()
Gets correctResponse child.

Returns:
correctResponse child
See Also:
setCorrectResponse(org.qtitools.qti.node.item.CorrectResponse)

setCorrectResponse

public void setCorrectResponse(CorrectResponse correctResponse)
Sets new correctResponse child.

Parameters:
correctResponse - new correctResponse child
See Also:
getCorrectResponse()

getMapping

public Mapping getMapping()
Gets mapping child.

Returns:
mapping child
See Also:
setMapping(org.qtitools.qti.node.item.response.declaration.Mapping)

setMapping

public void setMapping(Mapping mapping)
Sets new mapping child.

Parameters:
mapping - new mapping child
See Also:
getMapping()

getAreaMapping

public AreaMapping getAreaMapping()
Gets areaMapping child.

Returns:
areaMapping child
See Also:
setAreaMapping(org.qtitools.qti.node.item.response.declaration.AreaMapping)

setAreaMapping

public void setAreaMapping(AreaMapping areaMapping)
Sets new areaMapping child.

Parameters:
areaMapping - new areaMapping child
See Also:
getAreaMapping()

validate

public ValidationResult validate()
Description copied from interface: Validatable
Validates this object.

Specified by:
validate in interface Validatable
Overrides:
validate in class AbstractNode
Returns:
validation result

isCorrectResponse

public java.lang.Boolean isCorrectResponse()
Returns true if this declarations value matches its correctValue. Returns null if there is no correct value Otherwise false

Returns:
true if the associated correctResponse matches the value; false or null otherwise.


Copyright © 2009. All Rights Reserved.