Class EPPRegistryLanguage

java.lang.Object
com.verisign.epp.codec.registry.v02.EPPRegistryLanguage
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPRegistryLanguage extends Object implements EPPCodecComponent
EPPRegistryLanguage defines the supported language codes and character code point policy.
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryLanguage

      public EPPRegistryLanguage()
      Default constructor for EPPRegistryLanguage.
    • EPPRegistryLanguage

      public EPPRegistryLanguage(String aCode, 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 Details

    • encode

      public Element encode(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(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 Object clone() throws CloneNotSupportedException
      Clone EPPRegistryLanguage.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPRegistryLanguage
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPRegistryLanguage compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRegistryLanguage instance to compare with
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getTable

      public 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(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 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(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 String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.