com.google.gdata.model.gd
Class StructuredPostalAddress

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.gd.StructuredPostalAddress

public class StructuredPostalAddress
extends Element

Describes a structured postal address.


Nested Class Summary
static class StructuredPostalAddress.MailClass
          The mail class.
static class StructuredPostalAddress.Rel
          The postal address type.
static class StructuredPostalAddress.Usage
          The context for the address use.
 
Field Summary
static ElementKey<java.lang.Void,StructuredPostalAddress> KEY
          The key for this element.
static AttributeKey<java.lang.String> LABEL
          Simple string value used to name this address.
static AttributeKey<java.lang.String> MAIL_CLASS
          The mail class.
static AttributeKey<java.lang.Boolean> PRIMARY
          Whether this is the primary postal address.
static AttributeKey<java.lang.String> REL
          The postal address type.
static AttributeKey<java.lang.String> USAGE
          The context for the address use.
 
Constructor Summary
  StructuredPostalAddress()
          Constructs an instance using the default key.
protected StructuredPostalAddress(ElementKey<?,? extends StructuredPostalAddress> key)
          Subclass constructor, allows subclasses to supply their own element key.
protected StructuredPostalAddress(ElementKey<?,? extends StructuredPostalAddress> key, Element source)
          Constructs a new instance by doing a shallow copy of data from an existing Element instance.
 
Method Summary
 Agent getAgent()
          Returns the Used in work addresses.
 City getCity()
          Returns the Can be city, village, town, borough, etc.
 Country getCountry()
          Returns the The country name.
 FormattedAddress getFormattedAddress()
          Returns the The full, unstructured address.
 HouseName getHousename()
          Returns the Used in places where houses or buildings have names.
 java.lang.String getLabel()
          Returns the Simple string value used to name this address.
 java.lang.String getMailClass()
          Returns the The mail class.
 Neighborhood getNeighborhood()
          Returns the Neighborhood.
 PoBox getPobox()
          Returns the P.O.
 PostCode getPostcode()
          Returns the Postal code.
 java.lang.Boolean getPrimary()
          Returns the whether this is the primary postal address.
 Region getRegion()
          Returns the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
 java.lang.String getRel()
          Returns the the postal address type.
 Street getStreet()
          Returns the Can be street, avenue, road, etc.
 Subregion getSubregion()
          Returns the Subregion is county (US), province (in Italy), etc.
 java.lang.String getUsage()
          Returns the The context for the address use.
 boolean hasAgent()
          Returns whether it has the Used in work addresses.
 boolean hasCity()
          Returns whether it has the Can be city, village, town, borough, etc.
 boolean hasCountry()
          Returns whether it has the The country name.
 boolean hasFormattedAddress()
          Returns whether it has the The full, unstructured address.
 boolean hasHousename()
          Returns whether it has the Used in places where houses or buildings have names.
 boolean hasLabel()
          Returns whether it has the Simple string value used to name this address.
 boolean hasMailClass()
          Returns whether it has the The mail class.
 boolean hasNeighborhood()
          Returns whether it has the Neighborhood.
 boolean hasPobox()
          Returns whether it has the P.O.
 boolean hasPostcode()
          Returns whether it has the Postal code.
 boolean hasPrimary()
          Returns whether it has the whether this is the primary postal address.
 boolean hasRegion()
          Returns whether it has the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
 boolean hasRel()
          Returns whether it has the the postal address type.
 boolean hasStreet()
          Returns whether it has the Can be street, avenue, road, etc.
 boolean hasSubregion()
          Returns whether it has the Subregion is county (US), province (in Italy), etc.
 boolean hasUsage()
          Returns whether it has the The context for the address use.
 StructuredPostalAddress lock()
          Locks this element.
static void registerMetadata(MetadataRegistry registry)
          Registers the metadata for this element.
 StructuredPostalAddress setAgent(Agent agent)
          Sets the Used in work addresses.
 StructuredPostalAddress setCity(City city)
          Sets the Can be city, village, town, borough, etc.
 StructuredPostalAddress setCountry(Country country)
          Sets the The country name.
 StructuredPostalAddress setFormattedAddress(FormattedAddress formattedAddress)
          Sets the The full, unstructured address.
 StructuredPostalAddress setHousename(HouseName housename)
          Sets the Used in places where houses or buildings have names.
 StructuredPostalAddress setLabel(java.lang.String label)
          Sets the Simple string value used to name this address.
 StructuredPostalAddress setMailClass(java.lang.String mailClass)
          Sets the The mail class.
 StructuredPostalAddress setNeighborhood(Neighborhood neighborhood)
          Sets the Neighborhood.
 StructuredPostalAddress setPobox(PoBox pobox)
          Sets the P.O.
 StructuredPostalAddress setPostcode(PostCode postcode)
          Sets the Postal code.
 StructuredPostalAddress setPrimary(java.lang.Boolean primary)
          Sets the whether this is the primary postal address.
 StructuredPostalAddress setRegion(Region region)
          Sets the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
 StructuredPostalAddress setRel(java.lang.String rel)
          Sets the the postal address type.
 StructuredPostalAddress setStreet(Street street)
          Sets the Can be street, avenue, road, etc.
 StructuredPostalAddress setSubregion(Subregion subregion)
          Sets the Subregion is county (US), province (in Italy), etc.
 StructuredPostalAddress setUsage(java.lang.String usage)
          Sets the The context for the address use.
 
