org.qtitools.qti.node.outcome.declaration
Class LookupTableEntry

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.outcome.declaration.LookupTableEntry
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable
Direct Known Subclasses:
InterpolationTableEntry, MatchTableEntry

public abstract class LookupTableEntry
extends AbstractObject

Abstract entry for lookupTable.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_TARGET_VALUE_NAME
          Name of targetValue attribute in xml schema.
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
LookupTableEntry(LookupTable parent)
          Creates object.
 
Method Summary
 LookupTable getParent()
          Gets parent of this node or null (if node is root; for example AssessmentTest).
 java.lang.String getSimpleName()
          Gets simple name of this node.
abstract  java.lang.Number getSourceValue()
          Gets numeric value of sourceValue attribute.
 SingleValue getTargetValue()
          Gets value of targetValue attribute.
 void setTargetValue(SingleValue targetValue)
          Sets new value of targetValue attribute.
protected  ValidationResult validateAttributes()
          Validates attributes 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, getClassTag, 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, 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, getClassTag, getFullName, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString
 
Methods inherited from interface org.qtitools.qti.validation.Validatable
validate
 

Field Detail

ATTR_TARGET_VALUE_NAME

public static final java.lang.String ATTR_TARGET_VALUE_NAME
Name of targetValue attribute in xml schema.

See Also:
Constant Field Values
Constructor Detail

LookupTableEntry

public LookupTableEntry(LookupTable parent)
Creates object.

Parameters:
parent - parent of this object
Method Detail

getParent

public LookupTable getParent()
Description copied from interface: XmlNode
Gets parent of this node or null (if node is root; for example AssessmentTest).

While 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).

Specified by:
getParent in interface XmlNode
Specified by:
getParent in interface XmlObject
Overrides:
getParent in class AbstractObject
Returns:
parent of this node or null (if node is root; for example AssessmentTest)

getSimpleName

public java.lang.String getSimpleName()
Description copied from interface: XmlNode
Gets simple name of this node. Simple name contains QTI class name and some additional information to help identify node (if these informations are available).

Simple name is not so important like QTI class name. It servers mostly for displaying informations and in messages.

For example: simple name can be assessmentTest:Test (QTI class name (assessmentTest) + identifier (Test)).

Specified by:
getSimpleName in interface XmlNode
Overrides:
getSimpleName in class AbstractNode
Returns:
simple name of this node
See Also:
XmlNode.getFullName()

getSourceValue

public abstract java.lang.Number getSourceValue()
Gets numeric value of sourceValue attribute.

Returns:
numeric value of sourceValue attribute

getTargetValue

public SingleValue getTargetValue()
Gets value of targetValue attribute.

Returns:
value of targetValue attribute
See Also:
setTargetValue(org.qtitools.qti.value.SingleValue)

setTargetValue

public void setTargetValue(SingleValue targetValue)
Sets new value of targetValue attribute.

Parameters:
targetValue - new value of targetValue attribute
See Also:
getTargetValue()

validateAttributes

protected ValidationResult validateAttributes()
Description copied from class: AbstractNode
Validates attributes of this node.

Overrides:
validateAttributes in class AbstractNode
Returns:
result of validation


Copyright © 2009. All Rights Reserved.