Package net.sf.okapi.lib.xliff2.core
Class MidFileData
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.MidFileData
-
- All Implemented Interfaces:
IWithChangeTrack,IWithExtElements,IWithMetadata,IWithNotes,IWithValidation
public class MidFileData extends Object implements IWithNotes, IWithMetadata, IWithValidation, IWithChangeTrack
Implements theIWithExtElementsandIWithNotesinterfaces.
-
-
Constructor Summary
Constructors Constructor Description MidFileData()
-
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.ExtElementsgetExtElements()Gets theExtElementsobject associated with this object.MetadatagetMetadata()Gets theMetadataobject for the parent, creates an empty of if there is none.intgetNoteCount()Gets the number of notes for this object.NotesgetNotes()Gets theNotesobject for this object.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.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.ExtElementssetExtElements(ExtElements elements)Sets theExtElementsobject associated with this object.voidsetMetadata(Metadata metadata)sets theMetadataobject for the parent.voidsetValidation(Validation validation)sets theValidationobject for the parent.
-
-
-
Method Detail
-
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.
-
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.
-
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.
-
-