Package net.sf.okapi.lib.xliff2.its
Class DataCategoryGroup<T extends DataCategory>
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.its.DataCategoryGroup<T>
-
- All Implemented Interfaces:
IITSItem
- Direct Known Subclasses:
LocQualityIssues,Provenances
public abstract class DataCategoryGroup<T extends DataCategory> extends Object implements IITSItem
Represents a stand-off group for a given data category that can have multiple instances.
-
-
Constructor Summary
Constructors Constructor Description DataCategoryGroup(String id)Creates a newDataCategoryGroupobject with a given identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAnnotatorRef()Gets the annotator reference currently set for this data category.StringgetGroupId()Gets the identifier for this group.List<T>getList()Gets the list of instances for this group.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.voidsetGroupId(String id)Sets the identifier for this group.voidvalidate()Validates the data category.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.lib.xliff2.its.IITSItem
createCopy, getDataCategoryName
-
-
-
-
Constructor Detail
-
DataCategoryGroup
public DataCategoryGroup(String id)
Creates a newDataCategoryGroupobject with a given identifier.- Parameters:
id- the identifier to use (use null to create one automatically)
-
-
Method Detail
-
isGroup
public boolean isGroup()
Description copied from interface:IITSItemIndicates if this item is a group.
-
hasUnresolvedGroup
public boolean hasUnresolvedGroup()
Description copied from interface:IITSItemIndicates 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.
- Specified by:
hasUnresolvedGroupin interfaceIITSItem- Returns:
- true if this item has currently an unresolved reference to a stand-off element.
-
getGroupId
public String getGroupId()
Gets the identifier for this group.- Returns:
- the identifier for this group.
-
setGroupId
public void setGroupId(String id)
Sets the identifier for this group.- Parameters:
id- the identifier to set.
-
getList
public List<T> getList()
Gets the list of instances for this group.- Returns:
- the list of instances for this group.
-
setAnnotatorRef
public void setAnnotatorRef(String annotatorRef)
Description copied from interface:IITSItemSets the annotator reference information for this data category.- Specified by:
setAnnotatorRefin interfaceIITSItem- Parameters:
annotatorRef- the reference string to set (can be null).
-
setAnnotatorRef
public void setAnnotatorRef(AnnotatorsRef ar)
Description copied from interface:IITSItemSets the annotator reference information for this data category.- Specified by:
setAnnotatorRefin interfaceIITSItem- 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
public String getAnnotatorRef()
Description copied from interface:IITSItemGets the annotator reference currently set for this data category. This method is not be supported for items that are data category groups.- Specified by:
getAnnotatorRefin interfaceIITSItem- Returns:
- the annotator reference currently set for this data category.
-
-