public class EPPProtection extends java.lang.Object implements EPPCodecComponent
EPPProtection instances is contained in a
EPPTreatyOrStatute.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELM_LOCALNAME
Constant for the local name
|
static java.lang.String |
ELM_NAME
Constant for the tag name
|
| Constructor and Description |
|---|
EPPProtection()
Default constructor for
EPPProtection. |
EPPProtection(java.lang.String aCC,
java.lang.String aRegion)
Constructor that takes all of the
EPPProtection required
attributes. |
EPPProtection(java.lang.String aCC,
java.lang.String aRegion,
java.util.List<java.lang.String> aRulings)
Constructor that takes all of the
EPPProtection attributes. |
EPPProtection(java.lang.String aCC,
java.lang.String aRegion,
java.lang.String aRuling)
Constructor that takes all of the
EPPProtection attributes with
a single ruling country. |
| Modifier and Type | Method and Description |
|---|---|
void |
addRuling(java.lang.String aRuling)
Adds a country for to the list of countries for the ruling.
|
java.lang.Object |
clone()
Clone
EPPProtection. |
void |
decode(org.w3c.dom.Element aElement)
Decode the
EPPMark component |
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
EPPProtection compare. |
java.lang.String |
getCc()
Gets two-character code of the country in which the mark is protected
from [ISO3166-2].
|
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent. |
java.lang.String |
getRegion()
Gets the name of the city, state, province or other geographic region in
which the mark is protected.
|
java.util.List<java.lang.String> |
getRulings()
Gets the list of two-character country codes of the countries of the ruling.
|
void |
setCc(java.lang.String aCc)
Sets two-character code of the country in which the mark is protected.
|
void |
setRegion(java.lang.String aRegion)
Sets the name of the city, state, province or other geographic region in
which the mark is protected.
|
void |
setRulings(java.util.List<java.lang.String> aRulings)
Sets the list of two-character country codes of the countries of the ruling.
|
java.lang.String |
toString()
Implementation of
Object.toString, which will result in an
indented XML String representation of the concrete
EPPCodecComponent. |
public static final java.lang.String ELM_LOCALNAME
public static final java.lang.String ELM_NAME
public EPPProtection()
EPPProtection.public EPPProtection(java.lang.String aCC,
java.lang.String aRegion)
EPPProtection required
attributes.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.public EPPProtection(java.lang.String aCC,
java.lang.String aRegion,
java.lang.String aRuling)
EPPProtection attributes with
a single ruling country.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 enactedpublic EPPProtection(java.lang.String aCC,
java.lang.String aRegion,
java.util.List<java.lang.String> aRulings)
EPPProtection attributes.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.public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
EPPProtection.clone in interface EPPCodecComponentclone in class java.lang.ObjectEPPProtectionjava.lang.CloneNotSupportedException - standard Object.clone exceptionpublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
throws EPPEncodeException
encode in interface EPPCodecComponentaDocument - a DOM Document to attach data to.EPPEncodeException - Thrown if any errors prevent encoding.public void decode(org.w3c.dom.Element aElement)
throws EPPDecodeException
EPPMark componentdecode in interface EPPCodecComponentaElement - Root element of the EPPMarkEPPDecodeException - Error decoding the EPPMarkpublic boolean equals(java.lang.Object aObject)
EPPProtection compare.equals in class java.lang.ObjectaObject - EPPProtection instance to compare withpublic java.lang.String getCc()
null otherwise.public void setCc(java.lang.String aCc)
aCc - Two-character code of the country in which the mark is
protected from [ISO3166-2].public java.lang.String getRegion()
null
otherwise.public void setRegion(java.lang.String aRegion)
aRegion - Name of the city, state, province or other geographic region
in which the mark is protected.public java.util.List<java.lang.String> getRulings()
List otherwise.public void setRulings(java.util.List<java.lang.String> aRulings)
aRulings - The countries of the rulingpublic void addRuling(java.lang.String aRuling)
aRuling - Two-character code of the countries of the ruling. This
is a two-character code from [ISO3166-2].public java.lang.String toString()
Object.toString, which will result in an
indented XML String representation of the concrete
EPPCodecComponent.toString in class java.lang.ObjectString if successful;
ERROR otherwise.public java.lang.String getNamespace()
EPPCodecComponent.getNamespace in interface EPPCodecComponentEPPCodecComponent.