# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.extensions
Class StructuredPostalAddress

    java.lang.Object
      com.google.gdata.data.AbstractExtension
          com.google.gdata.data.ExtensionPoint
              com.google.gdata.data.extensions.StructuredPostalAddress

All Implemented Interfaces:
  Extension

    public class StructuredPostalAddress

extends ExtensionPoint

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.

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Constructor Summary
`StructuredPostalAddress()` Default mutable constructor.
`StructuredPostalAddress(java.lang.String label, java.lang.String mailClass, java.lang.Boolean primary, java.lang.String rel, java.lang.String usage)` Immutable constructor.

Method Summary
`protected void` `consumeAttributes(AttributeHelper helper)` Consumes attributes from the attribute helper.
`void` `declareExtensions(ExtensionProfile extProfile)` Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
`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.
`static ExtensionDescription` `getDefaultDescription(boolean required, boolean repeatable)` Returns the extension description, specifying whether it is required, and whether it is repeatable.
`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.
`protected void` `putAttributes(AttributeGenerator generator)` Puts attributes into the attribute generator.
`void` `setAgent(Agent agent)` Sets the Used in work addresses.
`void` `setCity(City city)` Sets the Can be city, village, town, borough, etc.
`void` `setCountry(Country country)` Sets the The country name.
`void` `setFormattedAddress(FormattedAddress formattedAddress)` Sets the The full, unstructured address.
`void` `setHousename(HouseName housename)` Sets the Used in places where houses or buildings have names.
`void` `setLabel(java.lang.String label)` Sets the Simple string value used to name this address.
`void` `setMailClass(java.lang.String mailClass)` Sets the The mail class.
`void` `setNeighborhood(Neighborhood neighborhood)` Sets the Neighborhood.
`void` `setPobox(PoBox pobox)` Sets the P.O.
`void` `setPostcode(PostCode postcode)` Sets the Postal code.
`void` `setPrimary(java.lang.Boolean primary)` Sets the whether this is the primary postal address.
`void` `setRegion(Region region)` Sets the Region is state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
`void` `setRel(java.lang.String rel)` Sets the the postal address type.
`void` `setStreet(Street street)` Sets the Can be street, avenue, road, etc.
`void` `setSubregion(Subregion subregion)` Sets the Subregion is county (US), province (in Italy), etc.
`void` `setUsage(java.lang.String usage)` Sets the The context for the address use.
`java.lang.String` `toString()`
`protected void` `validate()` Checks the attributes to see if there are any problems.

Methods inherited from class com.google.gdata.data.ExtensionPoint

`addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getHandler, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren`

Methods inherited from class com.google.gdata.data.AbstractExtension
`disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StructuredPostalAddress

    public StructuredPostalAddress()

  Default mutable constructor.

### StructuredPostalAddress

    public StructuredPostalAddress(java.lang.String label,
                                   java.lang.String mailClass,
                                   java.lang.Boolean primary,
                                   java.lang.String rel,
                                   java.lang.String usage)

  Immutable constructor.

  Parameters:
    `label` - Simple string value used to name this address.
    `mailClass` - The mail class.
    `primary` - whether this is the primary postal address.
    `rel` - the postal address type.
    `usage` - The context for the address use.

Method Detail

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

  Description copied from class: `ExtensionPoint`
  Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

  Overrides:
    `declareExtensions` in class `ExtensionPoint`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.

### 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 void 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

### 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 void 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

### 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 void setCountry(Country country)

  Sets the The country name.

  Parameters:
    `country` - The country name or `null` to reset

### 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 void setFormattedAddress(FormattedAddress formattedAddress)

  Sets the The full, unstructured address.

  Parameters:
    `formattedAddress` - The full, unstructured address or `null` to reset

### 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 void 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

### 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 void 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

### 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 void setMailClass(java.lang.String mailClass)

  Sets the The mail class.

  Parameters:
    `mailClass` - The mail class or `null` to reset

### 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 void setNeighborhood(Neighborhood neighborhood)

  Sets the Neighborhood. Used to disambiguate a street.

  Parameters:
    `neighborhood` - Neighborhood. Used to disambiguate a street or `null` to reset

### 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 void setPobox(PoBox pobox)

  Sets the P.O. box.

  Parameters:
    `pobox` - P.O. box or `null` to reset

### 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 void setPostcode(PostCode postcode)

  Sets the Postal code.

  Parameters:
    `postcode` - Postal code or `null` to reset

### 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 void 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

### 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 void 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

### 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 void setRel(java.lang.String rel)

  Sets the the postal address type.

  Parameters:
    `rel` - the postal address type or `null` to reset

### 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 void 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

### 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 void 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

### 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 void 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

### 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

### validate

    protected void validate()

  Description copied from class: `AbstractExtension`
  Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.

  Overrides:
    `validate` in class `AbstractExtension`

### getDefaultDescription

    public static ExtensionDescription getDefaultDescription(boolean required,
                                                             boolean repeatable)

  Returns the extension description, specifying whether it is required, and whether it is repeatable.

  Parameters:
    `required` - whether it is required
    `repeatable` - whether it is repeatable
  Returns:
    extension description

### putAttributes

    protected void putAttributes(AttributeGenerator generator)

  Description copied from class: `AbstractExtension`
  Puts attributes into the attribute generator. Called from `AbstractExtension.generate(XmlWriter,ExtensionProfile)`. Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

  Overrides:
    `putAttributes` in class `AbstractExtension`
  Parameters:
    `generator` - attribute generator

### consumeAttributes

    protected void consumeAttributes(AttributeHelper helper)
                              throws ParseException

  Description copied from class: `AbstractExtension`
  Consumes attributes from the attribute helper. May also use `AttributeHelper.consumeContent(boolean)` to consume the element's text content. Called from `AbstractExtension.getHandler(com.google.gdata.data.ExtensionProfile, java.lang.String, java.lang.String, org.xml.sax.Attributes)`. Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

  Overrides:
    `consumeAttributes` in class `AbstractExtension`
  Parameters:
    `helper` - attribute helper
  Throws:
    `ParseException` - any parsing exception

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`