public class GroupNode extends GroupOrUnitNode
| Constructor and Description |
|---|
GroupNode(GroupNode parent,
StartGroupData data)
Creates a new
GroupNode object with a given StartGroupData resource and parent. |
| Modifier and Type | Method and Description |
|---|---|
GroupNode |
add(GroupNode node)
Adds a
GroupNode to this group node. |
void |
add(InsingnificantPartData data,
boolean placeBefore) |
UnitNode |
add(UnitNode node)
Adds a
UnitNode to this group node. |
java.util.Iterator<Event> |
createEventIterator(java.util.Stack<URIContext> uriContext)
Creates an iterator for the events in this group node.
|
java.util.Iterator<GroupOrUnitNode> |
createGroupOrUnitIterator()
Creates an iterator for the group nodes and unit nodes in this group node.
|
StartGroupData |
get()
Gets the
StartGroupData resource for this group node. |
GroupNode |
getGroupNode(java.lang.String id)
Gets a
GroupNode for a given id. |
GroupNode |
getParent()
Gets the parent for this group node.
|
UnitNode |
getUnitNode(java.lang.String id)
Gets the
UnitNode for a given unit id. |
java.util.List<UnitNode> |
getUnitNodes()
Gets all the
UnitNode elements of this group node. |
boolean |
isUnit()
Indicates if this node is a UnitNode.
|
public GroupNode(GroupNode parent, StartGroupData data)
GroupNode object with a given StartGroupData resource and parent.parent - the parent of this new group node (use null for top-level groups).data - the data for this new group node.public StartGroupData get()
StartGroupData resource for this group node.public boolean isUnit()
GroupOrUnitNodeisUnit in class GroupOrUnitNodepublic UnitNode add(UnitNode node)
UnitNode to this group node.node - the unit node to add.public GroupNode add(GroupNode node)
GroupNode to this group node.node - the group node to add.public GroupNode getParent()
public UnitNode getUnitNode(java.lang.String id)
UnitNode for a given unit id.
The unit can be at any level in this group node.id - the id to look for.public GroupNode getGroupNode(java.lang.String id)
GroupNode for a given id.
The group can be at any level in this group node.id - the id to look for.public java.util.Iterator<GroupOrUnitNode> createGroupOrUnitIterator()
public java.util.Iterator<Event> createEventIterator(java.util.Stack<URIContext> uriContext)
uriContext - the URI context.public java.util.List<UnitNode> getUnitNodes()
UnitNode elements of this group node.
All units at any level (including nested groups) in this group node are returned.public void add(InsingnificantPartData data, boolean placeBefore)