EPP 0.2.5

com.neulevel.epp.core
Class EppAddress

java.lang.Object
  |
  +--com.neulevel.epp.core.EppEntity
        |
        +--com.neulevel.epp.core.EppAddress

public class EppAddress
extends EppEntity

This EppAddress class implements EPP Address entity used in the EPP Contact objects.

Version:
$Revision: 1.1 $ $Date: 2001/11/05 20:20:36 $
Author:
Ning Zhang ning.zhang@neustar.com

Field Summary
static int MAX_NUM_OF_STREETS
          Maximum number (lines) of streets in an address
 
Constructor Summary
EppAddress()
          Creates an EppAddress object without any contents
EppAddress(java.lang.String[] street, java.lang.String city, java.lang.String sp, java.lang.String pc, java.lang.String cc)
          Creates an EppAddress object with full address information
EppAddress(java.lang.String city, java.lang.String sp, java.lang.String pc, java.lang.String cc)
          Creates an EppAddress object without street addresses
EppAddress(java.lang.String street, java.lang.String city, java.lang.String sp, java.lang.String pc, java.lang.String cc)
          Creates an EppAddress object with one street address
 
Method Summary
static EppEntity fromXML(org.w3c.dom.Node root)
          Converts an XML element into an EppAddress object.
 java.lang.String getCity()
          Gets the city string
 java.lang.String getCountryCode()
          Gets the country code
 java.lang.String getPostalCode()
          Gets the postal code
 java.lang.String getState()
          Gets the province or state string
 java.lang.String[] getStreet()
          Gets the street lines stored in a string array
 void setCity(java.lang.String city)
          Sets the city string
 void setCountryCode(java.lang.String cc)
          Sets the country code in two characters
 void setPostalCode(java.lang.String pc)
          Sets the postal code
 void setState(java.lang.String sp)
          Sets the province or state string
 void setStreet(int index, java.lang.String street)
          Sets the street line, given an line index
 void setStreet(java.lang.String[] street)
          Sets the street lines stored in a string array
 java.lang.String toString()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc, java.lang.String tag)
          Converts the EppAddress object into an XML element
 
Methods inherited from class com.neulevel.epp.core.EppEntity
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_NUM_OF_STREETS

public static final int MAX_NUM_OF_STREETS
Maximum number (lines) of streets in an address
Constructor Detail

EppAddress

public EppAddress()
Creates an EppAddress object without any contents

EppAddress

public EppAddress(java.lang.String city,
                  java.lang.String sp,
                  java.lang.String pc,
                  java.lang.String cc)
Creates an EppAddress object without street addresses

EppAddress

public EppAddress(java.lang.String street,
                  java.lang.String city,
                  java.lang.String sp,
                  java.lang.String pc,
                  java.lang.String cc)
Creates an EppAddress object with one street address

EppAddress

public EppAddress(java.lang.String[] street,
                  java.lang.String city,
                  java.lang.String sp,
                  java.lang.String pc,
                  java.lang.String cc)
Creates an EppAddress object with full address information
Method Detail

getStreet

public java.lang.String[] getStreet()
Gets the street lines stored in a string array

setStreet

public void setStreet(java.lang.String[] street)
Sets the street lines stored in a string array

setStreet

public void setStreet(int index,
                      java.lang.String street)
Sets the street line, given an line index

getCity

public java.lang.String getCity()
Gets the city string

setCity

public void setCity(java.lang.String city)
Sets the city string

getState

public java.lang.String getState()
Gets the province or state string

setState

public void setState(java.lang.String sp)
Sets the province or state string

getPostalCode

public java.lang.String getPostalCode()
Gets the postal code

setPostalCode

public void setPostalCode(java.lang.String pc)
Sets the postal code

getCountryCode

public java.lang.String getCountryCode()
Gets the country code

setCountryCode

public void setCountryCode(java.lang.String cc)
Sets the country code in two characters

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc,
                                 java.lang.String tag)
Converts the EppAddress object into an XML element
Overrides:
toXML in class EppEntity
Parameters:
doc - the XML Document object
tag - the tag/element name for the EppAddress object
Returns:
an Element object

fromXML

public static EppEntity fromXML(org.w3c.dom.Node root)
Converts an XML element into an EppAddress object. The caller of this method must make sure that the root node is of the EPP addrType.
Parameters:
root - root node for an EppAddress object in XML format
Returns:
an EppAddress object, or null if the node is invalid

toString

public java.lang.String toString()
Overrides:
toString in class EppEntity

EPP 0.2.5

Copyright © 2001-2002 NeuLevel, Inc. All Rights Reserved.