org.qtitools.qti.node.result
Class OutcomeVariable

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.result.ItemVariable
              extended by org.qtitools.qti.node.result.OutcomeVariable
All Implemented Interfaces:
java.io.Serializable, FieldValueParent, XmlNode, XmlObject, Validatable

public class OutcomeVariable
extends ItemVariable
implements FieldValueParent

Outcome variables are declared by outcome declarations.

Author:
Jiri Kajaba, Jonathon Hare
See Also:
Serialized Form

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 ATTR_LONG_INTERPRETATION
          Name of longInterpretation attribute in xml schema.
static java.net.URI ATTR_LONG_INTERPRETATION_DEFAULT_VALUE
          Default value of longInterpretation attribute.
static java.lang.Double ATTR_MASTERY_VALUE_DEFAULT_VALUE
          Default value of masteryValue attribute.
static java.lang.String ATTR_MASTERY_VALUE_NAME
          Name of masteryValue attribute in xml schema.
static java.lang.Double ATTR_NORMAL_MAXIMUM_DEFAULT_VALUE
          Default value of normalMaximum attribute.
static java.lang.String ATTR_NORMAL_MAXIMUM_NAME
          Name of normalMaximum attribute in xml schema.
static java.lang.Double ATTR_NORMAL_MINIMUM_DEFAULT_VALUE
          Default value of normalMinimum attribute.
static java.lang.String ATTR_NORMAL_MINIMUM_NAME
          Name of normalMinimum attribute in xml schema.
static java.util.List<View> ATTR_VIEWS_DEFAULT_VALUE
          Default value of view attribute.
static java.lang.String ATTR_VIEWS_NAME
          Name of view attribute in xml schema.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Fields inherited from class org.qtitools.qti.node.result.ItemVariable
ATTR_BASE_TYPE_DEFAULT_VALUE, ATTR_BASE_TYPE_NAME, ATTR_CARDINALITY_NAME, ATTR_IDENTIFIER_NAME, DISPLAY_NAME
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
OutcomeVariable(AbstractResult parent)
          Creates new outcomeVariable.
OutcomeVariable(AbstractResult parent, OutcomeDeclaration declaration, Value value)
          Creates new outcomeVariable from given outcomeDeclaration.
OutcomeVariable(AbstractResult parent, java.lang.String identifier, Value value)
          Creates new outcomeVariable from given identifier and value.
 
Method Summary
 Value evaluate()
          Evaluates value of this itemVariable.
 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.
 java.net.URI getLongInterpretation()
          Gets value of longInterpretation attribute.
 java.lang.Double getMasteryValue()
          Gets value of masteryValue attribute.
 java.lang.Double getNormalMaximum()
          Gets value of normalMaximum attribute.
 java.lang.Double getNormalMinimum()
          Gets value of normalMinimum attribute.
 Value getValue()
          Gets value of this variableDeclaration.
 java.util.List<View> getViews()
          Gets value of view attribute.
 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.
 void setLongInterpretation(java.net.URI longInterpretation)
          Sets new value of longInterpretation attribute.
 void setMasteryValue(java.lang.Double masteryValue)
          Sets new value of masteryValue attribute.
 void setNormalMaximum(java.lang.Double normalMaximum)
          Sets new value of normalMaximum attribute.
 void setNormalMinimum(java.lang.Double normalMinimum)
          Sets new value of normalMinimum attribute.
 
Methods inherited from class org.qtitools.qti.node.result.ItemVariable
getBaseType, getCardinality, getIdentifier, getSimpleName, setBaseType, setCardinality, 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, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validate, validateAttributes, 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.shared.FieldValueParent
getBaseType, getCardinality
 
Methods inherited from interface org.qtitools.qti.node.XmlObject
getParent, 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

CLASS_TAG

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

See Also:
Constant Field Values

ATTR_VIEWS_NAME

public static final java.lang.String ATTR_VIEWS_NAME
Name of view attribute in xml schema.

See Also:
Constant Field Values

ATTR_VIEWS_DEFAULT_VALUE

public static final java.util.List<View> ATTR_VIEWS_DEFAULT_VALUE
Default value of view attribute.


ATTR_INTERPRETATION_NAME

public static final java.lang.String ATTR_INTERPRETATION_NAME
Name of interpretation attribute in xml schema.

See Also:
Constant Field Values

ATTR_INTERPRETATION_DEFAULT_VALUE

public static final java.lang.String ATTR_INTERPRETATION_DEFAULT_VALUE
Default value of interpretation attribute.


ATTR_LONG_INTERPRETATION

public static final java.lang.String ATTR_LONG_INTERPRETATION
Name of longInterpretation attribute in xml schema.

See Also:
Constant Field Values

ATTR_LONG_INTERPRETATION_DEFAULT_VALUE

public static final java.net.URI ATTR_LONG_INTERPRETATION_DEFAULT_VALUE
Default value of longInterpretation attribute.


ATTR_NORMAL_MAXIMUM_NAME