Methods inherited from class com.google.gdata.model.Element
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,StructuredPostalAddress> KEY
The key for this element.


LABEL

public static final AttributeKey<java.lang.String> LABEL
Simple string value used to name this address.


MAIL_CLASS

public static final AttributeKey<java.lang.String> MAIL_CLASS
The mail class.


PRIMARY

public static final AttributeKey<java.lang.Boolean> PRIMARY
Whether this is the primary postal address.


REL

public static final AttributeKey<java.lang.String> REL
The postal address type.


USAGE

public static final AttributeKey<java.lang.String> USAGE
The context for the address use.

Constructor Detail

StructuredPostalAddress

public StructuredPostalAddress()
Constructs an instance using the default key.


StructuredPostalAddress

protected StructuredPostalAddress(ElementKey<?,? extends StructuredPostalAddress> key)
Subclass constructor, allows subclasses to supply their own element key.


StructuredPostalAddress

protected StructuredPostalAddress(ElementKey<?,? extends StructuredPostalAddress> key,
                                  Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance. Will use the given ElementKey as the key for the element. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use Element.createElement(ElementKey, Element).

Parameters:
key - The key to use for this element.
source - source element
Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public StructuredPostalAddress lock()
Description copied from class: Element
Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

Overrides:
lock in class Element

getAgent

public Agent getAgent()
Returns the Used in work addresses. Also for 'in care of' or 'c/o'.

Returns:
Used in work addresses. Also for 'in care of' or 'c/o'

setAgent

public StructuredPostalAddress setAgent(Agent agent)
Sets the Used in work addresses. Also for 'in care of' or 'c/o'.

Parameters:
agent - Used in work addresses. Also for 'in care of' or 'c/o' or null to reset
Returns:
this to enable chaining setters

hasAgent

public boolean hasAgent()
Returns whether it has the Used in work addresses. Also for 'in care of' or 'c/o'.

Returns:
whether it has the Used in work addresses. Also for 'in care of' or 'c/o'

getCity

public City getCity()
Returns the Can be city, village, town, borough, etc.

Returns:
Can be city, village, town, borough, etc

setCity

public StructuredPostalAddress setCity(City city)
Sets the Can be city, village, town, borough, etc.

Parameters:
city - Can be city, village, town, borough, etc or null to reset
Returns:
this to enable chaining setters

hasCity

public boolean hasCity()
Returns whether it has the Can be city, village, town, borough, etc.

Returns:
whether it has the Can be city, village, town, borough, etc

getCountry

public Country getCountry()
Returns the The country name.

Returns:
The country name

setCountry

public StructuredPostalAddress setCountry(Country country)
Sets the The country name.

Parameters:
country - The country name or null to reset
Returns:
this to enable chaining setters

hasCountry

public boolean hasCountry()
Returns whether it has the The country name.

Returns:
whether it has the The country name

getFormattedAddress

public FormattedAddress getFormattedAddress()
Returns the The full, unstructured address.

Returns:
The full, unstructured address

setFormattedAddress

public StructuredPostalAddress setFormattedAddress(FormattedAddress formattedAddress)
Sets the The full, unstructured address.

Parameters:
formattedAddress - The full, unstructured address or null to reset
Returns:
this to enable chaining setters

hasFormattedAddress

public boolean hasFormattedAddress()
Returns whether it has the The full, unstructured address.

Returns:
whether it has the The full, unstructured address

getHousename

public HouseName getHousename()
Returns the Used in places where houses or buildings have names.

Returns:
Used in places where houses or buildings have names

setHousename

public StructuredPostalAddress setHousename(HouseName housename)
Sets the Used in places where houses or buildings have names.

Parameters:
housename - Used in places where houses or buildings have names or null to reset
Returns:
this to enable chaining setters

hasHousename

public boolean hasHousename()
Returns whether it has the Used in places where houses or buildings have names.

Returns:
whether it has the Used in places where houses or buildings have names

getLabel

public java.lang.String getLabel()
Returns the Simple string value used to name this address.

Returns:
Simple string value used to name this address

setLabel

public StructuredPostalAddress setLabel(java.lang.String label)
Sets the Simple string value used to name this address.

Parameters:
label - Simple string value used to name this address or null to reset
Returns:
this to enable chaining setters

hasLabel

public boolean hasLabel()
Returns whether it has the Simple string value used to name this address.

Returns:
whether it has the Simple string value used to name this address

getMailClass

public java.lang.String getMailClass()
Returns the The mail class.

Returns:
The mail class

setMailClass

public StructuredPostalAddress setMailClass(java.lang.String mailClass)
Sets the The mail class.

Parameters:
mailClass - The mail class or null to reset
Returns:
this to enable chaining setters

hasMailClass

public boolean hasMailClass()
Returns whether it has the The mail class.

Returns:
whether it has the The mail class

getNeighborhood

public Neighborhood getNeighborhood()
Returns the Neighborhood. Used to disambiguate a street.

Returns:
Neighborhood. Used to disambiguate a street

setNeighborhood

public StructuredPostalAddress setNeighborhood(Neighborhood neighborhood)
Sets the Neighborhood. Used to disambiguate a street.

Parameters:
neighborhood - Neighborhood. Used to disambiguate a street or null to reset
Returns:
this to enable chaining setters

hasNeighborhood

public boolean hasNeighborhood()
Returns whether it has the Neighborhood. Used to disambiguate a street.

Returns:
whether it has the Neighborhood. Used to disambiguate a street

getPobox

public PoBox getPobox()
Returns the P.O. box.

Returns:
P.O. box

setPobox

public StructuredPostalAddress setPobox(PoBox pobox)
Sets the P.O. box.

Parameters:
pobox - P.O. box or null to reset
Returns:
this to enable chaining setters

hasPobox

public boolean hasPobox()
Returns whether it has the P.O. box.

Returns:
whether it has the P.O. box

getPostcode

public PostCode getPostcode()
Returns the Postal code.

Returns:
Postal code

setPostcode

public StructuredPostalAddress setPostcode(PostCode postcode)
Sets the Postal code.

Parameters:
postcode - Postal code or null to reset
Returns:
this to enable chaining setters

hasPostcode

public boolean hasPostcode()
Returns whether it has the Postal code.

Returns:
whether it has the Postal code

getPrimary

public java.lang.Boolean getPrimary()
Returns the whether this is the primary postal address.

Returns:
whether this is the primary postal address

setPrimary

public StructuredPostalAddress setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary postal address.

Parameters:
primary - whether this is the primary postal address or null to reset
Returns:
this to enable chaining setters

hasPrimary

public boolean hasPrimary()
Returns whether it has the whether this is the primary postal address.

Returns:
whether it has the whether this is the primary postal address

getRegion

public Region getRegion()
Returns the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

Returns:
Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc

setRegion

public StructuredPostalAddress setRegion(Region region)
Sets the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

Parameters:
region - Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc or null to reset
Returns:
this to enable chaining setters

hasRegion

public boolean hasRegion()
Returns whether it has the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

Returns:
whether it has the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc

getRel

public java.lang.String getRel()
Returns the the postal address type.

Returns:
the postal address type

setRel

public StructuredPostalAddress setRel(java.lang.String rel)
Sets the the postal address type.

Parameters:
rel - the postal address type or null to reset
Returns:
this to enable chaining setters

hasRel

public boolean hasRel()
Returns whether it has the the postal address type.

Returns:
whether it has the the postal address type

getStreet

public Street getStreet()
Returns the Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

Returns:
Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number

setStreet

public StructuredPostalAddress setStreet(Street street)
Sets the Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

Parameters:
street - Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number or null to reset
Returns:
this to enable chaining setters

hasStreet

public boolean hasStreet()
Returns whether it has the Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

Returns:
whether it has the Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number

getSubregion

public Subregion getSubregion()
Returns the Subregion is county (US), province (in Italy), etc.

Returns:
Subregion is county (US), province (in Italy), etc

setSubregion

public StructuredPostalAddress setSubregion(Subregion subregion)
Sets the Subregion is county (US), province (in Italy), etc.

Parameters:
subregion - Subregion is county (US), province (in Italy), etc or null to reset
Returns:
this to enable chaining setters

hasSubregion

public boolean hasSubregion()
Returns whether it has the Subregion is county (US), province (in Italy), etc.

Returns:
whether it has the Subregion is county (US), province (in Italy), etc

getUsage

public java.lang.String getUsage()
Returns the The context for the address use.

Returns:
The context for the address use

setUsage

public StructuredPostalAddress setUsage(java.lang.String usage)
Sets the The context for the address use.

Parameters:
usage - The context for the address use or null to reset
Returns:
this to enable chaining setters

hasUsage

public boolean hasUsage()
Returns whether it has the The context for the address use.

Returns:
whether it has the The context for the address use