net.wimpi.pim.contact.model
Interface Address

All Superinterfaces:
Identifiable, java.io.Serializable
All Known Implementing Classes:
AddressImpl

public interface Address
extends Identifiable, java.io.Serializable

An interface modeling an address based on the types and information of the vCard Mime directory profile standard specification.

For reference see RFC 2426:
3.2.1 ADR Type Definition
3.2.2 LABEL Type Definition

The ADR type is based on semantics of the X.520 geographical and postal addressing attributes.
Note that for a standard conformant implementation you have to observe the following:

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger

Field Summary
static int TYPE_DOMESTIC
          Type that indicates a domestic delivery address.
static int TYPE_HOME
          Type that indicates an address associated with a residence.
static int TYPE_INTERNATIONAL
          Type that indicates an international delivery address.
static int TYPE_PARCEL
          Type that indicates a parcel delivery address.
static int TYPE_POSTAL
          Type that indicates a postal delivery address.
static int TYPE_WORK
          Type that indicates an address associated with a work place.
 
Method Summary
 java.lang.String getCity()
          Returns the city of this Address.
 java.lang.String getCountry()
          Returns the country of this Address.
 java.lang.String getExtended()
          Returns the extended part of this Address.
 java.lang.String getLabel()
          Returns the label of this Address.
 java.lang.String getPostalCode()
          Returns the postal code of this Address.
 java.lang.String getPostBox()
          Returns the post office box of this Address.
 java.lang.String getRegion()
          Returns the region of this Address.
 java.lang.String getStreet()
          Returns the street of this Address.
 boolean isDomestic()
          Tests if this Address is a domestic delivery address.
 boolean isHome()
          Tests if this Address represents a residence.
 boolean isInternational()
          Tests if this Address is international delivery address.
 boolean isParcel()
          Tests if this Address is a parcel delivery address.
 boolean isPostal()
          Tests if this Address is a postal delivery address.
 boolean isType(int TYPE)
          Tests if this Address is of a specific type.
 boolean isWork()
          Tests if this Address represents a place of work.
 void setCity(java.lang.String city)
          Sets the city of this Address.
 void setCountry(java.lang.String country)
          Sets the country of this Address.
 void setDomestic(boolean b)
          Sets or resets the domestic flag of this Address.
 void setExtended(java.lang.String extended)
          Sets the extended part of this Address.
 void setHome(boolean b)
          Sets or resets the home flag of this Address.
 void setInternational(boolean b)
          Sets or resets the international flag of this Address.
 void setLabel(java.lang.String label)
          Sets the label of this Address.
 void setParcel(boolean b)
          Sets or resets the parcel flag of this Address.
 void setPostal(boolean b)
          Sets or resets the postal flag of this Address.
 void setPostalCode(java.lang.String postalcode)
          Sets the postal code of this Address.
 void setPostBox(java.lang.String pobox)
          Sets the post office box of this Address.
 void setRegion(java.lang.String region)
          Sets the region of this Address.
 void setStreet(java.lang.String street)
          Sets the street of this Address.
 void setWork(boolean b)
          Sets or resets the work flag of this Address.
 
Methods inherited from interface net.wimpi.pim.util.Identifiable
getUID
 

Field Detail

TYPE_WORK

public static final int TYPE_WORK
Type that indicates an address associated with a work place.

See Also:
Constant Field Values

TYPE_HOME

public static final int TYPE_HOME
Type that indicates an address associated with a residence.

See Also:
Constant Field Values

TYPE_DOMESTIC

public static final int TYPE_DOMESTIC
Type that indicates a domestic delivery address.

See Also:
Constant Field Values

TYPE_INTERNATIONAL

public static final int TYPE_INTERNATIONAL
Type that indicates an international delivery address.

See Also:
Constant Field Values

TYPE_POSTAL

public static final int TYPE_POSTAL
Type that indicates a postal delivery address.

See Also:
Constant Field Values

TYPE_PARCEL

public static final int TYPE_PARCEL
Type that indicates a parcel delivery address.

See Also:
Constant Field Values
Method Detail

getPostBox

public java.lang.String getPostBox()
Returns the post office box of this Address.

Returns:
the post office box as String.

setPostBox

public void setPostBox(java.lang.String pobox)
Sets the post office box of this Address.

Parameters:
pobox - the post office box as String.

getExtended

public java.lang.String getExtended()
Returns the extended part of this Address.

Returns:
the extended part as String.

setExtended

public void setExtended(java.lang.String extended)
Sets the extended part of this Address.

Parameters:
extended - the extended part as String.

getStreet

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

Returns:
the street as String.

setStreet

public void setStreet(java.lang.String street)
Sets the street of this Address.

Parameters:
street - the street as String.

getCity

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

Returns:
the city as String.

setCity

public void setCity(java.lang.String city)
Sets the city of this Address.

Parameters:
city - the city as String.

getRegion

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

Returns:
the region as String.

setRegion

public void setRegion(java.lang.String region)
Sets the region of this Address.

Parameters:
region - the region as String.

getPostalCode

public java.lang.String getPostalCode()
Returns the postal code of this Address.

Returns:
the postal code as String.

setPostalCode

public void setPostalCode(java.lang.String postalcode)
Sets the postal code of this Address.

Parameters:
postalcode - the postal code as String.

getCountry

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

Returns:
the country as String.

setCountry

public void setCountry(java.lang.String country)
Sets the country of this Address.

Parameters:
country - as String.

getLabel

public java.lang.String getLabel()
Returns the label of this Address. The label refers to a formatted text representation of this Address.

Returns:
the label as String.

setLabel

public void setLabel(java.lang.String label)
Sets the label of this Address.

Parameters:
label - the label as String.

isDomestic

public boolean isDomestic()
Tests if this Address is a domestic delivery address.

Returns:
true if for domestic delivery, false otherwise.

setDomestic

public void setDomestic(boolean b)
Sets or resets the domestic flag of this Address.

Parameters:
b - true if for domestic delivery, false otherwise.

isInternational

public boolean isInternational()
Tests if this Address is international delivery address.

Returns:
true if for international delivery, false otherwise.

setInternational

public void setInternational(boolean b)
Sets or resets the international flag of this Address.

Parameters:
b - true if for international delivery, false otherwise.

isParcel

public boolean isParcel()
Tests if this Address is a parcel delivery address.

Returns:
true if for parcel delivery, false otherwise.

setParcel

public void setParcel(boolean b)
Sets or resets the parcel flag of this Address.

Parameters:
b - true if for parcel delivery, false otherwise.

isPostal

public boolean isPostal()
Tests if this Address is a postal delivery address.

Returns:
true if for postal delivery, false otherwise.

setPostal

public void setPostal(boolean b)
Sets or resets the postal flag of this Address.

Parameters:
b - true if for postal delivery, false otherwise.

isHome

public boolean isHome()
Tests if this Address represents a residence.

Returns:
true if representing a residence, false otherwise.

setHome

public void setHome(boolean b)
Sets or resets the home flag of this Address.

Parameters:
b - true if representing a residence, false otherwise.

isWork

public boolean isWork()
Tests if this Address represents a place of work.

Returns:
true if representing a place of work, false otherwise.

setWork

public void setWork(boolean b)
Sets or resets the work flag of this Address.

Parameters:
b - true if representing a place of work, false otherwise.

isType

public boolean isType(int TYPE)
Tests if this Address is of a specific type. Types are defined as constants of this interface.

Parameters:
TYPE - a type as int.


Copyright © 2001-2003 jpim team.