public static final java.lang.String ATTR_NORMAL_MAXIMUM_NAME
Name of normalMaximum attribute in xml schema.

See Also:
Constant Field Values

ATTR_NORMAL_MAXIMUM_DEFAULT_VALUE

public static final java.lang.Double ATTR_NORMAL_MAXIMUM_DEFAULT_VALUE
Default value of normalMaximum attribute.


ATTR_NORMAL_MINIMUM_NAME

public static final java.lang.String ATTR_NORMAL_MINIMUM_NAME
Name of normalMinimum attribute in xml schema.

See Also:
Constant Field Values

ATTR_NORMAL_MINIMUM_DEFAULT_VALUE

public static final java.lang.Double ATTR_NORMAL_MINIMUM_DEFAULT_VALUE
Default value of normalMinimum attribute.


ATTR_MASTERY_VALUE_NAME

public static final java.lang.String ATTR_MASTERY_VALUE_NAME
Name of masteryValue attribute in xml schema.

See Also:
Constant Field Values

ATTR_MASTERY_VALUE_DEFAULT_VALUE

public static final java.lang.Double ATTR_MASTERY_VALUE_DEFAULT_VALUE
Default value of masteryValue attribute.

Constructor Detail

OutcomeVariable

public OutcomeVariable(AbstractResult parent)
Creates new outcomeVariable.

Parameters:
parent - parent of created outcomeVariable

OutcomeVariable

public OutcomeVariable(AbstractResult parent,
                       OutcomeDeclaration declaration,
                       Value value)
Creates new outcomeVariable from given outcomeDeclaration.

Parameters:
parent - parent of created outcomeVariable
declaration - given outcomeDeclaration
value - if provided, replaces value from outcomeDeclaration

OutcomeVariable

public OutcomeVariable(AbstractResult parent,
                       java.lang.String identifier,
                       Value value)
Creates new outcomeVariable from given identifier and value.

Parameters:
parent - parent of created outcomeVariable
identifier - identifier of created outcomeVariable (may be null)
value - of created outcomeVariable (may be null)
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

getViews

public java.util.List<View> getViews()
Gets value of view attribute.

Returns:
value of view attribute

getInterpretation

public java.lang.String getInterpretation()
Gets value of interpretation attribute.

Returns:
value of interpretation attribute
See Also:
setInterpretation(java.lang.String)

setInterpretation

public void setInterpretation(java.lang.String interpretation)
Sets new value of interpretation attribute.

Parameters:
interpretation - new value of interpretation attribute
See Also:
getInterpretation()

getLongInterpretation

public java.net.URI getLongInterpretation()
Gets value of longInterpretation attribute.

Returns:
value of longInterpretation attribute
See Also:
setLongInterpretation(java.net.URI)

setLongInterpretation

public void setLongInterpretation(java.net.URI longInterpretation)
Sets new value of longInterpretation attribute.

Parameters:
longInterpretation - new value of longInterpretation attribute
See Also:
getLongInterpretation()

getNormalMaximum

public java.lang.Double getNormalMaximum()
Gets value of normalMaximum attribute.

Returns:
value of normalMaximum attribute
See Also:
setNormalMaximum(java.lang.Double)

setNormalMaximum

public void setNormalMaximum(java.lang.Double normalMaximum)
Sets new value of normalMaximum attribute.

Parameters:
normalMaximum - new value of normalMaximum attribute
See Also:
getNormalMaximum()

getNormalMinimum

public java.lang.Double getNormalMinimum()
Gets value of normalMinimum attribute.

Returns:
value of normalMinimum attribute
See Also:
setNormalMinimum(java.lang.Double)

setNormalMinimum

public void setNormalMinimum(java.lang.Double normalMinimum)
Sets new value of normalMinimum attribute.

Parameters:
normalMinimum - new value of normalMinimum attribute
See Also:
getNormalMinimum()

getMasteryValue

public java.lang.Double getMasteryValue()
Gets value of masteryValue attribute.

Returns:
value of masteryValue attribute
See Also:
setMasteryValue(java.lang.Double)

setMasteryValue

public void setMasteryValue(java.lang.Double masteryValue)
Sets new value of masteryValue attribute.

Parameters:
masteryValue - new value of masteryValue attribute
See Also:
getMasteryValue()

getValue

public Value getValue()
Gets value of this variableDeclaration.

Returns:
value of this variableDeclaration

evaluate

public Value evaluate()
Evaluates value of this itemVariable.

Returns:
evaluated value of this itemVariable

getFieldValues

public java.util.List<FieldValue> getFieldValues()
Gets fieldValue children.

Returns:
fieldValue children

load

public void load(org.w3c.dom.Node sourceNode)
Description copied from interface: XmlNode
Loads this node from given source node (DOM).

Specified by:
load in interface XmlNode
Overrides:
load in class AbstractNode
Parameters:
sourceNode - source node (DOM) for this node


Copyright © 2009. All Rights Reserved.