org.apache.shindig.social.core.model
Class AddressImpl

java.lang.Object
  extended by org.apache.shindig.social.core.model.AddressImpl
All Implemented Interfaces:
Address

public class AddressImpl
extends Object
implements Address

Default representation of an Address


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.shindig.social.opensocial.model.Address
Address.Field
 
Constructor Summary
AddressImpl()
           
AddressImpl(String formatted)
           
 
Method Summary
 String getCountry()
          Get the country.
 String getFormatted()
          Get the formatted address.
 Float getLatitude()
          Get the latitude.
 String getLocality()
          Get the locality.
 Float getLongitude()
          Get the longitude of the address in degrees.
 String getPostalCode()
          Get the Postal code for the address.
 Boolean getPrimary()
           Get a Boolean value indicating whether this instance of the Plural Field is the primary or preferred value of for this field, e.g.
 String getRegion()
          Get the region.
 String getStreetAddress()
          Get the street address.
 String getType()
          Get the type of label of the address.
 void setCountry(String country)
          Set the country.
 void setFormatted(String formatted)
          Set the formatted address.
 void setLatitude(Float latitude)
          Set the latitude.
 void setLocality(String locality)
          Set the locality.
 void setLongitude(Float longitude)
          Set the longitude of the address in degrees.
 void setPostalCode(String postalCode)
          Set the postal code for the address.
 void setPrimary(Boolean primary)
          
 void setRegion(String region)
          Set the region.
 void setStreetAddress(String streetAddress)
          Set the street address.
 void setType(String type)
          Get the type of label of the address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressImpl

public AddressImpl()

AddressImpl

public AddressImpl(String formatted)
Method Detail

getCountry

public String getCountry()
Description copied from interface: Address
Get the country.

Specified by:
getCountry in interface Address
Returns:
the country

setCountry

public void setCountry(String country)
Set the country.

Specified by:
setCountry in interface Address
Parameters:
country - the country

getLatitude

public Float getLatitude()
Description copied from interface: Address
Get the latitude.

Specified by:
getLatitude in interface Address
Returns:
latitude

setLatitude

public void setLatitude(Float latitude)
Set the latitude.

Specified by:
setLatitude in interface Address
Parameters:
latitude - latitude

getLocality

public String getLocality()
Description copied from interface: Address
Get the locality.

Specified by:
getLocality in interface Address
Returns:
the locality

setLocality

public void setLocality(String locality)
Set the locality.

Specified by:
setLocality in interface Address
Parameters:
locality - the locality

getLongitude

public Float getLongitude()
Description copied from interface: Address
Get the longitude of the address in degrees.

Specified by:
getLongitude in interface Address
Returns:
the longitude of the address in degrees

setLongitude

public void setLongitude(Float longitude)
Set the longitude of the address in degrees.

Specified by:
setLongitude in interface Address
Parameters:
longitude - the longitude of the address in degrees.

getPostalCode

public String getPostalCode()
Description copied from interface: Address
Get the Postal code for the address.

Specified by:
getPostalCode in interface Address
Returns:
the postal code for the address

setPostalCode

public void setPostalCode(String postalCode)
Set the postal code for the address.

Specified by:
setPostalCode in interface Address
Parameters:
postalCode - the postal code

getRegion

public String getRegion()
Description copied from interface: Address
Get the region.

Specified by:
getRegion in interface Address
Returns:
the region

setRegion

public void setRegion(String region)
Set the region.

Specified by:
setRegion in interface Address
Parameters:
region - the region

getStreetAddress

public String getStreetAddress()
Description copied from interface: Address
Get the street address.

Specified by:
getStreetAddress in interface Address
Returns:
the street address

setStreetAddress

public void setStreetAddress(String streetAddress)
Set the street address.

Specified by:
setStreetAddress in interface Address
Parameters:
streetAddress - the street address

getType

public String getType()
Description copied from interface: Address
Get the type of label of the address.

Specified by:
getType in interface Address
Returns:
the type or label of the address

setType

public void setType(String type)
Get the type of label of the address.

Specified by:
setType in interface Address
Parameters:
type - the type of label of the address.

getFormatted

public String getFormatted()
Description copied from interface: Address
Get the formatted address.

Specified by:
getFormatted in interface Address
Returns:
the formatted address

setFormatted

public void setFormatted(String formatted)
Set the formatted address.

Specified by:
setFormatted in interface Address
Parameters:
formatted - the formatted address

getPrimary

public Boolean getPrimary()
Description copied from interface: Address

Get a Boolean value indicating whether this instance of the Plural Field is the primary or preferred value of for this field, e.g. the preferred mailing address. Service Providers MUST NOT mark more than one instance of the same Plural Field as primary="true", and MAY choose not to mark any fields as primary, if this information is not available. Introduced in v0.8.1

The service provider may wish to share the address instance between items and primary related to the address from which this came, so if the address came from an Organization, primary relates to the primary address of the organization, and not necessary the primary address of all addresses.

If the address is not part of a list (eg Person.location ) primary has no meaning.

Specified by:
getPrimary in interface Address
Returns:
true if the instance if the primary instance.

setPrimary

public void setPrimary(Boolean primary)

Specified by:
setPrimary in interface Address
Parameters:
primary - set the Primary status of this Address.
See Also:
Address.getPrimary()


Copyright © 2007-2012. All Rights Reserved.