com.verisign.epp.codec.registry

## Class EPPRegistryRegex

- java.lang.Object
- - com.verisign.epp.codec.registry.EPPRegistryRegex

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

      public class EPPRegistryRegex
      extends java.lang.Object
      implements EPPCodecComponent

  `EPPRegistryRegex` represents a general regular expression that includes both the expression and an optional explanation. Since this is a generic regular expression `EPPCodecComponent`, used by multiple parent `EPPCodecComponent`'s, the root element must be set using the `setRootName(String)`.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTR_LANG` Language attribute of the explanation element.
    `static java.lang.String` | `ELM_EXPLANATION` Regular expression optional explanation element label.
    `static java.lang.String` | `ELM_EXPRESSION` Regular expression element label.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryRegex()` Default constructor for `EPPRegistryRegex`.
    `EPPRegistryRegex(java.lang.String aExpression)` Constructor that takes the required regular expression value.
    `EPPRegistryRegex(java.lang.String aExpression, java.lang.String aExplanation)` Constructor that takes the required regular expression value along with the optional explanation.
    `EPPRegistryRegex(java.lang.String aExpression, java.lang.String aExplanation, java.lang.String aLang)` Constructor that takes the required regular expression value along with the optional explanation and the language of the explanation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPRegistryRegex`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPRegistryRegex` 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 `EPPRegistryRegex` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPRegistryRegex` compare.
    `java.lang.String` | `getExplanation()` Gets the explanation of the regular expression.
    `java.lang.String` | `getExpression()` Gets the regular expression value.
    `java.lang.String` | `getLang()` Gets the language of the explanation.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `void` | `setExplanation(java.lang.String aExplanation)` Sets the explanation of the regular expression.
    `void` | `setExpression(java.lang.String aExpression)` Sets the regular expression value.
    `void` | `setLang(java.lang.String aLang)` Sets the language of the explanation.
    `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_EXPRESSION

          public static final java.lang.String ELM_EXPRESSION

      Regular expression element label.
      See Also:
        Constant Field Values

    - #### ELM_EXPLANATION

          public static final java.lang.String ELM_EXPLANATION

      Regular expression optional explanation element label.
      See Also:
        Constant Field Values

    - #### ATTR_LANG

          public static final java.lang.String ATTR_LANG

      Language attribute of the explanation element.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPRegistryRegex

          public EPPRegistryRegex()

      Default constructor for `EPPRegistryRegex`.

    - #### EPPRegistryRegex

          public EPPRegistryRegex(java.lang.String aExpression)

      Constructor that takes the required regular expression value.
      Parameters:
        `aExpression` - Regular expression value.

    - #### EPPRegistryRegex

          public EPPRegistryRegex(java.lang.String aExpression,
                                  java.lang.String aExplanation)

      Constructor that takes the required regular expression value along with the optional explanation.
      Parameters:
        `aExpression` - Regular expression value.
        `aExplanation` - Explanation of the regular expression.

    - #### EPPRegistryRegex

          public EPPRegistryRegex(java.lang.String aExpression,
                                  java.lang.String aExplanation,
                                  java.lang.String aLang)

      Constructor that takes the required regular expression value along with the optional explanation and the language of the explanation.
      Parameters:
        `aExpression` - Regular expression value.
        `aExplanation` - Explanation of the regular expression.
        `aLang` - Language of the explanation.

  - ### 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 `EPPRegistryRegex` 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 `EPPRegistryRegex` instance.
      Throws:
        `EPPEncodeException` - Unable to encode `EPPRegistryRegex` instance.

    - #### decode

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

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

    - #### 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.

    - #### clone

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

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

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPRegistryRegex` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPRegistryRegex` instance to compare with
      Returns:
        true if equal false otherwise

    - #### getExpression

          public java.lang.String getExpression()

      Gets the regular expression value.
      Returns:
        Regular expression value if defined; `null` otherwise.

    - #### setExpression

          public void setExpression(java.lang.String aExpression)

      Sets the regular expression value.
      Parameters:
        `aExpression` - Regular expression value.

    - #### getExplanation

          public java.lang.String getExplanation()

      Gets the explanation of the regular expression.
      Returns:
        Regular expression explanation if defined; `null` otherwise.

    - #### setExplanation

          public void setExplanation(java.lang.String aExplanation)

      Sets the explanation of the regular expression.
      Parameters:
        `aExplanation` - Regular expression explanation.

    - #### getLang

          public java.lang.String getLang()

      Gets the language of the explanation.
      Returns:
        Language of the explanation if defined; `null` otherwise.

    - #### setLang

          public void setLang(java.lang.String aLang)

      Sets the language of the explanation.
      Parameters:
        `aLang` - Language of the explanation.

    - #### 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`.