Package net.sf.okapi.lib.xliff2.reader
Class URIContext
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.reader.URIContext
-
-
Constructor Summary
Constructors Constructor Description URIContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URIContextclone()StringgetFileId()Gets the id of the file selector.StringgetGroupId()Gets the id of the group selector.StringgetUnitId()Gets the id of the unit selector.Objectmatches(Event event, URIParser up)static ObjectsearchData(Unit unit, String dataId)Searches an original data object in a given unit.static ObjectsearchExtensions(IWithExtElements parent, AbstractMap.SimpleEntry<String,List<String>> extensionInfo)Searches recursively anIWithExtElementsobject for an extension object with a given id.static ObjectsearchInlineSource(Unit unit, String id)Searches a source inline code, segment or ignorable in a unit.static ObjectsearchInlineTarget(Unit unit, String id)Searches a target inline code in a unit.static ObjectsearchMatch(ExtElement elem, AbstractMap.SimpleEntry<String,List<String>> extensionInfo)static NotesearchNotes(IWithNotes parent, String id)Searches anIWithNotesobject for a note with a given id.static ObjectsearchUnit(Unit unit, AbstractMap.SimpleEntry<String,List<String>> extensionInfo)Searches recursively aUnitobject for a module or an extension object with a given id.voidsetFileId(String fileId)Sets the the id of the file selector.voidsetGroupId(String groupId)Sets the id of the group selector.voidsetUnitId(String unitId)Sets the id of the unit selector.
-
-
-
Method Detail
-
clone
public URIContext clone()
-
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 anIWithNotesobject 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 aUnitobject 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 anIWithExtElementsobject 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 Object searchMatch(ExtElement elem, AbstractMap.SimpleEntry<String,List<String>> extensionInfo)
-
-