org.apache.juddi.datatype
Class Address

java.lang.Object
  extended by org.apache.juddi.datatype.Address
All Implemented Interfaces:
java.io.Serializable, RegistryObject

public class Address
extends java.lang.Object
implements RegistryObject

Represents a postal address. Essentially holds a simple set of AddressLines, but can be adorned with an optional useType attribute and sortcode. The useType attribute is used to describe the type of the address in freeform text. Examples are "headquarters", "billing department", etc. The sortCode values are not significant, but can be used by user-interfaces that present contact information in some ordered fashion, thereby using the sortCode values.

Author:
Steve Viens (sviens@apache.org)
See Also:
Serialized Form

Constructor Summary
Address()
          Constructs a new Address with no address-lines and no useType or sortCode attribute.
Address(java.lang.String type, java.lang.String sort)
          Constructs a new Address with no address-lines, but with the given useType and sortCode attributes.
 
Method Summary
 void addAddressLine(AddressLine line)
          Add a new addressline to this address.
 java.util.Vector getAddressLineVector()
          Returns the addresslines of this address.
 java.lang.String getSortCode()
          Returns the sortcode of this address.
 java.lang.String getTModelKey()
          Returns the String of this Address.
 java.lang.String getUseType()
          Returns the usetype of this address.
 void setAddressLineVector(java.util.Vector lines)
          Add a collection of new addresslines to this address.
 void setSortCode(java.lang.String sort)
          Sets the sortcode of this address to the given sortcode.
 void setTModelKey(java.lang.String key)
          Sets the key of this tModel to the given key.
 void setUseType(java.lang.String type)
          Sets the usetype of this address to the given usetype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Address

public Address()
Constructs a new Address with no address-lines and no useType or sortCode attribute.


Address

public Address(java.lang.String type,
               java.lang.String sort)
Constructs a new Address with no address-lines, but with the given useType and sortCode attributes.

Parameters:
type - The usetype of the new address, or null if the address doesn't have a usetype.
sort - The sortcode of the new address, or null if the address doesn't have a sortcode.
Method Detail

setUseType

public void setUseType(java.lang.String type)
Sets the usetype of this address to the given usetype. If the new usetype is null, this address doesn't have a usetype anymore.

Parameters:
type - The new usetype of this address, or null if the address doesn't have an usetype anymore.

getUseType

public java.lang.String getUseType()
Returns the usetype of this address.

Returns:
The usetype of this address, or null if this address doesn't have an usetype.

setSortCode

public void setSortCode(java.lang.String sort)
Sets the sortcode of this address to the given sortcode. If the new sortcode is null, this address doesn't have a sortcode anymore.

Parameters:
sort - The new sortcode of this address, or null if the address doesn't have a sortcode anymore.

getSortCode

public java.lang.String getSortCode()
Returns the sortcode of this address.

Returns:
The sortcode of this address, or null if the address doesn't have a sortcode.

setTModelKey

public void setTModelKey(java.lang.String key)
Sets the key of this tModel to the given key.

Parameters:
key - The new key of this tModel.

getTModelKey

public java.lang.String getTModelKey()
Returns the String of this Address.

Returns:
The key of this tModel.

addAddressLine

public void addAddressLine(AddressLine line)
Add a new addressline to this address. The addressline is added at the end of the already existing set of addresslines.

Parameters:
line - The addressline to be added to this address.

setAddressLineVector

public void setAddressLineVector(java.util.Vector lines)
Add a collection of new addresslines to this address. The new addresslines are added at the end of the set of the already existing addresslines.

Parameters:
lines - The collection of addresslines to add.

getAddressLineVector

public java.util.Vector getAddressLineVector()
Returns the addresslines of this address.

Returns:
The addresslines of this address. If this address doesn't have any addresslines, an empty enumeration of addresslines is returned.


Copyright © 2004-2007. All Rights Reserved.