|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NodeGroup
Container for one node type.
For example: TestPartNodeGroup (group for testParts), ExpressionNodeGroup (group for expressions).
| Method Summary | |
|---|---|
XmlNode |
create(java.lang.String classTag)
Creates child with given QTI class name. |
java.util.List<java.lang.String> |
getAllSupportedClasses()
Returns list of all possible QTI class names (all possible children in this group). |
java.util.List<XmlNode> |
getChildren()
Gets list of all children. |
java.util.List<java.lang.String> |
getCurrentSupportedClasses(int index)
Returns list of all currently possible QTI class names (all currently possible children in this group). |
java.lang.String |
getFullName()
Gets full name of group (full path from root node up to node's parent and node's name). |
java.lang.Integer |
getMaximum()
Gets allowed maximum number of children or null. |
java.lang.Integer |
getMinimum()
Gets required minimum number of children or null. |
java.lang.String |
getName()
Gets name of group. |
XmlNode |
getParent()
Gets parent node of group. |
boolean |
isGeneral()
Returns true if group can contain children with different QTI class name; false otherwise. |
void |
load(org.w3c.dom.Node sourceNode)
Loads children from given source node (DOM). |
java.lang.String |
toXmlString(int depth,
boolean printDefaultAttributes)
Prints all children into string. |
| Methods inherited from interface org.qtitools.qti.validation.Validatable |
|---|
validate |
| Method Detail |
|---|
XmlNode getParent()
java.lang.String getName()
Name of group is typically QTI class name of its children (if it is same for all children).
For example: name of TestPartNodeGroup is testPart.
If group can contain children with different QTI class name, name is display name of abstract parent.
For example: name of ExpressionNodeGroup is expression (expression is not QTI class name for any node).
java.lang.String getFullName()
boolean isGeneral()
java.util.List<java.lang.String> getAllSupportedClasses()
This list will not change in time (it contains every possible QTI class name).
For example: SectionPartNodegroups returns assessmentSection and assessmentItemRef.
getCurrentSupportedClasses(int)java.util.List<java.lang.String> getCurrentSupportedClasses(int index)
This list can change in time (it contains every possible QTI class name for current time (conditions)).
For example: expression delete can contain on first position only expressions which produce single value and on second position only expressions which produce multiple or ordered cardinality.
index - index of children in group
java.util.List<XmlNode> getChildren()
java.lang.Integer getMinimum()
java.lang.Integer getMaximum()
XmlNode create(java.lang.String classTag)
Parameter classTag is needed only if group can contain children with different QTI class names (otherwise it is ignored).
classTag - QTI class name
void load(org.w3c.dom.Node sourceNode)
sourceNode - source node (DOM)
java.lang.String toXmlString(int depth,
boolean printDefaultAttributes)
depth - depth indent (0 = no indent)printDefaultAttributes - whether print attribute's default values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||