org.qtitools.qti.node.test
Class Ordering

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.test.Ordering
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable

public class Ordering
extends AbstractObject

The ordering class specifies the rule used to arrange the child elements of A section following selection. If no ordering rule is given we assume that the elements are to be ordered in the order in which they are defined.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_SHUFFLE_NAME
          Name of shuffle 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
Ordering(AssessmentSection parent)
          Constructs object.
 
Method Summary
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 AssessmentSection getParent()
          Gets parent of this node or null (if node is root; for example AssessmentTest).
 java.lang.Boolean getShuffle()
          Gets value of shuffle attribute.
 void process()
          Applies this ordering to its parent children.
 void setShuffle(java.lang.Boolean shuffle)
          Sets new value of shuffle attribute.
 
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, 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.XmlNode
getAttributes, 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

CLASS_TAG

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

See Also:
Constant Field Values

ATTR_SHUFFLE_NAME

public static final java.lang.String ATTR_SHUFFLE_NAME
Name of shuffle attribute in xml schema.

See Also:
Constant Field Values
Constructor Detail

Ordering

public Ordering(AssessmentSection parent)
Constructs object.

Parameters:
parent - parent of created object
Method Detail

getParent

public AssessmentSection 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)

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

getShuffle

public java.lang.Boolean getShuffle()
Gets value of shuffle attribute.

Returns:
value of shuffle attribute
See Also:
setShuffle(java.lang.Boolean)

setShuffle

public void setShuffle(java.lang.Boolean shuffle)
Sets new value of shuffle attribute.

Parameters:
shuffle - new value of shuffle attribute
See Also:
getShuffle()

process

public void process()
Applies this ordering to its parent children.



Copyright © 2009. All Rights Reserved.