Package net.sf.okapi.lib.xliff2.document
Class GroupNode
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.document.WithGroupOrUnitNode
-
- net.sf.okapi.lib.xliff2.document.GroupNode
-
- All Implemented Interfaces:
IGroupOrUnitNode,IWithGroupOrUnitNode
public class GroupNode extends WithGroupOrUnitNode implements IGroupOrUnitNode, IWithGroupOrUnitNode
Represents a group node.
-
-
Constructor Summary
Constructors Constructor Description GroupNode(GroupNode parent, StartGroupData data)Creates a newGroupNodeobject with a givenStartGroupDataresource and parent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Event>createEventIterator(Stack<URIContext> uriContext)Creates an iterator for the events in this group node.StartGroupDataget()Gets theStartGroupDataresource for this group node.GroupNodegetParent()Gets the parent for this group node.booleanisUnit()Indicates if this node is a UnitNode.-
Methods inherited from class net.sf.okapi.lib.xliff2.document.WithGroupOrUnitNode
add, add, addGroupNode, addUnitNode, createGroupOrUnitIterator, getGroupNode, getUnitNode, getUnitNodes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.lib.xliff2.document.IWithGroupOrUnitNode
add, add, addGroupNode, addUnitNode, createGroupOrUnitIterator, getGroupNode, getUnitNode, getUnitNodes
-
-
-
-
Constructor Detail
-
GroupNode
public GroupNode(GroupNode parent, StartGroupData data)
Creates a newGroupNodeobject with a givenStartGroupDataresource and parent.- Parameters:
parent- the parent of this new group node (use null for top-level groups).data- the data for this new group node.
-
-
Method Detail
-
get
public StartGroupData get()
Gets theStartGroupDataresource for this group node.- Returns:
- the resource for this group node.
-
isUnit
public boolean isUnit()
Description copied from interface:IGroupOrUnitNodeIndicates if this node is a UnitNode.- Specified by:
isUnitin interfaceIGroupOrUnitNode- Returns:
- true if it is a UnitNode, false if it is a GroupNode.
-
getParent
public GroupNode getParent()
Gets the parent for this group node.- Returns:
- the parent for this group node, or null for a top-level group.
-
createEventIterator
public Iterator<Event> createEventIterator(Stack<URIContext> uriContext)
Creates an iterator for the events in this group node.- Parameters:
uriContext- the URI context.- Returns:
- a new iterator for the events in this group node.
-
-