|
||||||||||
| 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.test.AbstractJump
org.qtitools.qti.node.test.BranchRule
public class BranchRule
A branchRule is A simple expression attached to TestPart or assessmentSection or assessmentItemRef. It must evaluate to true if this branchRule should be applied.
If the expression evaluates to false, or has A NULL value, this branchRule will not be applied.
BranchRules are evaluated after part or section or item is finished (not presented).
BranchRule is not real expression (doesn't implement Expression interface).
Cardinality,
BaseType,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
ATTR_TARGET_NAME
Name of target attribute in xml schema. |
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
static java.lang.String |
EXIT_SECTION
Special target for exiting assessmentSection. |
static java.lang.String |
EXIT_TEST
Special target for exiting assessmentTest. |
static java.lang.String |
EXIT_TEST_PART
Special target for exiting testPart. |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
BranchRule(AbstractPart parent)
Constructs object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getClassTag()
Gets QTI class name of this node. |
java.lang.String |
getSimpleName()
Gets simple name of this node. |
java.lang.String |
getTarget()
Gets value of target attribute. |
ControlObject |
getTargetControlObject()
Gets target ControlOject of this branchRule or null it target doesn't exist. |
boolean |
isExitSection()
Returns true is target is EXIT_SECTION; false otherwise. |
boolean |
isExitTest()
Returns true is target is EXIT_TEST; false otherwise. |
boolean |
isExitTestPart()
Returns true is target is EXIT_TEST_PART; false otherwise. |
boolean |
isSpecial()
Returns true is target is EXIT_TEST or EXIT_TEST_PART or EXIT_SECTION; false otherwise. |
static boolean |
isSpecial(java.lang.String target)
Returns true if given target is special (EXIT_TEST, EXIT_TESTPART, EXIT_SECTION); false otherwise. |
void |
setTarget(java.lang.String target)
Sets new value of target attribute. |
protected ValidationResult |
validateAttributes()
Validates attributes of this node. |
| Methods inherited from class org.qtitools.qti.node.test.AbstractJump |
|---|
evaluate, getExpression, getParent, getRequiredBaseTypes, getRequiredCardinalities, setExpression, validate |
| 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, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, 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.XmlObject |
|---|
getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from interface org.qtitools.qti.node.XmlNode |
|---|
getAttributes, getFullName, getNodeGroups, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString |
| Field Detail |
|---|
public static final java.lang.String CLASS_TAG
public static final java.lang.String ATTR_TARGET_NAME
public static final java.lang.String EXIT_TEST
public static final java.lang.String EXIT_TEST_PART
public static final java.lang.String EXIT_SECTION
| Constructor Detail |
|---|
public BranchRule(AbstractPart parent)
parent - parent of created object| Method Detail |
|---|
public java.lang.String getClassTag()
XmlNodeQTI class name has very important role during loading/saving nodes.
For example: Java class name is AssessmentTest; QTI class name is assessmentTest.
getClassTag in interface XmlNodegetClassTag in class AbstractNodepublic java.lang.String getSimpleName()
XmlNodeSimple 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)).
getSimpleName in interface XmlNodegetSimpleName in class AbstractNodeXmlNode.getFullName()public java.lang.String getTarget()
setTarget(java.lang.String)public ControlObject getTargetControlObject()
public void setTarget(java.lang.String target)
target - new value of target attributegetTarget()public boolean isSpecial()
public boolean isExitTest()
public boolean isExitTestPart()
public boolean isExitSection()
protected ValidationResult validateAttributes()
AbstractNode
validateAttributes in class AbstractNodepublic static boolean isSpecial(java.lang.String target)
target - given target
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||