com.lamatek.tags.google.beans
Class IntlAddressGeocoder

java.lang.Object
  extended by com.lamatek.tags.google.beans.IntlAddressGeocoder
All Implemented Interfaces:
Geocoder, java.io.Serializable

public class IntlAddressGeocoder
extends java.lang.Object
implements Geocoder, java.io.Serializable

IntlAddressGeocoder

Version:
0.40 This class takes an international address and attempts to geocode it to longitude/latitude using Maporama.com. Developers should not override this class, but rather should override the Geocoder.geocode() method to call the geocoder of their choice.
Author:
Tom Cole
See Also:
Serialized Form

Constructor Summary
IntlAddressGeocoder()
           
 
Method Summary
 boolean geocode()
          Attempts to geocode the location based on the current information.
 double getLatitude()
          Returns the latitude (in decimal form) of the location geocoded.
 double getLongitude()
          Returns the longitude (in decimal form) of the location geocoded.
 java.lang.String getPrecision()
          Returns any precision information provided by the underlying geocoder.
 java.lang.String getWarning()
          Returns any warnings given by the underlying geocoder.
 void setAddress(java.lang.String address)
          Sets the street address of the location to geocode.
 void setCity(java.lang.String city)
          Sets the city name of the location to geocode.
 void setCountry(java.lang.String country)
          Sets the country code for the location to geocode.
 void setState(java.lang.String state)
          Sets the state/province of the location to geocode.
 void setZip(java.lang.String zip)
          Sets the ZIP or Postal code of the location to geocode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntlAddressGeocoder

public IntlAddressGeocoder()
Method Detail

setAddress

public void setAddress(java.lang.String address)
Description copied from interface: Geocoder
Sets the street address of the location to geocode.

Specified by:
setAddress in interface Geocoder
Parameters:
address - A valid street address (i.e. 74 Connor Lane)

setCity

public void setCity(java.lang.String city)
Description copied from interface: Geocoder
Sets the city name of the location to geocode.

Specified by:
setCity in interface Geocoder
Parameters:
city - The US or Internation city name.

setState

public void setState(java.lang.String state)
Description copied from interface: Geocoder
Sets the state/province of the location to geocode.

Specified by:
setState in interface Geocoder
Parameters:
state - The US state or International province name.

setCountry

public void setCountry(java.lang.String country)
Description copied from interface: Geocoder
Sets the country code for the location to geocode.

Specified by:
setCountry in interface Geocoder
Parameters:
country - The ISO compliant 2-character country code.

setZip

public void setZip(java.lang.String zip)
Description copied from interface: Geocoder
Sets the ZIP or Postal code of the location to geocode.

Specified by:
setZip in interface Geocoder
Parameters:
zip - The US ZIP or International postal code.

geocode

public boolean geocode()
Description copied from interface: Geocoder
Attempts to geocode the location based on the current information.

Specified by:
geocode in interface Geocoder
Returns:
True if the geocoding was successful or false if it was not.

getLongitude

public double getLongitude()
Description copied from interface: Geocoder
Returns the longitude (in decimal form) of the location geocoded.

Specified by:
getLongitude in interface Geocoder
Returns:
The longitude (in decimal form) of the location as a double.

getLatitude

public double getLatitude()
Description copied from interface: Geocoder
Returns the latitude (in decimal form) of the location geocoded.

Specified by:
getLatitude in interface Geocoder
Returns:
The latitude (in decimal form) of the location as a double.

getPrecision

public java.lang.String getPrecision()
Description copied from interface: Geocoder
Returns any precision information provided by the underlying geocoder. If none is present, or the coder does not support this feature, then this method will return null.

Specified by:
getPrecision in interface Geocoder
Returns:
Any precision information or null if none is available.

getWarning

public java.lang.String getWarning()
Description copied from interface: Geocoder
Returns any warnings given by the underlying geocoder.

Specified by:
getWarning in interface Geocoder
Returns:
Any warning information or null if none is available.