com.verisign.epp.codec.mark

## Class EPPMark

- java.lang.Object
- - com.verisign.epp.codec.mark.EPPMark

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

      public class EPPMark
      extends java.lang.Object
      implements EPPCodecComponent

  Class for a Mark that can contain a list of trademarks, treaty or statutes, and courts. The Mark includes a set of attributes that are used to verify the eligibility for the registration of a domain name.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` Constant for the mark local name
    `static java.lang.String` | `ELM_NAME` Constant for the mark tag
    `static java.lang.String` | `NS` Namespace URI associated with EPPLaunchExtFactory.
    `static java.lang.String` | `NS_PREFIX` Namespace prefix associated with EPPLaunchExtFactory.
    `static java.lang.String` | `NS_SCHEMA` XML Schema definition for EPPLaunchExtFactory

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPMark()` Create an `EPPMark` instance.
    `EPPMark(java.util.List<EPPTrademark> aTrademarks, java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes, java.util.List<EPPCourt> aCourts)` Create an `EPPMark` instance with each of the supported lists including trademarks, treaty and statutes, and courts.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCourt(EPPCourt aCourt)` Adds a court to the list of courts.
    `void` | `addTrademark(EPPTrademark aTrademark)` Adds a trademark to the list of trademarks.
    `void` | `addTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)` Adds a treaty or statute to the list of treaty or statutes.
    `java.lang.Object` | `clone()` Clone `EPPMark`.
    `void` | `decode(byte[] aMarkArray)` Decode the `EPPMark` attributes from the input `byte[]`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPMark` component
    `byte[]` | `encode()` Encode the mark to a `byte[]`.
    `org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` Sets all this instance's data in the given XML document
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPMark` compare.
    `java.util.List<EPPCourt>` | `getCourts()` Gets the list of courts.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.util.List<EPPTrademark>` | `getTrademarks()` Gets the list of trademarks.
    `java.util.List<EPPTreatyOrStatute>` | `getTreatyOrStatutes()` Gets the list of treaty or statutes.
    `boolean` | `hasCourts()` Are courts defined?
    `boolean` | `hasTrademarks()` Are trademarks defined?
    `boolean` | `hasTreatyOrStatutes()` Are treaty or statutes defined?
    `void` | `setCourts(java.util.List<EPPCourt> aCourts)` Sets the list of courts.
    `void` | `setTrademarks(java.util.List<EPPTrademark> aTrademarks)` Sets the list of trademarks.
    `void` | `setTreatyOrStatutes(java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes)` Sets the list of treaty or statutes.
    `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

    - #### NS

          public static final java.lang.String NS

      Namespace URI associated with EPPLaunchExtFactory.
      See Also:
        Constant Field Values

    - #### NS_PREFIX

          public static final java.lang.String NS_PREFIX

      Namespace prefix associated with EPPLaunchExtFactory.
      See Also:
        Constant Field Values

    - #### NS_SCHEMA

          public static final java.lang.String NS_SCHEMA

      XML Schema definition for EPPLaunchExtFactory
      See Also:
        Constant Field Values

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      Constant for the mark local name
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      Constant for the mark tag
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPMark

          public EPPMark()

      Create an `EPPMark` instance. Use the setter methods to set the attributes of the instance.

    - #### EPPMark

          public EPPMark(java.util.List<EPPTrademark> aTrademarks,
                         java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes,
                         java.util.List<EPPCourt> aCourts)

      Create an `EPPMark` instance with each of the supported lists including trademarks, treaty and statutes, and courts.
      Parameters:
        `aTrademarks` - List of trademarks if defined; `null` otherwise.
        `aTreatyOrStatutes` - List of treaty or statutes if defined; `null` otherwise.
        `aCourts` - List of courts if defined; `null` otherwise.

  - ### Method Detail

    - #### clone

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

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

    - #### encode

          public byte[] encode()
                        throws EPPEncodeException

      Encode the mark to a `byte[]`.
      Returns:
        Encoded mark
      Throws:
        `EPPEncodeException` - Error encoding the mark

    - #### encode

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

      Sets all this instance's data in the given XML document
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Parameters:
        `aDocument` - a DOM Document to attach data to.
      Returns:
        The root element of this component.
      Throws:
        `EPPEncodeException` - Thrown if any errors prevent encoding.

    - #### decode

          public void decode(byte[] aMarkArray)
                      throws EPPDecodeException

      Decode the `EPPMark` attributes from the input `byte[]`.
      Parameters:
        `aMarkArray` - `byte[]` to decode the attribute values
      Throws:
        `EPPDecodeException` - Error decoding the `byte[]`.

    - #### decode

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

      Decode the `EPPMark` component
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root element of the `EPPMark`
      Throws:
        `EPPDecodeException` - Error decoding the `EPPMark`

    - #### equals

          public boolean equals(java.lang.Object aObject)

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

    - #### hasTrademarks

          public boolean hasTrademarks()

      Are trademarks defined?
      Returns:
        `true` if trademarks are defined; `false` otherwise.

    - #### getTrademarks

          public java.util.List<EPPTrademark> getTrademarks()

      Gets the list of trademarks.
      Returns:
        List of trademarks if set; `null` otherwise.

    - #### setTrademarks

          public void setTrademarks(java.util.List<EPPTrademark> aTrademarks)

      Sets the list of trademarks.
      Parameters:
        `aTrademarks` - List of trademarks

    - #### addTrademark

          public void addTrademark(EPPTrademark aTrademark)

      Adds a trademark to the list of trademarks.
      Parameters:
        `aTrademark` - Trademark to add to the list of trademarks.

    - #### hasTreatyOrStatutes

          public boolean hasTreatyOrStatutes()

      Are treaty or statutes defined?
      Returns:
        `true` if treaty or statutes are defined; `false` otherwise.

    - #### getTreatyOrStatutes

          public java.util.List<EPPTreatyOrStatute> getTreatyOrStatutes()

      Gets the list of treaty or statutes.
      Returns:
        List of treaty or statutes if set; `null` otherwise.

    - #### setTreatyOrStatutes

          public void setTreatyOrStatutes(java.util.List<EPPTreatyOrStatute> aTreatyOrStatutes)

      Sets the list of treaty or statutes.
      Parameters:
        `aTreatyOrStatutes` - List of trademarks

    - #### addTreatyOrStatute

          public void addTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)

      Adds a treaty or statute to the list of treaty or statutes.
      Parameters:
        `aTreatyOrStatute` - Treaty or statute to add to the list of treaty or statutes.

    - #### hasCourts

          public boolean hasCourts()

      Are courts defined?
      Returns:
        `true` if courts are defined; `false` otherwise.

    - #### getCourts

          public java.util.List<EPPCourt> getCourts()

      Gets the list of courts.
      Returns:
        List of courts if set; `null` otherwise.

    - #### setCourts

          public void setCourts(java.util.List<EPPCourt> aCourts)

      Sets the list of courts.
      Parameters:
        `aCourts` - List of courts

    - #### addCourt

          public void addCourt(EPPCourt aCourt)

      Adds a court to the list of courts.
      Parameters:
        `aCourt` - Court to add to the list of courts.

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

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