|
||||||||||
| 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.outcome.declaration.LookupTable
public abstract class LookupTable
An abstract class associated with an outcomeDeclaration used to create A lookup table from A numeric source value to A single outcome value in the declared value set. A lookup table works in the reverse sense to the similar mapping as it defines how A source numeric value is transformed into the outcome value, whereas A (response) mapping defines how the response value is mapped onto A target numeric value.
The transformation takes place using the lookupOutcomeValue rule within responseProcessing or outcomeProcessing.
| Field Summary | |
|---|---|
static SingleValue |
ATTR_DEFAULT_VALUE_DEFAULT_VALUE
Default value of defaultValue attribute. |
static java.lang.String |
ATTR_DEFAULT_VALUE_NAME
Name of defaultValue attribute in xml schema. |
static java.lang.String |
DISPLAY_NAME
Display name of this class. |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
LookupTable(OutcomeDeclaration parent)
Creates object. |
|
| Method Summary | |
|---|---|
SingleValue |
getDefaultValue()
Gets value of defaultValue attribute. |
abstract java.util.List<? extends LookupTableEntry> |
getLookupEntries()
Gets lookupTableEntry children. |
OutcomeDeclaration |
getParent()
Gets parent of this node or null (if node is root; for example AssessmentTest). |
SingleValue |
getTargetValue(NumberValue sourceValue)
Gets target value for given source value. |
BaseType |
getTargetValueBaseType()
Gets required baseType of target value. |
void |
setDefaultValue(SingleValue defaultValue)
Sets new value of defaultValue attribute. |
protected ValidationResult |
validateAttributes()
Validates attributes of this node. |
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, getClassTag, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validate |
| 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, getSimpleName, 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 |
|---|
public static final java.lang.String DISPLAY_NAME
public static final java.lang.String ATTR_DEFAULT_VALUE_NAME
public static final SingleValue ATTR_DEFAULT_VALUE_DEFAULT_VALUE
| Constructor Detail |
|---|
public LookupTable(OutcomeDeclaration parent)
parent - parent of this object| Method Detail |
|---|
public OutcomeDeclaration 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 BaseType getTargetValueBaseType()
public SingleValue getDefaultValue()
setDefaultValue(org.qtitools.qti.value.SingleValue)public void setDefaultValue(SingleValue defaultValue)
defaultValue - new value of defaultValue attributegetDefaultValue()public abstract java.util.List<? extends LookupTableEntry> getLookupEntries()
public SingleValue getTargetValue(NumberValue sourceValue)
sourceValue - given source value
protected ValidationResult validateAttributes()
AbstractNode
validateAttributes in class AbstractNodeprotected ValidationResult validateChildren()
AbstractNode
validateChildren in class AbstractNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||