org.qtitools.qti.node.test
Class AbstractPart

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.UniqueObject
              extended by org.qtitools.qti.node.test.ControlObject
                  extended by org.qtitools.qti.node.test.AbstractPart
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable
Direct Known Subclasses:
SectionPart, TestPart

public abstract class AbstractPart
extends ControlObject

Abstract super class for test part and section part.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.qtitools.qti.node.test.ControlObject
finished, VARIABLE_DURATION_NAME
 
Fields inherited from class org.qtitools.qti.node.UniqueObject
ATTR_IDENTIFIER_NAME
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
AbstractPart(ControlObject parent)
          Constructs part.
 
Method Summary
 java.util.List<BranchRule> getBranchRules()
          Gets branchRule children.
abstract  ItemSessionControl getItemSessionControl()
          Gets itemSessionControl object for this part.
 ItemSessionControl getItemSessionControlNode()
          Gets itemSessionControl child.
 TestPart getParentTestPart()
          Gets parent test part of this part (returns itself if this part is instance of test part).
 java.util.List<PreCondition> getPreConditions()
          Gets preCondition children.
 boolean isJumpSafeSource()
          Returns true if it is safe to jump from this object; false otherwise.
 boolean isJumpSafeTarget()
          Returns true if this object is safe target of jump; false otherwise.
 void setItemSessionControlNode(ItemSessionControl itemSessionControl)
          Sets new itemSessionControl child.
 
Methods inherited from class org.qtitools.qti.node.test.ControlObject
getChildren, getDuration, getFinishedCount, getGlobalIndex, getParent, getPresentedCount, getResponseTime, getTimeLimit, getTotalCount, getTotalTime, initialize, isBuiltInVariable, isChildOf, isFinished, isPresented, lookup, lookupItemRef, lookupItemRefs, lookupItemRefs, lookupValue, passMaximumTimeLimit, passMinimumTimeLimit, setFinished, setTimeLimit
 
Methods inherited from class org.qtitools.qti.node.UniqueObject
getIdentifier, getSimpleName, setIdentifier, validateAttributes
 
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
 

Constructor Detail

AbstractPart

public AbstractPart(ControlObject parent)
Constructs part.

Parameters:
parent - parent of constructed part
Method Detail

getParentTestPart

public TestPart getParentTestPart()
Gets parent test part of this part (returns itself if this part is instance of test part).

Returns:
parent test part of this part (returns itself if this part is instance of test part)

getPreConditions

public java.util.List<PreCondition> getPreConditions()
Gets preCondition children.

Returns:
preCondition children

getBranchRules

public java.util.List<BranchRule> getBranchRules()
Gets branchRule children.

Returns:
branchRule children

getItemSessionControlNode

public ItemSessionControl getItemSessionControlNode()
Gets itemSessionControl child.

Returns:
itemSessionControl child
See Also:
setItemSessionControlNode(org.qtitools.qti.node.test.ItemSessionControl), getItemSessionControl()

setItemSessionControlNode

public void setItemSessionControlNode(ItemSessionControl itemSessionControl)
Sets new itemSessionControl child.

Parameters:
itemSessionControl - new itemSessionControl child
See Also:
getItemSessionControlNode()

getItemSessionControl

public abstract ItemSessionControl getItemSessionControl()
Gets itemSessionControl object for this part.

Use this method instead of getItemSessionControlNode, because returned object of this method contains all fields (they are inherited from parent if they are not defined in this part).

Returns:
itemSessionControl object for this part

isJumpSafeSource

public boolean isJumpSafeSource()
Returns true if it is safe to jump from this object; false otherwise.

It is not safe to jump from shuffled not fixed object (or if any parent is shuffled and not fixed), because object could be moved after jump target (it is not allowed).

Returns:
true if it is safe to jump from this object; false otherwise

isJumpSafeTarget

public boolean isJumpSafeTarget()
Returns true if this object is safe target of jump; false otherwise.

It is not save to jump on not required object in selection group (same for all its parents), because object could disappear (not be selected) and jump target is no longer valid.

It is not safe to jump on shuffled not fixed object (or if any parent is shuffled and not fixed), because object could be moved before jump source (it is not allowed).

Returns:
true if this object is safe target of jump; false otherwise


Copyright © 2009. All Rights Reserved.