net.sf.okapi.lib.xliff2.changeTracking

## Class Revision

- java.lang.Object
- - net.sf.okapi.lib.xliff2.core.BaseList<Item>
  - - net.sf.okapi.lib.xliff2.changeTracking.Revision

- All Implemented Interfaces:
    java.lang.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 and Description
    --- | ---
    `static java.lang.String` | `AUTHOR_ATTR_NAME` `author` attribute name.
    `static java.lang.String` | `DATETIME_ATTR_NAME` `datetime` attribute name.
    `static java.lang.String` | `TAG_NAME` The tag element name constant.
    `static java.lang.String` | `VERSION_ATTR_NAME` `version` attribute name.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Revision()` Creates a new `Revision` object.
    `Revision(Revision original)` Copy constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAttributesString()` Gets the attributes string.
    `java.lang.String` | `getAuthor()` Gets the author attribute value.
    `java.lang.String` | `getClosingTag()` Gets the complete `revision` closing tag.
    `java.lang.String` | `getDatetime()` Gets the value of the datetime attribute.
    `ExtAttributes` | `getExtAttributes()` Gets the `ExtAttributes` object for the parent object.
    `java.lang.String` | `getExtAttributeValue(java.lang.String namespaceURI, java.lang.String localName)` Gets the value for a given extension attribute.
    `java.lang.String` | `getOpeningTagName()` Gets the opening `revision` tag name.
    `java.lang.String` | `getVersion()` Gets the value of the version attribute.
    `boolean` | `hasExtAttribute()` Indicates if at least one extension attribute is present.
    `void` | `setAuthor(java.lang.String author)` Sets the value for the author attribute.
    `void` | `setDatetime(java.lang.String datetime)` Sets the value of the datetime attribute.
    `void` | `setExtAttributes(ExtAttributes attributes)` Sets the `ExtAttributes` object associated with this object.
    `void` | `setVersion(java.lang.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`

- - ### Field Detail

    - #### TAG_NAME

          public static final java.lang.String TAG_NAME

      The tag element name constant.
      See Also:
        Constant Field Values

    - #### AUTHOR_ATTR_NAME

          public static final java.lang.String AUTHOR_ATTR_NAME

      `author` attribute name.
      See Also:
        Constant Field Values

    - #### DATETIME_ATTR_NAME

          public static final java.lang.String DATETIME_ATTR_NAME

      `datetime` attribute name.
      See Also:
        Constant Field Values

    - #### VERSION_ATTR_NAME

          public static final java.lang.String VERSION_ATTR_NAME

      `version` attribute name.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Revision

          public Revision()

      Creates a new `Revision` object.

    - #### Revision

          public Revision(Revision original)

      Copy constructor.
      Parameters:
        `original` - the original object to duplicate.

  - ### Method Detail

    - #### getAuthor

          public java.lang.String getAuthor()

      Gets the author attribute value.
      Returns:
        the author attribute value.

    - #### setAuthor

          public void setAuthor(java.lang.String author)

      Sets the value for the author attribute.
      Parameters:
        `author` - the value for the author attribute.

    - #### getDatetime

          public java.lang.String getDatetime()

      Gets the value of the datetime attribute.
      Returns:
        the value of the datetime attribute.

    - #### setDatetime

          public void setDatetime(java.lang.String datetime)

      Sets the value of the datetime attribute.
      Parameters:
        `datetime` - the value of the datetime attribute.

    - #### getVersion

          public java.lang.String getVersion()

      Gets the value of the version attribute.
      Returns:
        the value of the version attribute.

    - #### setVersion

          public void setVersion(java.lang.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: `IWithExtAttributes`
      Gets the `ExtAttributes` object for the parent object. If none exists, one is created.
      Specified by:
        `getExtAttributes` in interface `IWithExtAttributes`
      Returns:
        the `ExtAttributes` object for the parent object, never null.

    - #### setExtAttributes

          public void setExtAttributes(ExtAttributes attributes)

      Description copied from interface: `IWithExtAttributes`
      Sets the `ExtAttributes` object associated with this object.
      Specified by:
        `setExtAttributes` in interface `IWithExtAttributes`
      Parameters:
        `attributes` - the `ExtAttributes` object associated with this object. If null, a new `ExtAttributes` object is created.

    - #### hasExtAttribute

          public boolean hasExtAttribute()

      Description copied from interface: `IWithExtAttributes`
      Indicates if at least one extension attribute is present.
      Specified by:
        `hasExtAttribute` in interface `IWithExtAttributes`
      Returns:
        true if at least one extension attribute is present; false otherwise.

    - #### getExtAttributeValue

          public java.lang.String getExtAttributeValue(java.lang.String namespaceURI,
                                              java.lang.String localName)

      Description copied from interface: `IWithExtAttributes`
      Gets the value for a given extension attribute.
      Specified by:
        `getExtAttributeValue` in interface `IWithExtAttributes`
      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 java.lang.String getAttributesString()

      Gets the attributes string.
      Returns:
        the attributes string.

    - #### getOpeningTagName

          public java.lang.String getOpeningTagName()

      Gets the opening `revision` tag name.
      Returns:
        the opening `revision` tag name.

    - #### getClosingTag

          public java.lang.String getClosingTag()

      Gets the complete `revision` closing tag.
      Returns:
        the complete `revision` closing tag.