|
||||||||||
| 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.Selection
public class Selection
The selection class specifies the rules used to select the child elements of A section for each test session. If no selection rules are given we assume that all elements are to be selected.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_SELECT_NAME
Name of select attribute in xml schema. |
static java.lang.Boolean |
ATTR_WITH_REPLACEMENT_DEFAULT_VALUE
Default value of withReplacement attribute. |
static java.lang.String |
ATTR_WITH_REPLACEMENT_NAME
Name of withReplacement 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 | |
|---|---|
Selection(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.Integer |
getSelect()
Gets value of select attribute. |
java.lang.Boolean |
getWithReplacement()
Gets value of withReplacement attribute. |
void |
process()
Applies this selection to its parent children. |
void |
setSelect(java.lang.Integer select)
Sets new value of select attribute. |
void |
setWithReplacement(java.lang.Boolean withReplacement)
Sets new value of withReplacement attribute. |
protected ValidationResult |
validateAttributes()
Validates attributes 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, 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, 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 |
|---|
public static final java.lang.String CLASS_TAG
public static final java.lang.String ATTR_SELECT_NAME
public static final java.lang.String ATTR_WITH_REPLACEMENT_NAME
public static final java.lang.Boolean ATTR_WITH_REPLACEMENT_DEFAULT_VALUE
| Constructor Detail |
|---|
public Selection(AssessmentSection parent)
parent - parent of created object.| Method Detail |
|---|
public AssessmentSection 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 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.Integer getSelect()
setSelect(java.lang.Integer)public void setSelect(java.lang.Integer select)
select - new value of select attributegetSelect()public java.lang.Boolean getWithReplacement()
setWithReplacement(java.lang.Boolean)public void setWithReplacement(java.lang.Boolean withReplacement)
withReplacement - new value of withReplacement attributegetWithReplacement()protected ValidationResult validateAttributes()
AbstractNode
validateAttributes in class AbstractNodepublic void process()
Current implementation is not fully compatible with QTI 2.1 specification (identifier of duplicated items is changed to identifier_N).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||