Package com.verisign.epp.codec.mark
Class EPPMarkAddress
- java.lang.Object
-
- com.verisign.epp.codec.mark.EPPMarkAddress
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPMarkAddress extends java.lang.Object implements EPPCodecComponent
Class for an address within anEPPMarkContact
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
Constant for the local namestatic java.lang.String
ELM_NAME
Constant for the tag name
-
Constructor Summary
Constructors Constructor Description EPPMarkAddress()
Default constructor forEPPMarkAddress
.EPPMarkAddress(java.util.List<java.lang.String> aStreets, java.lang.String aCity, java.lang.String aSp, java.lang.String aPc, java.lang.String aCc)
Constructor that takes all of theEPPMarkAddress
attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStreet(java.lang.String aStreet)
Add a street line to the contact street address.java.lang.Object
clone()
CloneEPPMarkAddress
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPMark
componentorg.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Sets all this instance's data in the given XML documentboolean
equals(java.lang.Object aObject)
implements a deepEPPMarkAddress
compare.java.lang.String
getCc()
Gets the country code of the contact.java.lang.String
getCity()
Gets the city of the contact.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getPc()
Gets the Postal Code of the contact.java.lang.String
getSp()
Gets the City or Province of the contact.java.util.List<java.lang.String>
getStreets()
Gets the contact's street address.void
setCc(java.lang.String aCc)
Sets the country code of the contact.void
setCity(java.lang.String aCity)
Sets the city of the contact.void
setPc(java.lang.String aPc)
Sets the Postal Code of the contact.void
setSp(java.lang.String aSp)
Sets the City or Province of the contact.void
setStreets(java.util.List<java.lang.String> aStreets)
Sets the contact's street address.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the tag name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMarkAddress
public EPPMarkAddress()
Default constructor forEPPMarkAddress
.
-
EPPMarkAddress
public EPPMarkAddress(java.util.List<java.lang.String> aStreets, java.lang.String aCity, java.lang.String aSp, java.lang.String aPc, java.lang.String aCc)
Constructor that takes all of theEPPMarkAddress
attributes.- Parameters:
aStreets
- Streets of the contact.aCity
- City of the contactaSp
- State or Province of the contactaPc
- Postal Code of the contactaCc
- Country code of the contact
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPMarkAddress
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPMarkAddress
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
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 interfaceEPPCodecComponent
- 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(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPMark
component- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root element of theEPPMark
- Throws:
EPPDecodeException
- Error decoding theEPPMark
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMarkAddress
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPMarkAddress
instance to compare with- Returns:
- true if equal false otherwise
-
getStreets
public java.util.List<java.lang.String> getStreets()
Gets the contact's street address.- Returns:
List
of street lines if set; Empty list otherwise.
-
setStreets
public void setStreets(java.util.List<java.lang.String> aStreets)
Sets the contact's street address. There can be update to three lines of the streets address.- Parameters:
aStreets
- Zero to three street lines.
-
addStreet
public void addStreet(java.lang.String aStreet)
Add a street line to the contact street address. This will add a street to the end of the list of street lines.- Parameters:
aStreet
- A line of the contact street address.
-
getCity
public java.lang.String getCity()
Gets the city of the contact.- Returns:
- The city of the contact if set;
null
otherwise.
-
setCity
public void setCity(java.lang.String aCity)
Sets the city of the contact.- Parameters:
aCity
- City of the contact.
-
getSp
public java.lang.String getSp()
Gets the City or Province of the contact.- Returns:
- City or Province of the contact if set;
null
otherwise.
-
setSp
public void setSp(java.lang.String aSp)
Sets the City or Province of the contact.- Parameters:
aSp
- City or Province of the contact.
-
getPc
public java.lang.String getPc()
Gets the Postal Code of the contact.- Returns:
- Postal Code of the contact if set;
null
otherwise.
-
setPc
public void setPc(java.lang.String aPc)
Sets the Postal Code of the contact.- Parameters:
aPc
- Postal Code of the contact.
-
getCc
public java.lang.String getCc()
Gets the country code of the contact.- Returns:
- Country code of the contact if set;
null
otherwise.
-
setCc
public void setCc(java.lang.String aCc)
Sets the country code of the contact.- Parameters:
aCc
- Country code of the contact.
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-