org.qtitools.qti.node
Class AbstractObject

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable
Direct Known Subclasses:
AbstractExpression, AbstractJump, AbstractResult, AreaMapEntry, AreaMapping, AssessmentResult, BodyElement, CandidateComment, CandidateResponse, ContainerBlock, Context, CorrectResponse, DefaultValue, FieldValue, ItemSessionControl, ItemVariable, LookupTable, LookupTableEntry, MapEntry, Mapping, ModalFeedback, Ordering, OutcomeConditionChild, OutcomeProcessing, OutcomeRule, Param, PositionObjectStage, ResponseConditionChild, ResponseProcessing, ResponseRule, Selection, SessionIdentifier, SimpleMatchSet, Stylesheet, TemplateConditionChild, TemplateDefault, TemplateProcessing, TemplateRule, TestFeedback, TextRun, TimeLimit, UniqueObject, VariableMapping, Weight

public abstract class AbstractObject
extends AbstractNode
implements XmlObject

Parent of all xml objects.

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

Field Summary
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
AbstractObject(XmlObject parent)
          Constructs object.
 
Method Summary
 XmlObject getParent()
          Gets parent of this node or null (if node is root; for example AssessmentTest).
 AssessmentItem getParentItem()
          Gets root assessmentItem or null (if root is different type).
 AssessmentResult getParentResult()
          Gets root assessmentResult or null (if root is different type).
 AssessmentTest getParentTest()
          Gets root assessmentTest or null (if root is different type).
 void setParent(XmlObject parent)
          Sets the parent of this object.
 
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, 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, 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
 

Constructor Detail

AbstractObject

public AbstractObject(XmlObject parent)
Constructs object.

Parameters:
parent - parent of constructed object (can be null for root objects)
Method Detail

getParent

public XmlObject 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 AbstractNode
Returns:
parent of this node or null (if node is root; for example AssessmentTest)

setParent

public void setParent(XmlObject parent)
Description copied from interface: XmlObject
Sets the parent of this object.

Specified by:
setParent in interface XmlObject
Parameters:
parent - Parent object to set

getParentTest

public AssessmentTest getParentTest()
Description copied from interface: XmlObject
Gets root assessmentTest or null (if root is different type).

Specified by:
getParentTest in interface XmlObject
Returns:
root assessmentTest or null (if root is different type)

getParentItem

public AssessmentItem getParentItem()
Description copied from interface: XmlObject
Gets root assessmentItem or null (if root is different type).

Specified by:
getParentItem in interface XmlObject
Returns:
root assessmentItem or null (if root is different type)

getParentResult

public AssessmentResult getParentResult()
Description copied from interface: XmlObject
Gets root assessmentResult or null (if root is different type).

Specified by:
getParentResult in interface XmlObject
Returns:
root assessmentResult or null (if root is different type)


Copyright © 2009. All Rights Reserved.