com.verisign.epp.codec.registry.v01

## Class EPPRegistryServices.EPPRegistryURI

- java.lang.Object
- - com.verisign.epp.codec.registry.v01.EPPRegistryServices.EPPRegistryURI

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    EPPRegistryServices.EPPRegistryObjURI, EPPRegistryServicesExt.EPPRegistryExtURI
  Enclosing class:
    EPPRegistryServices

      public abstract static class EPPRegistryServices.EPPRegistryURI
      extends java.lang.Object
      implements EPPCodecComponent

  Abstract class that represents an object or extension URI.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTR_REQUIRED` XML "required" attribute
    `static java.lang.String` | `ELM_EXT_URI` XML element used for an extension URI.
    `static java.lang.String` | `ELM_EXT_URI_LOCALNAME` XML local name for extension URI.
    `static java.lang.String` | `ELM_OBJ_URI` XML element used for an object URI.
    `static java.lang.String` | `ELM_OBJ_URI_LOCALNAME` XML local name for object URI.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryURI()` Default constructor.
    `EPPRegistryURI(java.lang.String aUri, java.lang.Boolean aRequired)` Constructor that takes the two required attributes for the URI and the required attribute.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPRegistryURI`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPRegistryURI` 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 `EPPRegistryURI` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPRegistryURI` compare.
    `java.lang.Boolean` | `getRequired()` Gets the "required" attribute value.
    `abstract java.lang.String` | `getRootName()` Gets the name of the root XML element.
    `java.lang.String` | `getUri()` Gets the object or extension URI.
    `void` | `setRequired(java.lang.Boolean aRequired)` Sets the "required" attribute value.
    `void` | `setUri(java.lang.String aUri)` Sets the object or extension URI.
    `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`

    - ### Methods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent

      `getNamespace`

- - ### Field Detail

    - #### ELM_OBJ_URI_LOCALNAME

          public static final java.lang.String ELM_OBJ_URI_LOCALNAME

      XML local name for object URI.
      See Also:
        Constant Field Values

    - #### ELM_OBJ_URI

          public static final java.lang.String ELM_OBJ_URI

      XML element used for an object URI.
      See Also:
        Constant Field Values

    - #### ELM_EXT_URI_LOCALNAME

          public static final java.lang.String ELM_EXT_URI_LOCALNAME

      XML local name for extension URI.
      See Also:
        Constant Field Values

    - #### ELM_EXT_URI

          public static final java.lang.String ELM_EXT_URI

      XML element used for an extension URI.
      See Also:
        Constant Field Values

    - #### ATTR_REQUIRED

          public static final java.lang.String ATTR_REQUIRED

      XML "required" attribute
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPRegistryURI

          public EPPRegistryURI()

      Default constructor. The "required" attribute must be set and the URI must be set prior to calling `encode(Document)`.

    - #### EPPRegistryURI

          public EPPRegistryURI(java.lang.String aUri,
                                java.lang.Boolean aRequired)

      Constructor that takes the two required attributes for the URI and the required attribute.
      Parameters:
        `aUri` - The object or extension URI
        `aRequired` - `true` if the use of the object or extension URI is required; `false` otherwise.

  - ### Method Detail

    - #### getRootName

          public abstract java.lang.String getRootName()

      Gets the name of the root XML element.
      Returns:
        `ELM_OBJ_URI` for an object URI and `ELM_EXT_URI` for an extension URI.

    - #### encode

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

      Encode a DOM Element tree from the attributes of the `EPPRegistryURI` 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 `EPPRegistryURI` instance.
      Throws:
        `EPPEncodeException` - - Unable to encode `EPPRegistryURI` instance.

    - #### decode

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

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

    - #### clone

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

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

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPRegistryURI` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPRegistryURI` 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.

    - #### getRequired

          public java.lang.Boolean getRequired()

      Gets the "required" attribute value.
      Returns:
        `true` if use of the URI is required; `false` otherwise. `null` if the attribute has not been set.

    - #### setRequired

          public void setRequired(java.lang.Boolean aRequired)

      Sets the "required" attribute value.
      Parameters:
        `aRequired` - `true` if use of the URI is required; `false` otherwise.

    - #### getUri

          public java.lang.String getUri()

      Gets the object or extension URI.
      Returns:
        Object or extension URI if defined; `null` otherwise.

    - #### setUri

          public void setUri(java.lang.String aUri)

      Sets the object or extension URI.
      Parameters:
        `aUri` - Object or extension URI value.