Class Revision
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.BaseList<Item>
-
- net.sf.okapi.lib.xliff2.changeTracking.Revision
-
- All Implemented Interfaces:
Iterable<Item>,IWithExtAttributes
public class Revision extends BaseList<Item> implements IWithExtAttributes
Represents the<revision>element of the Chan g e Tracking module.- Author:
- Marta Borriello
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTHOR_ATTR_NAMEauthorattribute name.static StringDATETIME_ATTR_NAMEdatetimeattribute name.static StringTAG_NAMEThe tag element name constant.static StringVERSION_ATTR_NAMEversionattribute name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttributesString()Gets the attributes string.StringgetAuthor()Gets the author attribute value.StringgetClosingTag()Gets the completerevisionclosing tag.StringgetDatetime()Gets the value of the datetime attribute.ExtAttributesgetExtAttributes()Gets theExtAttributesobject for the parent object.StringgetExtAttributeValue(String namespaceURI, String localName)Gets the value for a given extension attribute.StringgetOpeningTagName()Gets the openingrevisiontag name.StringgetVersion()Gets the value of the version attribute.booleanhasExtAttribute()Indicates if at least one extension attribute is present.voidsetAuthor(String author)Sets the value for the author attribute.voidsetDatetime(String datetime)Sets the value of the datetime attribute.voidsetExtAttributes(ExtAttributes attributes)Sets theExtAttributesobject associated with this object.voidsetVersion(String version)Sets the value of the version attribute.-
Methods inherited from class net.sf.okapi.lib.xliff2.core.BaseList
add, clear, get, isEmpty, iterator, remove, remove, set, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
TAG_NAME
public static final String TAG_NAME
The tag element name constant.- See Also:
- Constant Field Values
-
AUTHOR_ATTR_NAME
public static final String AUTHOR_ATTR_NAME
authorattribute name.- See Also:
- Constant Field Values
-
DATETIME_ATTR_NAME
public static final String DATETIME_ATTR_NAME
datetimeattribute name.- See Also:
- Constant Field Values
-
VERSION_ATTR_NAME
public static final String VERSION_ATTR_NAME
versionattribute name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthor
public String getAuthor()
Gets the author attribute value.- Returns:
- the author attribute value.
-
setAuthor
public void setAuthor(String author)
Sets the value for the author attribute.- Parameters:
author- the value for the author attribute.
-
getDatetime
public String getDatetime()
Gets the value of the datetime attribute.- Returns:
- the value of the datetime attribute.
-
setDatetime
public void setDatetime(String datetime)
Sets the value of the datetime attribute.- Parameters:
datetime- the value of the datetime attribute.
-
getVersion
public String getVersion()
Gets the value of the version attribute.- Returns:
- the value of the version attribute.
-
setVersion
public void setVersion(String version)
Sets the value of the version attribute.- Parameters:
version- the value of the version attribute.
-
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.
-
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.
-
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.
-
getAttributesString
public String getAttributesString()
Gets the attributes string.- Returns:
- the attributes string.
-
getOpeningTagName
public String getOpeningTagName()
Gets the openingrevisiontag name.- Returns:
- the opening
revisiontag name.
-
getClosingTag
public String getClosingTag()
Gets the completerevisionclosing tag.- Returns:
- the complete
revisionclosing tag.
-
-