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 and Description
    `GroupNode(GroupNode parent, StartGroupData data)` Creates a new `GroupNode` object with a given `StartGroupData` resource and parent.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Iterator<Event>` | `createEventIterator(java.util.Stack<URIContext> uriContext)` Creates an iterator for the events in this group node.
    `StartGroupData` | `get()` Gets the `StartGroupData` resource for this group node.
    `GroupNode` | `getParent()` Gets the parent for this group node.
    `boolean` | `isUnit()` 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 new `GroupNode` object with a given `StartGroupData` resource 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 the `StartGroupData` resource for this group node.
      Returns:
        the resource for this group node.

    - #### isUnit

          public boolean isUnit()

      Description copied from interface: `IGroupOrUnitNode`
      Indicates if this node is a UnitNode.
      Specified by:
        `isUnit` in interface `IGroupOrUnitNode`
      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 java.util.Iterator<Event> createEventIterator(java.util.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.