Package net.sf.okapi.lib.xliff2.its
Interface IITSItem
-
- All Known Implementing Classes:
DataCategory,DataCategoryGroup,Domain,LocQualityIssue,LocQualityIssues,MTConfidence,Provenance,Provenances,TextAnalysis
public interface IITSItemRepresents an ITS data category or a group of several instances of an ITS data category.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IITSItemcreateCopy()Creates a deep-copy clone of this item.StringgetAnnotatorRef()Gets the annotator reference currently set for this data category.StringgetDataCategoryName()Gets the id/name of this data category.booleanhasUnresolvedGroup()Indicates if this item has currently a reference to a stand-off element that has not been resolved yet.booleanisGroup()Indicates if this item is a group.voidsetAnnotatorRef(String annotatorRef)Sets the annotator reference information for this data category.voidsetAnnotatorRef(AnnotatorsRef ar)Sets the annotator reference information for this data category.voidvalidate()Validates the data category.
-
-
-
Method Detail
-
getDataCategoryName
String getDataCategoryName()
Gets the id/name of this data category.- Returns:
- the id/name of this data category.
-
isGroup
boolean isGroup()
Indicates if this item is a group.- Returns:
- true if it is a group, false if it is a standalone data category instance.
-
hasUnresolvedGroup
boolean hasUnresolvedGroup()
Indicates if this item has currently a reference to a stand-off element that has not been resolved yet.This occurs for example when a unit element has a reference to a set of Provenance instances and the stand-off element has not been read yet (because the reading of the unit's element is done after the reading of its attributes.
- Returns:
- true if this item has currently an unresolved reference to a stand-off element.
-
setAnnotatorRef
void setAnnotatorRef(String annotatorRef)
Sets the annotator reference information for this data category.- Parameters:
annotatorRef- the reference string to set (can be null).
-
setAnnotatorRef
void setAnnotatorRef(AnnotatorsRef ar)
Sets the annotator reference information for this data category.- Parameters:
ar- the set of references read fromits:annotatorsRef. If it is null, or if there is no reference for the relevant data category: no change is made.
-
getAnnotatorRef
String getAnnotatorRef()
Gets the annotator reference currently set for this data category. This method is not be supported for items that are data category groups.- Returns:
- the annotator reference currently set for this data category.
-
validate
void validate()
Validates the data category. Checks if all required attributes are set properly.- Throws:
XLIFFException- if there is an error.
-
createCopy
IITSItem createCopy()
Creates a deep-copy clone of this item.- Returns:
- the duplicated item.
-
-