Package com.verisign.epp.codec.registry.v02

## Class EPPRegistryLanguage

- java.lang.Object
- - com.verisign.epp.codec.registry.v02.EPPRegistryLanguage

- All Implemented Interfaces:
    `EPPCodecComponent`, `java.io.Serializable`, `java.lang.Cloneable`

      public class EPPRegistryLanguage
      extends java.lang.Object
      implements EPPCodecComponent

  `EPPRegistryLanguage` defines the supported language codes and character code point policy.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `EPPRegistryLanguage.VariantStrategy` | Possible values for the `variantStrategy` attribute.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` | XML local name for `EPPRegistryLanguage`.
    `static java.lang.String` | `ELM_NAME` | XML root tag for `EPPRegistryLanguage`.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPRegistryLanguage()` | Default constructor for `EPPRegistryLanguage`.
    `EPPRegistryLanguage​(java.lang.String aCode, java.lang.String aTable, EPPRegistryLanguage.VariantStrategy aVariantStrategy)` | `EPPRegistryLanguage` constructor that takes all attributes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `clone()` | Clone `EPPRegistryLanguage`.
    `void` | `decode​(org.w3c.dom.Element aElement)` | Decode the `EPPRegistryLanguage` attributes from the aElement DOM Element tree.
    `org.w3c.dom.Element` | `encode​(org.w3c.dom.Document aDocument)` | Encode a DOM Element tree from the attributes of the `EPPRegistryLanguage` instance.
    `boolean` | `equals​(java.lang.Object aObject)` | implements a deep `EPPRegistryLanguage` compare.
    `java.lang.String` | `getCode()` | Gets the required "code" attribute defines the language code for the supported language.
    `java.lang.String` | `getNamespace()` | Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.lang.String` | `getTable()` | Gets the OPTIONAL language table URI that contains the set of code points for the language.
    `EPPRegistryLanguage.VariantStrategy` | `getVariantStrategy()` | Gets the OPTIONAL strategy for the handling of variants for the language.
    `void` | `setCode​(java.lang.String aCode)` | Sets the required "code" attribute defines the language code for the supported language.
    `void` | `setTable​(java.lang.String aTable)` | Sets the OPTIONAL language table URI that contains the set of code points for the language.
    `void` | `setVariantStrategy​(EPPRegistryLanguage.VariantStrategy aVariantStrategy)` | Sets the OPTIONAL strategy for the handling of variants for the language.
    `java.lang.String` | `toString()` | Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

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

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      XML local name for `EPPRegistryLanguage`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPRegistryLanguage`.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPRegistryLanguage

          public EPPRegistryLanguage()

      Default constructor for `EPPRegistryLanguage`.

    - #### EPPRegistryLanguage

          public EPPRegistryLanguage​(java.lang.String aCode,
                                     java.lang.String aTable,
                                     EPPRegistryLanguage.VariantStrategy aVariantStrategy)

      `EPPRegistryLanguage` constructor that takes all attributes.
      Parameters:
        `aCode` - The required language code that should be a ISO 639 (ISO 639-1 or ISO 639-2) value.
        `aTable` - The OPTIONAL language table URI. Set to `null` if undefined.
        `aVariantStrategy` - The OPTIONAL variant strategy. Set to `null` if undefined.

  - ### Method Detail

    - #### encode

          public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

      Encode a DOM Element tree from the attributes of the `EPPRegistryLanguage` instance.
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Parameters:
        `aDocument` - DOM Document that is being built. Used as an Element factory.
      Returns:
        Element Root DOM Element representing the `EPPRegistryLanguage` instance.
      Throws:
        `EPPEncodeException` - - Unable to encode `EPPRegistryLanguage` instance.

    - #### decode

          public void decode​(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPRegistryLanguage` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPRegistryLanguage` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPRegistryLanguage`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPRegistryLanguage`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### equals

          public boolean equals​(java.lang.Object aObject)

      implements a deep `EPPRegistryLanguage` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPRegistryLanguage` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

    - #### toString

          public java.lang.String toString()

      Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getTable

          public java.lang.String getTable()

      Gets the OPTIONAL language table URI that contains the set of code points for the language.
      Returns:
        The OPTIONAL langauge table URI if defined; `null` otherwise.

    - #### setTable

          public void setTable​(java.lang.String aTable)

      Sets the OPTIONAL language table URI that contains the set of code points for the language.
      Parameters:
        `aTable` - The OPTIONAL langauge table URI

    - #### getVariantStrategy

          public EPPRegistryLanguage.VariantStrategy getVariantStrategy()

      Gets the OPTIONAL strategy for the handling of variants for the language. If no <registry:variantStrategy> element is specified then variants are not supported by the language.
      Returns:
        The OPTIONAL variant strategy if defined; `null` otherwise.

    - #### setVariantStrategy

          public void setVariantStrategy​(EPPRegistryLanguage.VariantStrategy aVariantStrategy)

      Sets the OPTIONAL strategy for the handling of variants for the language. If no <registry:variantStrategy> element is specified then variants are not supported by the language.
      Parameters:
        `aVariantStrategy` - The OPTIONAL variant strategy

    - #### getCode

          public java.lang.String getCode()

      Gets the required "code" attribute defines the language code for the supported language. The language code SHOULD be an ISO 639 (ISO 639-1 or ISO 639-2) value.
      Returns:
        The language code if defined; `null` otherwise.

    - #### setCode

          public void setCode​(java.lang.String aCode)

      Sets the required "code" attribute defines the language code for the supported language. The language code SHOULD be an ISO 639 (ISO 639-1 or ISO 639-2) value.
      Parameters:
        `aCode` - The language code

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.