public class ContactData
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ContactData.Type
enumeration for the different contact types
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
address
the address
|
private java.util.Date |
changed
the change date
|
private java.lang.String |
city
the city
|
private java.lang.String |
countryCode
the country code
|
private boolean |
disputeReference
flag whether contact is holder of a domain in dispute
|
private java.util.List<java.lang.String> |
emailAddresses
the e-mail addresses
|
private java.lang.String |
handle
the handle
|
private java.lang.String |
name
the name
|
private java.util.List<java.lang.String> |
organisation
the organisation
|
private java.lang.String |
postalCode
the postal code
|
private ContactData.Type |
type
the type
|
private java.lang.String |
uriTemplate
the URI template
|
Constructor and Description |
---|
ContactData()
constructor
|
ContactData(ContactData other)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
add(XmlBuilder xb,
java.lang.String localName,
java.util.List<java.lang.String> values)
add elements for a list to the builder
|
private void |
add(XmlBuilder xb,
java.lang.String localName,
java.lang.String value)
add an element to the builder
|
void |
fromList(KVList list)
parse the given key-value list.
|
void |
fromXml(org.w3c.dom.Element node)
parse the given XML subtree
|
java.util.List<java.lang.String> |
getAddress()
return the address as a list of strings
|
java.lang.String[] |
getAddressAsArray()
return the address as an array
|
java.util.Date |
getChangeDate()
return the change date
|
java.lang.String |
getCity()
return the city
|
java.lang.String |
getCountryCode()
return the country code
|
java.util.List<java.lang.String> |
getEMailAddresses()
return the e-mail addresses as a list of strings
|
java.lang.String[] |
getEMailAddressesAsArray()
return the e-mail addresses as an array
|
java.lang.String |
getHandle()
return the handle
|
java.lang.String |
getName()
return the name
|
java.util.List<java.lang.String> |
getOrganisation()
return the organisation as a list of strings
|
java.lang.String[] |
getOrganisationAsArray()
return the organisation as an array
|
java.lang.String |
getPostalCode()
return the postal code
|
ContactData.Type |
getType()
return the contact type
|
java.lang.String |
getUriTemplate()
return the URI template
|
private java.lang.String |
parseField(org.w3c.dom.Node node,
java.lang.String localName)
parse a single field
|
private void |
parseField(org.w3c.dom.Node node,
java.lang.String localName,
java.util.List<java.lang.String> list)
parse a field consisting of multiple entries
|
void |
setAddress(java.util.List<java.lang.String> list)
set the address
|
void |
setAddress(java.lang.String... lines)
set the address
|
void |
setCity(java.lang.String theCity)
set the city
|
void |
setCountryCode(java.lang.String code)
set the country code
|
void |
setEMailAddresses(java.util.List<java.lang.String> list)
set the e-mail addresses
|
void |
setEMailAddresses(java.lang.String... addrs)
set the e-mail addresses
|
void |
setHandle(java.lang.String theHandle)
set the handle
|
void |
setName(java.lang.String theName)
set the name
|
void |
setOrganisation(java.util.List<java.lang.String> list)
set the organisation
|
void |
setOrganisation(java.lang.String... lines)
set the organisation
|
void |
setPostalCode(java.lang.String code)
set the postal code
|
void |
setType(ContactData.Type theType)
set the type
|
void |
setUriTemplate(java.lang.String newTemplate)
set the URI template
|
void |
toList(KVList list)
convert the object to a KV list as part of a contact request
|
java.lang.String |
toString()
convert the contact to a sting for debugging purposes
|
void |
toXml(org.w3c.dom.Node node)
convert the object to XML as part of a contact request
|
private java.lang.String handle
private ContactData.Type type
private java.lang.String name
private java.util.List<java.lang.String> organisation
private java.util.List<java.lang.String> address
private java.lang.String postalCode
private java.lang.String city
private java.lang.String countryCode
private java.util.List<java.lang.String> emailAddresses
private java.lang.String uriTemplate
private java.util.Date changed
private boolean disputeReference
public ContactData()
public ContactData(ContactData other)
other
- the other contact to copy frompublic void toList(KVList list) throws EncodeException
list
- the listEncodeException
- on encoding exceptionspublic void fromList(KVList list) throws ResponseParseException
list
- the list to parseResponseParseException
- if the parsing failedprivate java.lang.String parseField(org.w3c.dom.Node node, java.lang.String localName) throws org.w3c.dom.DOMException
node
- the parent nodelocalName
- the local nameorg.w3c.dom.DOMException
- on DOM exceptionsprivate void parseField(org.w3c.dom.Node node, java.lang.String localName, java.util.List<java.lang.String> list) throws org.w3c.dom.DOMException
node
- the parent nodelocalName
- the local namelist
- the list to fillorg.w3c.dom.DOMException
- on DOM exceptionspublic void fromXml(org.w3c.dom.Element node) throws org.w3c.dom.DOMException, ResponseParseException
node
- the node containing the contact dataorg.w3c.dom.DOMException
- on DOM exceptionsResponseParseException
- if the parsing failedprivate void add(XmlBuilder xb, java.lang.String localName, java.lang.String value) throws org.w3c.dom.DOMException
xb
- the builderlocalName
- the local namevalue
- the value (may be null
)org.w3c.dom.DOMException
- on DOM exceptionsprivate void add(XmlBuilder xb, java.lang.String localName, java.util.List<java.lang.String> values) throws org.w3c.dom.DOMException
xb
- the builderlocalName
- the local namevalues
- the value (may be null
)org.w3c.dom.DOMException
- on DOM exceptionspublic void toXml(org.w3c.dom.Node node) throws org.w3c.dom.DOMException, EncodeException
node
- the node to add the contents toorg.w3c.dom.DOMException
- on DOM exceptionsEncodeException
- on encode exceptionspublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getHandle()
null
if not setpublic void setHandle(java.lang.String theHandle)
theHandle
- the handle, may be null
public ContactData.Type getType()
null
if not setpublic void setType(ContactData.Type theType)
theType
- the type, may be null
public java.lang.String getName()
public void setName(java.lang.String theName)
theName
- the namepublic java.util.List<java.lang.String> getOrganisation()
public java.lang.String[] getOrganisationAsArray()
public void setOrganisation(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setOrganisation(java.lang.String... lines)
lines
- the lines of the organisation, may be null
public java.util.List<java.lang.String> getAddress()
public java.lang.String[] getAddressAsArray()
null
if not setpublic void setAddress(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setAddress(java.lang.String... lines)
lines
- the lines of the address, may be null
public java.lang.String getPostalCode()
null
public void setPostalCode(java.lang.String code)
code
- the postal code, may be null
public java.lang.String getCity()
null
public void setCity(java.lang.String theCity)
theCity
- the city, may be null
public java.lang.String getCountryCode()
null
public void setCountryCode(java.lang.String code)
code
- the country code, may be null
public java.util.List<java.lang.String> getEMailAddresses()
public java.lang.String[] getEMailAddressesAsArray()
public void setEMailAddresses(java.util.List<java.lang.String> list)
list
- the list of strings to initialize with,
may be null
public void setEMailAddresses(java.lang.String... addrs)
addrs
- the e-mail addresses, may be null
public java.lang.String getUriTemplate()
null
public void setUriTemplate(java.lang.String newTemplate)
newTemplate
- the URI template, may be null
public java.util.Date getChangeDate()
null
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH