KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lamatek > tags > google > beans > Geocoder


1 package com.lamatek.tags.google.beans;
2
3 /**
4  * Geocoder
5  * @author Tom Cole
6  * @version 0.40
7  *
8  * Parent interface for all address based geocoders.
9  */

10 public interface Geocoder {
11     /**
12      * Sets the street address of the location to geocode.
13      *
14      * @param address A valid street address (i.e. 74 Connor Lane)
15      */

16     public abstract void setAddress(String JavaDoc address);
17     /**
18      * Sets the city name of the location to geocode.
19      *
20      * @param city The US or Internation city name.
21      */

22     public abstract void setCity(String JavaDoc city);
23     /**
24      * Sets the state/province of the location to geocode.
25      *
26      * @param state The US state or International province name.
27      */

28     public abstract void setState(String JavaDoc state);
29     /**
30      * Sets the ZIP or Postal code of the location to geocode.
31      *
32      * @param zip The US ZIP or International postal code.
33      */

34     public abstract void setZip(String JavaDoc zip);
35     /**
36      * Sets the country code for the location to geocode.
37      *
38      * @param country The ISO compliant 2-character country code.
39      */

40     public abstract void setCountry(String JavaDoc country);
41     /**
42      * Returns the longitude (in decimal form) of the location
43      * geocoded.
44      *
45      * @return The longitude (in decimal form) of the location as a double.
46      */

47     public abstract double getLongitude();
48     /**
49      * Returns the latitude (in decimal form) of the location
50      * geocoded.
51      *
52      * @return The latitude (in decimal form) of the location as a double.
53      */

54     public abstract double getLatitude();
55     /**
56      * Attempts to geocode the location based on the current information.
57      *
58      * @return True if the geocoding was successful or false if it was not.
59      */

60     public abstract boolean geocode();
61     /**
62      * Returns any precision information provided by the underlying geocoder.
63      * If none is present, or the coder does not support this feature, then
64      * this method will return null.
65      *
66      * @return Any precision information or null if none is available.
67      */

68     public abstract String JavaDoc getPrecision();
69     /**
70      * Returns any warnings given by the underlying geocoder.
71      *
72      * @return Any warning information or null if none is available.
73      */

74     public abstract String JavaDoc getWarning();
75 }
76
Popular Tags