net.sf.okapi.lib.xliff2.document

## Class FileNode

- java.lang.Object
- - net.sf.okapi.lib.xliff2.document.FileNode

-     public class FileNode
      extends java.lang.Object

  Represents a <file> node.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileNode(StartFileData data)` Creates a new `FileNode` object with a given `StartFileData` resource.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `GroupNode` | `add(GroupNode node)` Adds a `GroupNode` to this file node.
    `void` | `add(InsingnificantPartData data, boolean placeBefore)`
    `UnitNode` | `add(UnitNode node)` Adds a `UnitNode` to this file node.
    `java.util.Iterator<Event>` | `createEventIterator(java.util.Stack<URIContext> uriContext)` Create an iterator for the event for this file node.
    `GroupNode` | `getGroupNode(java.lang.String id)` Gets a `GroupNode` for a given id.
    `MidFileData` | `getMidData()` Gets the `MidFileData` resource for this file node.
    `Skeleton` | `getSkeletonData()` Gets the `Skeleton` for this file node.
    `StartFileData` | `getStartData()` Gets the `StartFileData` object for this file 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 file node.
    `void` | `setMidData(MidFileData data)` Sets the `MidFileData` resource for this file node.
    `void` | `setSkeletonData(Skeleton data)` Sets the `Skeleton` resource for this file node.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileNode

          public FileNode(StartFileData data)

      Creates a new `FileNode` object with a given `StartFileData` resource.
      Parameters:
        `data` - the resource to attach to this node.

  - ### Method Detail

    - #### getStartData

          public StartFileData getStartData()

      Gets the `StartFileData` object for this file node.
      Returns:
        the `StartFileData` object for this file node.

    - #### setMidData

          public void setMidData(MidFileData data)

      Sets the `MidFileData` resource for this file node.
      Parameters:
        `data` - the `MidFileData` object for this file node.

    - #### getMidData

          public MidFileData getMidData()

      Gets the `MidFileData` resource for this file node.
      Returns:
        the `MidFileData` for this file node.

    - #### setSkeletonData

          public void setSkeletonData(Skeleton data)

      Sets the `Skeleton` resource for this file node.
      Parameters:
        `data` - the `Skeleton` object for this file node.

    - #### getSkeletonData

          public Skeleton getSkeletonData()

      Gets the `Skeleton` for this file node.
      Returns:
        the `Skeleton` for this file node.

    - #### add

          public UnitNode add(UnitNode node)

      Adds a `UnitNode` to this file node.
      Parameters:
        `node` - the unit node to add.
      Returns:
        the added unit node.

    - #### add

          public GroupNode add(GroupNode node)

      Adds a `GroupNode` to this file node. If the group has a UUID is set automatically.
      Parameters:
        `node` - the group node to add.
      Returns:
        the added group node.

    - #### getUnitNodes

          public java.util.List<UnitNode> getUnitNodes()

      Gets all the `UnitNode` elements of this file node. All units at any level in this file node are returned.
      Returns:
        all the unit nodes for the file node. The list will be empty (but never NULL), if no unit nodes were found.

    - #### getUnitNode

          public UnitNode getUnitNode(java.lang.String id)

      Gets the `UnitNode` for a given unit id. The unit can be at any level in this file node.
      Parameters:
        `id` - the id to look for.
      Returns:
        the unit node for the given id, or null if none is found.

    - #### getGroupNode

          public GroupNode getGroupNode(java.lang.String id)

      Gets a `GroupNode` for a given id. The group can be at any level in this file node.
      Parameters:
        `id` - the id to look for.
      Returns:
        the group node for the given id, or null if none is found.

    - #### createEventIterator

          public java.util.Iterator<Event> createEventIterator(java.util.Stack<URIContext> uriContext)

      Create an iterator for the event for this file node.
      Parameters:
        `uriContext` - the URI context.
      Returns:
        a new iterator for the events in this file node.

    - #### add

          public void add(InsingnificantPartData data,
                 boolean placeBefore)