Package net.sf.okapi.lib.xliff2.core
Class StartGroupData
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.InheritedData
-
- net.sf.okapi.lib.xliff2.core.StartGroupData
-
- All Implemented Interfaces:
IWithChangeTrack,IWithExtAttributes,IWithExtElements,IWithInheritedData,IWithMetadata,IWithNotes,IWithValidation
public class StartGroupData extends InheritedData
Represents the information associated with the start of a group.
-
-
Constructor Summary
Constructors Constructor Description StartGroupData(String id)Creates a newStartGroupDataobject with a given id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNote(Note note)Adds a note to the list of notes.ChangeTrackgetChangeTrack()Gets theChangeTrackobject for this element, creates an empty of if there is none.ExtAttributesgetExtAttributes()Gets theExtAttributesobject for the parent object.StringgetExtAttributeValue(String namespaceURI, String localName)Gets the value for a given extension attribute.ExtElementsgetExtElements()Gets theExtElementsobject associated with this object.StringgetId()Gets the id for this object.MetadatagetMetadata()Gets theMetadataobject for the parent, creates an empty of if there is none.StringgetName()Gets the name for this group.intgetNoteCount()Gets the number of notes for this object.NotesgetNotes()Gets theNotesobject for this object.StringgetType()Gets the type for this group.ValidationgetValidation()Gets theValidationobject for the parent, creates an empty of if there is none.booleanhasChangeTrack()Check if there is at least a revision for this element.booleanhasExtAttribute()Indicates if at least one extension attribute is present.booleanhasExtElements()Indicates if there is aExtElementsobject associated with this object.booleanhasMetadata()Indicates if the object has metadata.booleanhasValidation()Indicates if the object has validation data.voidsetChangeTrack(ChangeTrack changeTrack)Sets theChangeTrackobject for this element.voidsetExtAttributes(ExtAttributes attributes)Sets theExtAttributesobject associated with this object.ExtElementssetExtElements(ExtElements elements)Sets theExtElementsobject associated with this object.voidsetId(String id)Sets the id for this object.voidsetMetadata(Metadata metadata)sets theMetadataobject for the parent.voidsetName(String name)Sets the name for this group.voidsetType(String type)Sets the type for this group.voidsetValidation(Validation validation)sets theValidationobject for the parent.-
Methods inherited from class net.sf.okapi.lib.xliff2.core.InheritedData
getAnnotatorsRef, getCanResegment, getSourceDir, getTargetDir, getTranslate, setAnnotatorsRef, setCanResegment, setInheritableData, setSourceDir, setTargetDir, setTranslate
-
-
-
-
Constructor Detail
-
StartGroupData
public StartGroupData(String id)
Creates a newStartGroupDataobject with a given id.- Parameters:
id- the id to use for this group (should not be null, but allow it to set it later).
-
-
Method Detail
-
getExtElements
public ExtElements getExtElements()
Description copied from interface:IWithExtElementsGets theExtElementsobject associated with this object. If none exists one is created.- Specified by:
getExtElementsin interfaceIWithExtElements- Returns:
- the
ExtElementsobject associated with this object. If none exists one is created.
-
hasExtElements
public boolean hasExtElements()
Description copied from interface:IWithExtElementsIndicates if there is aExtElementsobject associated with this object.- Specified by:
hasExtElementsin interfaceIWithExtElements- Returns:
- true if there is a
ExtElementsobject associated with this object, false otherwise.
-
setExtElements
public ExtElements setExtElements(ExtElements elements)
Description copied from interface:IWithExtElementsSets theExtElementsobject associated with this object.- Specified by:
setExtElementsin interfaceIWithExtElements- Parameters:
elements- theExtElementsobject associated with this object. If null, a newExtElementsobject is created.- Returns:
- the
ExtElementsobject associated with this object, never null.
-
addNote
public void addNote(Note note)
Description copied from interface:IWithNotesAdds a note to the list of notes.- Specified by:
addNotein interfaceIWithNotes- Parameters:
note- the note to add.
-
getNotes
public Notes getNotes()
Description copied from interface:IWithNotesGets theNotesobject for this object.- Specified by:
getNotesin interfaceIWithNotes- Returns:
- the notes for this object. Never returns null.
-
getNoteCount
public int getNoteCount()
Description copied from interface:IWithNotesGets the number of notes for this object.- Specified by:
getNoteCountin interfaceIWithNotes- Returns:
- the number of notes available.
-
getName
public String getName()
Gets the name for this group.- Returns:
- the name for this group (can be null).
-
setName
public void setName(String name)
Sets the name for this group.- Parameters:
name- the new name to set (can be null).
-
getType
public String getType()
Gets the type for this group.- Returns:
- the type for this group (can be null).
-
setType
public void setType(String type)
Sets the type for this group. The value must have a prefix (for both unit and group elements)- Parameters:
type- the new type to set (can be null).
-
hasMetadata
public boolean hasMetadata()
Description copied from interface:IWithMetadataIndicates if the object has metadata.- Specified by:
hasMetadatain interfaceIWithMetadata- Returns:
- true if the object has metadata, false otherwise.
-
getMetadata
public Metadata getMetadata()
Description copied from interface:IWithMetadataGets theMetadataobject for the parent, creates an empty of if there is none.- Specified by:
getMetadatain interfaceIWithMetadata- Returns:
- the
Metadataobject for the parent (can be empty, but never null).
-
setMetadata
public void setMetadata(Metadata metadata)
Description copied from interface:IWithMetadatasets theMetadataobject for the parent.- Specified by:
setMetadatain interfaceIWithMetadata- Parameters:
metadata- the newMetadataobject for the parent.
-
hasValidation
public boolean hasValidation()
Description copied from interface:IWithValidationIndicates if the object has validation data.- Specified by:
hasValidationin interfaceIWithValidation- Returns:
- true if the object has validataion data, false otherwise.
-
getValidation
public Validation getValidation()
Description copied from interface:IWithValidationGets theValidationobject for the parent, creates an empty of if there is none.- Specified by:
getValidationin interfaceIWithValidation- Returns:
- the
Validationobject for the parent (can be empty, but never null).
-
setValidation
public void setValidation(Validation validation)
Description copied from interface:IWithValidationsets theValidationobject for the parent.- Specified by:
setValidationin interfaceIWithValidation- Parameters:
validation- the newValidationobject for the parent.
-
getChangeTrack
public ChangeTrack getChangeTrack()
Description copied from interface:IWithChangeTrackGets theChangeTrackobject for this element, creates an empty of if there is none.- Specified by:
getChangeTrackin interfaceIWithChangeTrack- Returns:
- the
ChangeTrackobject for this element (can be empty, never null).
-
setChangeTrack
public void setChangeTrack(ChangeTrack changeTrack)
Description copied from interface:IWithChangeTrackSets theChangeTrackobject for this element.- Specified by:
setChangeTrackin interfaceIWithChangeTrack- Parameters:
changeTrack- theChangeTrackobject for this element.
-
hasChangeTrack
public boolean hasChangeTrack()
Description copied from interface:IWithChangeTrackCheck if there is at least a revision for this element.- Specified by:
hasChangeTrackin interfaceIWithChangeTrack- Returns:
trueif there is at least a revision for this element;falseotherwise.
-
setId
public void setId(String id)
Sets the id for this object.- Parameters:
id- the id for this object.
-
getId
public String getId()
Gets the id for this object.- Returns:
- the id for this object.
-
setExtAttributes
public void setExtAttributes(ExtAttributes attributes)
Description copied from interface:IWithExtAttributesSets theExtAttributesobject associated with this object.- Specified by:
setExtAttributesin interfaceIWithExtAttributes- Parameters:
attributes- theExtAttributesobject associated with this object. If null, a newExtAttributesobject is created.
-
getExtAttributes
public ExtAttributes getExtAttributes()
Description copied from interface:IWithExtAttributesGets theExtAttributesobject for the parent object. If none exists, one is created.- Specified by:
getExtAttributesin interfaceIWithExtAttributes- Returns:
- the
ExtAttributesobject for the parent object, never null.
-
hasExtAttribute
public boolean hasExtAttribute()
Description copied from interface:IWithExtAttributesIndicates if at least one extension attribute is present.- Specified by:
hasExtAttributein interfaceIWithExtAttributes- Returns:
- true if at least one extension attribute is present; false otherwise.
-
getExtAttributeValue
public String getExtAttributeValue(String namespaceURI, String localName)
Description copied from interface:IWithExtAttributesGets the value for a given extension attribute.- Specified by:
getExtAttributeValuein interfaceIWithExtAttributes- Parameters:
namespaceURI- the URI of the namespace for the attribute.localName- the name of the attribute.- Returns:
- the value of the extension attribute, or null if it does not exist.
-
-