net.sf.okapi.lib.xliff2.core

## Class StartXliffData

- java.lang.Object
- - net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
  - - net.sf.okapi.lib.xliff2.core.StartXliffData

- All Implemented Interfaces:
    IWithExtAttributes

      public class StartXliffData
      extends DataWithExtAttributes

  Represents the information associated with an <xliff> element.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StartXliffData(java.lang.String version)` Creates a `StartXliffData` object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getSourceLanguage()` Gets the language code of the source for this document.
    `java.lang.String` | `getTargetLanguage()` Gets the target language of the document.
    `java.lang.String` | `getVersion()` Gets the version of this document.
    `void` | `setNamespace(java.lang.String prefix, java.lang.String namespaceURI)` Sets a namespace declaration for this document.
    `void` | `setSourceLanguage(java.lang.String sourceLang)` Sets the source language of the document.
    `void` | `setTargetLanguage(java.lang.String targetLang)` Sets the target language for this document.

    - ### Methods inherited from class net.sf.okapi.lib.xliff2.core.DataWithExtAttributes

      `getExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StartXliffData

          public StartXliffData(java.lang.String version)

      Creates a `StartXliffData` object.
      Parameters:
        `version` - the version of the XLIFF document, use null to get the default.

  - ### Method Detail

    - #### getVersion

          public java.lang.String getVersion()

      Gets the version of this document.
      Returns:
        the version of this document.

    - #### getSourceLanguage

          public java.lang.String getSourceLanguage()

      Gets the language code of the source for this document.
      Returns:
        the language code for the source.

    - #### setSourceLanguage

          public void setSourceLanguage(java.lang.String sourceLang)

      Sets the source language of the document.
      Parameters:
        `sourceLang` - the source language to set (must not be null).
      Throws:
        `InvalidParameterException` - if the language code is invalid.

    - #### getTargetLanguage

          public java.lang.String getTargetLanguage()

      Gets the target language of the document.
      Returns:
        the target language of the document (can be null).

    - #### setTargetLanguage

          public void setTargetLanguage(java.lang.String targetLang)

      Sets the target language for this document.
      Parameters:
        `targetLang` - the target language to set (can be null).
      Throws:
        `InvalidParameterException` - if the language code is invalid.

    - #### setNamespace

          public void setNamespace(java.lang.String prefix,
                          java.lang.String namespaceURI)

      Sets a namespace declaration for this document.
      Parameters:
        `prefix` - the prefix to use for the namespace.
        `namespaceURI` - the namespace URI.