org.qtitools.qti.group
Interface NodeGroup

All Superinterfaces:
java.io.Serializable, Validatable
All Known Implementing Classes:
AbstractContentNodeGroup, AbstractNodeGroup, AreaMapEntryGroup, AreaMappingGroup, AssessmentSectionGroup, AssociableHotspotGroup, BlockGroup, BlockStaticGroup, BranchRuleGroup, CandidateCommentGroup, CandidateResponseGroup, CaptionGroup, ColGroup, ColgroupGroup, ContextGroup, CorrectResponseGroup, DefaultValueGroup, DlElementGroup, ExpressionGroup, FieldValueGroup, FlowGroup, FlowStaticGroup, GapChoiceGroup, GapImgGroup, HotspotChoiceGroup, IdentificationGroup, InlineChoiceGroup, InlineGroup, InlineStaticGroup, InteractionGroup, InterpolationTableEntryGroup, ItemBodyGroup, ItemResultGroup, ItemSessionControlGroup, ItemVariableGroup, LiGroup, LookupTableGroup, MapEntryGroup, MappingGroup, MatchTableEntryGroup, ModalFeedbackGroup, ObjectFlowGroup, ObjectGroup, OrderingGroup, OutcomeDeclarationGroup, OutcomeElseGroup, OutcomeElseIfGroup, OutcomeIfGroup, OutcomeProcessingGroup, OutcomeRuleGroup, PositionObjectInteractionGroup, PreConditionGroup, PromptGroup, ResponseDeclarationGroup, ResponseElseGroup, ResponseElseIfGroup, ResponseIfGroup, ResponseProcessingGroup, ResponseRuleGroup, RubricBlockGroup, SectionPartGroup, SelectionGroup, SessionIdentifierGroup, SimpleAssociableChoiceGroup, SimpleChoiceGroup, SimpleMatchSetGroup, StylesheetGroup, TableCellGroup, TbodyGroup, TemplateDeclarationGroup, TemplateDefaultGroup, TemplateElseGroup, TemplateElseIfGroup, TemplateIfGroup, TemplateProcessingGroup, TemplateRuleGroup, TestFeedbackGroup, TestPartGroup, TestResultGroup, TextOrVariableGroup, TfootGroup, TheadGroup, TimeLimitGroup, TrGroup, VariableMappingGroup, WeightGroup

public interface NodeGroup
extends Validatable, java.io.Serializable

Container for one node type.

For example: TestPartNodeGroup (group for testParts), ExpressionNodeGroup (group for expressions).

Author:
Jiri Kajaba

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

getParent

XmlNode getParent()
Gets parent node of group.

Returns:
parent node of group

getName

java.lang.String getName()
Gets name of group.

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).

Returns:
name of group

getFullName

java.lang.String getFullName()
Gets full name of group (full path from root node up to node's parent and node's name).

Returns:
full name of group (full path from root node up to node's parent and node's name)

isGeneral

boolean isGeneral()
Returns true if group can contain children with different QTI class name; false otherwise.

Returns:
true if group can contain children with different QTI class name; false otherwise

getAllSupportedClasses

java.util.List<java.lang.String> getAllSupportedClasses()
Returns list of all possible QTI class names (all possible children in this group).

This list will not change in time (it contains every possible QTI class name).

For example: SectionPartNodegroups returns assessmentSection and assessmentItemRef.

Returns:
list of all possible QTI class names (all possible children in this group)
See Also:
getCurrentSupportedClasses(int)

getCurrentSupportedClasses

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).

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.

Parameters:
index - index of children in group
Returns:
list of all currently possible QTI class names (all currently possible children in this group)

getChildren

java.util.List<XmlNode> getChildren()
Gets list of all children.

Returns:
list of all children

getMinimum

java.lang.Integer getMinimum()
Gets required minimum number of children or null.

Returns:
required minimum number of children or null

getMaximum

java.lang.Integer getMaximum()
Gets allowed maximum number of children or null.

Returns:
allowed maximum number of children or null

create

XmlNode create(java.lang.String classTag)
Creates child with given QTI class name.

Parameter classTag is needed only if group can contain children with different QTI class names (otherwise it is ignored).

Parameters:
classTag - QTI class name
Returns:
created child

load

void load(org.w3c.dom.Node sourceNode)
Loads children from given source node (DOM).

Parameters:
sourceNode - source node (DOM)

toXmlString

java.lang.String toXmlString(int depth,
                             boolean printDefaultAttributes)
Prints all children into string.

Parameters:
depth - depth indent (0 = no indent)
printDefaultAttributes - whether print attribute's default values
Returns:
xml string of all children


Copyright © 2009. All Rights Reserved.