com.sun.j2ee.blueprints.ui.geocoder
Class GeoCoder

java.lang.Object
  extended bycom.sun.j2ee.blueprints.ui.geocoder.GeoCoder

public class GeoCoder
extends java.lang.Object

Service object that interacts with the Yahoo GeoCoding service. For information on the relevant APIs, see http://developer.yahoo.net/maps/rest/V1/geocode.html.


Constructor Summary
GeoCoder()
           
 
Method Summary
 GeoPoint[] geoCode(java.lang.String location)
          Return an array of zero or more GeoPoint instances for results that match a search for the specified location string.
 java.lang.String getApplicationId()
          Return the application identifier to be passed to the geocoding service.
 java.lang.String getProxyHost()
          Return the proxy host to use for network connections, or null if the default proxy host for the application server's JVM should be used instead.
 int getProxyPort()
          Return the proxy port to use for network connections, or 0 if the default proxy port for the application server's JVM should be used instead.
 void setApplicationId(java.lang.String applicationId)
          Set the application identifier to be passed to the geocoding service.
 void setProxyHost(java.lang.String proxyHost)
          Set the proxy host to use for network connections, or null to use the default proxy host for the application server's JVM.
 void setProxyPort(int proxyPort)
          Set the proxy port to use for network connections, or 0 to use the default proxy port for the application server's JVM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoCoder

public GeoCoder()
Method Detail

getApplicationId

public java.lang.String getApplicationId()

Return the application identifier to be passed to the geocoding service.


setApplicationId

public void setApplicationId(java.lang.String applicationId)

Set the application identifier to be passed to the geocoding service.

Parameters:
applicationId - The new application identifier

getProxyHost

public java.lang.String getProxyHost()

Return the proxy host to use for network connections, or null if the default proxy host for the application server's JVM should be used instead.


setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Set the proxy host to use for network connections, or null to use the default proxy host for the application server's JVM.

Parameters:
proxyHost - The new proxy host

getProxyPort

public int getProxyPort()

Return the proxy port to use for network connections, or 0 if the default proxy port for the application server's JVM should be used instead.


setProxyPort

public void setProxyPort(int proxyPort)
Set the proxy port to use for network connections, or 0 to use the default proxy port for the application server's JVM.

Parameters:
proxyPort - The new proxy port

geoCode

public GeoPoint[] geoCode(java.lang.String location)

Return an array of zero or more GeoPoint instances for results that match a search for the specified location string. This string can be formatted in any of the following ways:

Parameters:
location - Location string to search for
Throws:
java.lang.IllegalArgumentException - if location does not conform to one of the specified patterns
java.lang.NullPointerException - if location is null