Class EPPTreatyOrStatute

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

    public class EPPTreatyOrStatute
    extends java.lang.Object
    implements EPPCodecComponent
    Class for a Treaty or Statute that can be included in the list of treaty or statutes contained in the EPPMark.
    See Also:
    EPPMark, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_LOCALNAME
      Constant for the treaty or statute local name
      static java.lang.String ELM_NAME
      Constant for the treaty or statute tag
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPTreatyOrStatute()
      Create an EPPTreatyOrStatute instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addContact​(EPPMarkContact aContact)
      Adds a contact to the list of contacts of the treaty or statute.
      void addHolder​(EPPMarkContact aHolder)
      Adds a holder to the list of holders of the treaty or statute.
      void addLabel​(java.lang.String aLabel)
      Adds a domain name label to the domain name labels that corresponds to the treaty or statute.
      void addProtection​(EPPProtection aProtection)
      Adds a protection to the list of protections of the treaty or statute.
      java.lang.Object clone()
      Clone EPPTreatyOrStatute.
      void decode​(byte[] aMarkArray)
      Decode the EPPTreatyOrStatute attributes from the input byte[].
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPTreatyOrStatute component
      byte[] encode()
      Encode the treaty or statute 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 EPPTreatyOrStatute compare.
      java.util.List<EPPMarkContact> getContacts()
      Gets contacts of the treaty or statute.
      java.util.Date getExecDate()
      Gets the execution date of the treaty or statute.
      java.lang.String getGoodsAndServices()
      Gets full description of the goods and services mentioned in the treaty or statute registration document.
      java.util.List<EPPMarkContact> getHolders()
      Gets holders of the treaty or statute.
      java.lang.String getId()
      Gets the identifier for the treaty or statute.
      java.util.List<java.lang.String> getLabels()
      Gets the domain name labels that corresponds to the treaty or statute.
      java.lang.String getName()
      Gets the registered treaty or statute text string.
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      java.util.Date getProDate()
      Gets the date of protection of the mark.
      java.util.List<EPPProtection> getProtections()
      Gets protections of the treaty or statute.
      java.lang.String getRefNum()
      Gets the reference number of the mark of the treaty or statute.
      java.lang.String getTitle()
      Gets the title of the treaty or statute.
      void setContacts​(java.util.List<EPPMarkContact> aContacts)
      Sets contacts of the treaty or statute.
      void setExecDate​(java.util.Date aExecDate)
      Sets the execution date of the treaty or statute.
      void setGoodsAndServices​(java.lang.String aGoodsAndServices)
      Sets full description of the goods and services mentioned in the treaty or statute registration document.
      void setHolders​(java.util.List<EPPMarkContact> aHolders)
      Sets holders of the treaty or statute.
      void setId​(java.lang.String aId)
      Sets the identifier for the treaty or statute.
      void setLabels​(java.util.List<java.lang.String> aLabels)
      Sets the domain name labels that corresponds to the treaty or statute.
      void setName​(java.lang.String aName)
      Sets the registered treaty or statute text string.
      void setProDate​(java.util.Date aProDate)
      Sets the date of protection of the mark.
      void setProtections​(java.util.List<EPPProtection> aProtections)
      Sets protections of the treaty or statute.
      void setRefNum​(java.lang.String aRefNum)
      Sets the reference number of the mark of the treaty or statute.
      void setTitle​(java.lang.String aTitle)
      Sets the title of the treaty or statute.
      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
        Constant for the treaty or statute local name
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        Constant for the treaty or statute tag
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPTreatyOrStatute

        public EPPTreatyOrStatute()
        Create an EPPTreatyOrStatute instance. Use the setter methods to set the attributes of the instance.
    • Method Detail

      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone EPPTreatyOrStatute.
        Specified by:
        clone in interface EPPCodecComponent
        Overrides:
        clone in class java.lang.Object
        Returns:
        clone of EPPTreatyOrStatute
        Throws:
        java.lang.CloneNotSupportedException - standard Object.clone exception
      • encode

        public byte[] encode()
                      throws EPPEncodeException
        Encode the treaty or statute to a byte[].
        Returns:
        Encoded treaty or statute
        Throws:
        EPPEncodeException - Error encoding the treaty or statute
      • 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 EPPTreatyOrStatute 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 EPPTreatyOrStatute component
        Specified by:
        decode in interface EPPCodecComponent
        Parameters:
        aElement - Root element of the EPPTreatyOrStatute
        Throws:
        EPPDecodeException - Error decoding the EPPTreatyOrStatute
      • equals

        public boolean equals​(java.lang.Object aObject)
        implements a deep EPPTreatyOrStatute compare.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - EPPTreatyOrStatute instance to compare with
        Returns:
        true if equal false otherwise
      • getId

        public java.lang.String getId()
        Gets the identifier for the treaty or statute.
        Returns:
        The identifier for the treaty or statute if set; null otherwise.
      • setId

        public void setId​(java.lang.String aId)
        Sets the identifier for the treaty or statute.
        Parameters:
        aId - Identifier for the treaty or statute
      • getName

        public java.lang.String getName()
        Gets the registered treaty or statute text string.
        Returns:
        The registered treaty or statute text string if set; null otherwise.
      • setName

        public void setName​(java.lang.String aName)
        Sets the registered treaty or statute text string.
        Parameters:
        aName - the registered treaty or statute text string
      • getHolders

        public java.util.List<EPPMarkContact> getHolders()
        Gets holders of the treaty or statute.
        Returns:
        the holders of the treaty or statute if set; Empty List otherwise.
      • setHolders

        public void setHolders​(java.util.List<EPPMarkContact> aHolders)
        Sets holders of the treaty or statute.
        Parameters:
        aHolders - the holders of the treaty or statute
      • addHolder

        public void addHolder​(EPPMarkContact aHolder)
        Adds a holder to the list of holders of the treaty or statute.
        Parameters:
        aHolder - Holder to add to list of holders of the treaty or statute.
      • getContacts

        public java.util.List<EPPMarkContact> getContacts()
        Gets contacts of the treaty or statute.
        Returns:
        the contacts of the treaty or statute if set; Empty List otherwise.
      • setContacts

        public void setContacts​(java.util.List<EPPMarkContact> aContacts)
        Sets contacts of the treaty or statute.
        Parameters:
        aContacts - the contacts of the treaty or statute
      • addContact

        public void addContact​(EPPMarkContact aContact)
        Adds a contact to the list of contacts of the treaty or statute.
        Parameters:
        aContact - Contact to add to list of contacts of the treaty or statute.
      • getProtections

        public java.util.List<EPPProtection> getProtections()
        Gets protections of the treaty or statute.
        Returns:
        the protections of the treaty or statute if set; Empty List otherwise.
      • setProtections

        public void setProtections​(java.util.List<EPPProtection> aProtections)
        Sets protections of the treaty or statute.
        Parameters:
        aProtections - the protections of the treaty or statute
      • addProtection

        public void addProtection​(EPPProtection aProtection)
        Adds a protection to the list of protections of the treaty or statute.
        Parameters:
        aProtection - Protection to add to list of protections of the treaty or statute.
      • getLabels

        public java.util.List<java.lang.String> getLabels()
        Gets the domain name labels that corresponds to the treaty or statute.
        Returns:
        the domain name labels that corresponds to the treaty or statute if set; Empty List otherwise.
      • setLabels

        public void setLabels​(java.util.List<java.lang.String> aLabels)
        Sets the domain name labels that corresponds to the treaty or statute.
        Parameters:
        aLabels - the domain name labels that corresponds to the treaty or statute
      • addLabel

        public void addLabel​(java.lang.String aLabel)
        Adds a domain name label to the domain name labels that corresponds to the treaty or statute.
        Parameters:
        aLabel - Domain name label to add.
      • getGoodsAndServices

        public java.lang.String getGoodsAndServices()
        Gets full description of the goods and services mentioned in the treaty or statute registration document.
        Returns:
        The goods and services if set; null otherwise.
      • setGoodsAndServices

        public void setGoodsAndServices​(java.lang.String aGoodsAndServices)
        Sets full description of the goods and services mentioned in the treaty or statute registration document.
        Parameters:
        aGoodsAndServices - The goods and services
      • getRefNum

        public java.lang.String getRefNum()
        Gets the reference number of the mark of the treaty or statute.
        Returns:
        Reference number of the mark of the treaty or statute if defined; null otherwise.
      • setRefNum

        public void setRefNum​(java.lang.String aRefNum)
        Sets the reference number of the mark of the treaty or statute.
        Parameters:
        aRefNum - Reference number of the mark of the treaty or statute.
      • getProDate

        public java.util.Date getProDate()
        Gets the date of protection of the mark.
        Returns:
        The date of protection of the mark if defined; null otherwise.
      • setProDate

        public void setProDate​(java.util.Date aProDate)
        Sets the date of protection of the mark.
        Parameters:
        aProDate - The date of protection of the mark.
      • getTitle

        public java.lang.String getTitle()
        Gets the title of the treaty or statute.
        Returns:
        The title of the treaty or statute.
      • setTitle

        public void setTitle​(java.lang.String aTitle)
        Sets the title of the treaty or statute.
        Parameters:
        aTitle - The title of the treaty or statute.
      • getExecDate

        public java.util.Date getExecDate()
        Gets the execution date of the treaty or statute.
        Returns:
        The execution date of the treaty or statute if set; null otherwise.
      • setExecDate

        public void setExecDate​(java.util.Date aExecDate)
        Sets the execution date of the treaty or statute.
        Parameters:
        aExecDate - The execution date of the treaty or statute
      • 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.