Class URIContext

  • All Implemented Interfaces:
    Cloneable

    public class URIContext
    extends Object
    implements Cloneable
    Represents the context for URI fragment identifier resolution in XLIFF.
    • Constructor Detail

      • URIContext

        public URIContext()
    • Method Detail

      • getFileId

        public String getFileId()
        Gets the id of the file selector.
        Returns:
        the id of the file selector (can be null).
      • setFileId

        public void setFileId​(String fileId)
        Sets the the id of the file selector.
        Parameters:
        fileId - the new id of the file selector (can be null).
      • getGroupId

        public String getGroupId()
        Gets the id of the group selector.
        Returns:
        the id of the group selector (can be null).
      • setGroupId

        public void setGroupId​(String groupId)
        Sets the id of the group selector.
        Parameters:
        groupId - the new id of the group selector (can be null).
      • getUnitId

        public String getUnitId()
        Gets the id of the unit selector.
        Returns:
        the id of the unit selector (can be null).
      • setUnitId

        public void setUnitId​(String unitId)
        Sets the id of the unit selector.
        Parameters:
        unitId - the new id of the unit selector (can be null).
      • searchNotes

        public static Note searchNotes​(IWithNotes parent,
                                       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 Object searchInlineSource​(Unit unit,
                                                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 Object searchInlineTarget​(Unit unit,
                                                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 Object searchUnit​(Unit unit,
                                        AbstractMap.SimpleEntry<String,​List<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 Object searchExtensions​(IWithExtElements parent,
                                              AbstractMap.SimpleEntry<String,​List<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.
      • searchData

        public static Object searchData​(Unit unit,
                                        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.