Class EPPProtection

java.lang.Object
com.verisign.epp.codec.mark.EPPProtection
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPProtection extends Object implements EPPCodecComponent
Class that contains the countries and region of the country where the mark is protected and the OPTIONAL ruling, in case of statute protected marks, to identify the country where the statute was enacted. A list of EPPProtection instances is contained in a EPPTreatyOrStatute.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant for the local name
    static final String
    Constant for the tag name
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for EPPProtection.
    EPPProtection(String aCC, String aRegion)
    Constructor that takes all of the EPPProtection required attributes.
    EPPProtection(String aCC, String aRegion, String aRuling)
    Constructor that takes all of the EPPProtection attributes with a single ruling country.
    EPPProtection(String aCC, String aRegion, List<String> aRulings)
    Constructor that takes all of the EPPProtection attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRuling(String aRuling)
    Adds a country for to the list of countries for the ruling.
    Clone EPPProtection.
    void
    decode(Element aElement)
    Decode the EPPMark component
    encode(Document aDocument)
    Sets all this instance's data in the given XML document
    boolean
    equals(Object aObject)
    implements a deep EPPProtection compare.
    Gets two-character code of the country in which the mark is protected from [ISO3166-2].
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the name of the city, state, province or other geographic region in which the mark is protected.
    Gets the list of two-character country codes of the countries of the ruling.
    void
    Sets two-character code of the country in which the mark is protected.
    void
    setRegion(String aRegion)
    Sets the name of the city, state, province or other geographic region in which the mark is protected.
    void
    setRulings(List<String> aRulings)
    Sets the list of two-character country codes of the countries of the ruling.
    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 Details

  • Constructor Details

    • EPPProtection

      public EPPProtection()
      Default constructor for EPPProtection.
    • EPPProtection

      public EPPProtection(String aCC, String aRegion)
      Constructor that takes all of the EPPProtection required attributes.
      Parameters:
      aCC - Two-character code of the country in which the mark is protected.
      aRegion - Name of the city, state, province or other geographic region in which the mark is protected.
    • EPPProtection

      public EPPProtection(String aCC, String aRegion, String aRuling)
      Constructor that takes all of the EPPProtection attributes with a single ruling country.
      Parameters:
      aCC - Two-character code of the country in which the mark is protected.
      aRegion - Name of the city, state, province or other geographic region in which the mark is protected.
      aRuling - Identify the country where the statute was enacted
    • EPPProtection

      public EPPProtection(String aCC, String aRegion, List<String> aRulings)
      Constructor that takes all of the EPPProtection attributes.
      Parameters:
      aCC - Two-character code of the country in which the mark is protected.
      aRegion - Name of the city, state, province or other geographic region in which the mark is protected.
      aRulings - List of two-character code of countries of the ruling.
  • Method Details

    • clone

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

      public Element encode(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(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(Object aObject)
      implements a deep EPPProtection compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPProtection instance to compare with
      Returns:
      true if equal false otherwise
    • getCc

      public String getCc()
      Gets two-character code of the country in which the mark is protected from [ISO3166-2].
      Returns:
      Two-character code of the country in which the mark is protected if set; null otherwise.
    • setCc

      public void setCc(String aCc)
      Sets two-character code of the country in which the mark is protected. This is a two-character code from [ISO3166-2].
      Parameters:
      aCc - Two-character code of the country in which the mark is protected from [ISO3166-2].
    • getRegion

      public String getRegion()
      Gets the name of the city, state, province or other geographic region in which the mark is protected.
      Returns:
      the name of the city, state, province or other geographic region in which the mark is protected if set; null otherwise.
    • setRegion

      public void setRegion(String aRegion)
      Sets the name of the city, state, province or other geographic region in which the mark is protected.
      Parameters:
      aRegion - Name of the city, state, province or other geographic region in which the mark is protected.
    • getRulings

      public List<String> getRulings()
      Gets the list of two-character country codes of the countries of the ruling.
      Returns:
      The countries of the rulings if set; Empty List otherwise.
    • setRulings

      public void setRulings(List<String> aRulings)
      Sets the list of two-character country codes of the countries of the ruling.
      Parameters:
      aRulings - The countries of the ruling
    • addRuling

      public void addRuling(String aRuling)
      Adds a country for to the list of countries for the ruling.
      Parameters:
      aRuling - Two-character code of the countries of the ruling. This is a two-character code from [ISO3166-2].
    • 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.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.