public class EPPOrgAddress extends java.lang.Object implements EPPCodecComponent
getStreets()
and
setStreets(List)
to get and set the elements.getCity()
and setCity(String)
to get and set the element.getStateProvince()
and
setStateProvince(String)
to get and set the element.getPostalCode()
and setPostalCode(String)
to get
and set the element.getCountry()
and
setCountry(String)
to get and set the element.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELM_LOCALNAME
XML local name for
EPPOrgDisclose . |
static java.lang.String |
ELM_NAME
XML root tag for
EPPOrgPostalDefinition . |
Constructor and Description |
---|
EPPOrgAddress()
Default constructor for
EPPOrgAddress . |
EPPOrgAddress(java.util.List<java.lang.String> aStreets,
java.lang.String aCity,
java.lang.String aStateProvince,
java.lang.String aPostalCode,
java.lang.String aCountry)
Constructor for
EPPOrgAddress all of the attributes as
parameters. |
EPPOrgAddress(java.lang.String aCity,
java.lang.String aCountry)
Constructor for
EPPOrgAddress all of the required
attributes as parameters. |
Modifier and Type | Method and Description |
---|---|
void |
addStreet(java.lang.String aStreetLine)
Add a street line to the street.
|
java.lang.Object |
clone()
Clone
EPPOrgAddress . |
void |
decode(org.w3c.dom.Element aElement)
Decode the
EPPOrgAddress attributes from the aElement
DOM Element tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of the
EPPOrgAddress instance. |
boolean |
equals(java.lang.Object aObject)
implements a deep
EPPOrgAddress compare. |
java.lang.String |
getCity()
Gets the org city.
|
java.lang.String |
getCountry()
Gets the org country.
|
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent . |
java.lang.String |
getPostalCode()
Gets the org postal code
|
java.lang.String |
getStateProvince()
Gets the org state/province.
|
java.util.List<java.lang.String> |
getStreets()
Gets the org street(s).
|
boolean |
hasStreets()
Is there any street lines set?
|
void |
setCity(java.lang.String aCity)
Sets the org city.
|
void |
setCountry(java.lang.String aCountry)
Sets the org country.
|
void |
setPostalCode(java.lang.String aPostalCode)
Sets the org postal code
|
void |
setStateProvince(java.lang.String aStateProvince)
Sets the org state/province.
|
void |
setStreet(java.lang.String aStreet)
Sets the org streets with only one line.
|
void |
setStreets(java.util.List<java.lang.String> aStreets)
Sets the org streets attribute with a
List>String> , where each element represents a line of
the street address. |
void |
setStreets(java.lang.String aStreet1,
java.lang.String aStreet2)
Sets the org street with two street lines.
|
void |
setStreets(java.lang.String aStreet1,
java.lang.String aStreet2,
java.lang.String aStreet3)
Sets the org street with three street lines.
|
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
EPPOrgDisclose
.public static final java.lang.String ELM_NAME
EPPOrgPostalDefinition
.public EPPOrgAddress()
EPPOrgAddress
. All the the
attributes default to null
. Must call required setter
methods before invoking encode(Document)
, which include:setCity(String)
setCountry(String)
public EPPOrgAddress(java.lang.String aCity, java.lang.String aCountry)
EPPOrgAddress
all of the required
attributes as parameters.aCity
- Org streetaCountry
- Org countrypublic EPPOrgAddress(java.util.List<java.lang.String> aStreets, java.lang.String aCity, java.lang.String aStateProvince, java.lang.String aPostalCode, java.lang.String aCountry)
EPPOrgAddress
all of the attributes as
parameters.aStreets
- List<String>
collection of streets (up to
maximum three)aCity
- Org streetaStateProvince
- Org state/provinceaPostalCode
- Org postal codeaCountry
- Org countrypublic boolean hasStreets()
true
if there is at least one street line set.public void addStreet(java.lang.String aStreetLine)
aStreetLine
to the list of street lines.aStreetLine
- Street line to add to the streetpublic java.util.List<java.lang.String> getStreets()
List<String>
of streets (up to
maximum three).public void setStreets(java.util.List<java.lang.String> aStreets)
List>String>
, where each element represents a line of
the street address.aStreets
- Up to 3 street elementspublic void setStreet(java.lang.String aStreet)
List<String>
will be returned on a call to
getStreets()
after calling this method.aStreet
- Org street.public void setStreets(java.lang.String aStreet1, java.lang.String aStreet2)
aStreet1
- First street lineaStreet2
- Second street linepublic void setStreets(java.lang.String aStreet1, java.lang.String aStreet2, java.lang.String aStreet3)
aStreet1
- First street lineaStreet2
- Second street lineaStreet3
- Third street linepublic java.lang.String getCity()
String
if defined; null
otherwise.public void setCity(java.lang.String aCity)
aCity
- org citypublic java.lang.String getStateProvince()
String
if defined; null
otherwise.public void setStateProvince(java.lang.String aStateProvince)
aStateProvince
- org state/provincepublic java.lang.String getPostalCode()
String
if defined; null
otherwise.public void setPostalCode(java.lang.String aPostalCode)
aPostalCode
- org postal codepublic java.lang.String getCountry()
String
if defined;
null
otherwise.public void setCountry(java.lang.String aCountry)
aCountry
- org countrypublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
EPPOrgAddress
instance.encode
in interface EPPCodecComponent
aDocument
- DOM Document that is being built. Used as an Element factory.EPPOrgAddress
instance.EPPEncodeException
- Unable to encode EPPOrgAddress
instance.public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
EPPOrgAddress
attributes from the aElement
DOM Element tree.decode
in interface EPPCodecComponent
aElement
- Root DOM Element to decode EPPOrgAddress
from.EPPDecodeException
- Unable to decode aElement.public boolean equals(java.lang.Object aObject)
EPPOrgAddress
compare.equals
in class java.lang.Object
aObject
- EPPOrgAddress
instance to compare withtrue
of aObject
is equal to instance;
false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPOrgAddress
.clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPOrgAddress
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic java.lang.String toString()
Object.toString
, which will result in an
indented XML String
representation of the concrete
EPPCodecComponent
.toString
in class java.lang.Object
String
if successful;
ERROR
otherwise.public java.lang.String getNamespace()
EPPCodecComponent
.getNamespace
in interface EPPCodecComponent
EPPCodecComponent
.