public class StructuredPostalAddress extends ExtensionPoint
| Modifier and Type | Class and Description |
|---|---|
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.
|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandlerAbstractExtension.AttributesHandlerxmlBloblocalName, namespace| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, visitChildrendisableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutablepublic StructuredPostalAddress()
public StructuredPostalAddress(java.lang.String label,
java.lang.String mailClass,
java.lang.Boolean primary,
java.lang.String rel,
java.lang.String usage)
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.public void declareExtensions(ExtensionProfile extProfile)
ExtensionPointdeclareExtensions in class ExtensionPointextProfile - the ExtensionProfile to initialize.public Agent getAgent()
public void setAgent(Agent agent)
agent - Used in work addresses. Also for 'in care of' or 'c/o' or
null to resetpublic boolean hasAgent()
public City getCity()
public void setCity(City city)
city - Can be city, village, town, borough, etc or null
to resetpublic boolean hasCity()
public Country getCountry()
public void setCountry(Country country)
country - The country name or null to resetpublic boolean hasCountry()
public FormattedAddress getFormattedAddress()
public void setFormattedAddress(FormattedAddress formattedAddress)
formattedAddress - The full, unstructured address or null
to resetpublic boolean hasFormattedAddress()
public HouseName getHousename()
public void setHousename(HouseName housename)
housename - Used in places where houses or buildings have names or
null to resetpublic boolean hasHousename()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - Simple string value used to name this address or
null to resetpublic boolean hasLabel()
public java.lang.String getMailClass()
public void setMailClass(java.lang.String mailClass)
mailClass - The mail class or null to resetpublic boolean hasMailClass()
public Neighborhood getNeighborhood()
public void setNeighborhood(Neighborhood neighborhood)
neighborhood - Neighborhood. Used to disambiguate a street or
null to resetpublic boolean hasNeighborhood()
public PoBox getPobox()
public void setPobox(PoBox pobox)
pobox - P.O. box or null to resetpublic boolean hasPobox()
public PostCode getPostcode()
public void setPostcode(PostCode postcode)
postcode - Postal code or null to resetpublic boolean hasPostcode()
public java.lang.Boolean getPrimary()
public void setPrimary(java.lang.Boolean primary)
primary - whether this is the primary postal address or
null to resetpublic boolean hasPrimary()
public Region getRegion()
public void setRegion(Region region)
region - Region is state, province, county (in Ireland), Land (in
Germany), departement (in France), etc or null to resetpublic boolean hasRegion()
public java.lang.String getRel()
public void setRel(java.lang.String rel)
rel - the postal address type or null to resetpublic boolean hasRel()
public Street getStreet()
public void setStreet(Street street)
street - Can be street, avenue, road, etc. This element also includes
the house number and room/apartment/flat/floor number or
null to resetpublic boolean hasStreet()
public Subregion getSubregion()
public void setSubregion(Subregion subregion)
subregion - Subregion is county (US), province (in Italy), etc or
null to resetpublic boolean hasSubregion()
public java.lang.String getUsage()
public void setUsage(java.lang.String usage)
usage - The context for the address use or null to resetpublic boolean hasUsage()
protected void validate()
AbstractExtensionvalidate in class AbstractExtensionpublic static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
required - whether it is requiredrepeatable - whether it is repeatableprotected void putAttributes(AttributeGenerator generator)
AbstractExtensionAbstractExtension.generate(XmlWriter,ExtensionProfile). Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.putAttributes in class AbstractExtensiongenerator - attribute generatorprotected void consumeAttributes(AttributeHelper helper) throws ParseException
AbstractExtensionAttributeHelper.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.consumeAttributes in class AbstractExtensionhelper - attribute helperParseException - any parsing exceptionpublic java.lang.String toString()
toString in class java.lang.Object