net.sf.okapi.lib.xliff2.reader

## Class URIContext

- java.lang.Object
- - net.sf.okapi.lib.xliff2.reader.URIContext

- All Implemented Interfaces:
    java.lang.Cloneable

      public class URIContext
      extends java.lang.Object
      implements java.lang.Cloneable

  Represents the context for URI fragment identifier resolution in XLIFF.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `URIContext()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `URIContext` | `clone()`
    `java.lang.String` | `getFileId()` Gets the id of the file selector.
    `java.lang.String` | `getGroupId()` Gets the id of the group selector.
    `java.lang.String` | `getUnitId()` Gets the id of the unit selector.
    `java.lang.Object` | `matches(Event event, URIParser up)`
    `static java.lang.Object` | `searchData(Unit unit, java.lang.String dataId)` Searches an original data object in a given unit.
    `static java.lang.Object` | `searchExtensions(IWithExtElements parent, java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)` Searches recursively an `IWithExtElements` object for an extension object with a given id.
    `static java.lang.Object` | `searchInlineSource(Unit unit, java.lang.String id)` Searches a source inline code, segment or ignorable in a unit.
    `static java.lang.Object` | `searchInlineTarget(Unit unit, java.lang.String id)` Searches a target inline code in a unit.
    `static java.lang.Object` | `searchMatch(ExtElement elem, java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)`
    `static Note` | `searchNotes(IWithNotes parent, java.lang.String id)` Searches an `IWithNotes` object for a note with a given id.
    `static java.lang.Object` | `searchUnit(Unit unit, java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)` Searches recursively a `Unit` object for a module or an extension object with a given id.
    `void` | `setFileId(java.lang.String fileId)` Sets the the id of the file selector.
    `void` | `setGroupId(java.lang.String groupId)` Sets the id of the group selector.
    `void` | `setUnitId(java.lang.String unitId)` Sets the id of the unit selector.

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

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

- - ### Constructor Detail

    - #### URIContext

          public URIContext()

  - ### Method Detail

    - #### clone

          public URIContext clone()

      Overrides:
        `clone` in class `java.lang.Object`

    - #### getFileId

          public java.lang.String getFileId()

      Gets the id of the file selector.
      Returns:
        the id of the file selector (can be null).

    - #### setFileId

          public void setFileId(java.lang.String fileId)

      Sets the the id of the file selector.
      Parameters:
        `fileId` - the new id of the file selector (can be null).

    - #### getGroupId

          public java.lang.String getGroupId()

      Gets the id of the group selector.
      Returns:
        the id of the group selector (can be null).

    - #### setGroupId

          public void setGroupId(java.lang.String groupId)

      Sets the id of the group selector.
      Parameters:
        `groupId` - the new id of the group selector (can be null).

    - #### getUnitId

          public java.lang.String getUnitId()

      Gets the id of the unit selector.
      Returns:
        the id of the unit selector (can be null).

    - #### setUnitId

          public void setUnitId(java.lang.String unitId)

      Sets the id of the unit selector.
      Parameters:
        `unitId` - the new id of the unit selector (can be null).

    - #### matches

          public java.lang.Object matches(Event event,
                                 URIParser up)

    - #### searchNotes

          public static Note searchNotes(IWithNotes parent,
                         java.lang.String id)

      Searches an `IWithNotes` object for a note with a given id.
      Parameters:
        `parent` - the object where to search.
        `id` - the id of the note to search for.
      Returns:
        the note if found or null if not found.

    - #### searchInlineSource

          public static java.lang.Object searchInlineSource(Unit unit,
                                            java.lang.String id)

      Searches a source inline code, segment or ignorable in a unit.
      Parameters:
        `unit` - the unit where to search.
        `id` - the id of the object to search for.
      Returns:
        the object if found or null if not found.

    - #### searchInlineTarget

          public static java.lang.Object searchInlineTarget(Unit unit,
                                            java.lang.String id)

      Searches a target inline code in a unit.
      Parameters:
        `unit` - the unit where to search.
        `id` - the id of the object to search for.
      Returns:
        the object if found or null if not found.

    - #### searchUnit

          public static java.lang.Object searchUnit(Unit unit,
                                    java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)

      Searches recursively a `Unit` object for a module or an extension object with a given id.
      Parameters:
        `unit` - the unit where to search.
        `extensionInfo` - the information for the object to search for.
      Returns:
        the object if found or null if not found.

    - #### searchExtensions

          public static java.lang.Object searchExtensions(IWithExtElements parent,
                                          java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)

      Searches recursively an `IWithExtElements` object for an extension object with a given id.
      Parameters:
        `parent` - the object where to search.
        `extensionInfo` - the information for the object to search for.
      Returns:
        the object if found or null if not found.

    - #### searchMatch

          public static java.lang.Object searchMatch(ExtElement elem,
                                     java.util.AbstractMap.SimpleEntry<java.lang.String,java.util.List<java.lang.String>> extensionInfo)

    - #### searchData

          public static java.lang.Object searchData(Unit unit,
                                    java.lang.String dataId)

      Searches an original data object in a given unit.
      Parameters:
        `unit` - the unit where to search.
        `dataId` - the id of the data to search for.
      Returns:
        the object if found or null if not found.