org.opengts.geocoder.gisgraphy
Class GisGraphy

java.lang.Object
  extended by org.opengts.geocoder.ReverseGeocodeProviderAdapter
      extended by org.opengts.geocoder.gisgraphy.GisGraphy
All Implemented Interfaces:
ReverseGeocodeProvider, SubdivisionProvider

public class GisGraphy
extends ReverseGeocodeProviderAdapter
implements ReverseGeocodeProvider, SubdivisionProvider


Field Summary
protected static java.lang.String ENCODING_UTF8
           
protected static java.lang.String HOST_FAILOVER
           
protected static java.lang.String HOST_PRIMARY
           
protected static double MAX_ADDRESS_DISTANCE_KM
           
protected static java.lang.String PROP_failoverHost
           
protected static java.lang.String PROP_geolocURL
           
protected static java.lang.String PROP_hostName
           
protected static java.lang.String PROP_radiusKM
           
protected static java.lang.String PROP_streetURL
           
protected static int SERVICE_TIMEOUT_MS
           
protected static java.lang.String TAG_adm1Code
           
protected static java.lang.String TAG_adm1Name
           
protected static java.lang.String TAG_countryCode
           
protected static java.lang.String TAG_name
           
protected static java.lang.String TAG_QTime
           
protected static java.lang.String TAG_result
           
protected static java.lang.String TAG_results
           
 
Fields inherited from class org.opengts.geocoder.ReverseGeocodeProviderAdapter
_PROP_isEnabled, DEFAULT_MAX_FAILOVER_SECONDS, MIN_FAILOVER_SECONDS, PROP_alwaysFast, PROP_maxFailoverSeconds, PROP_ReverseGeocodeProvider_
 
Constructor Summary
GisGraphy(java.lang.String name, java.lang.String key, RTProperties rtProps)
          Constructor
 
Method Summary
protected static java.lang.String GetNodeText(org.w3c.dom.Node root)
           
 ReverseGeocode getReverseGeocode(GeoPoint gp, java.lang.String localeStr, boolean cache)
          Returns a ReverseGeocode instance for the specified GeoPoint
 java.lang.String getSubdivision(GeoPoint gp)
          Return the subdivision of the specified point (in the US, this is "US/" as in "US/CA")
 boolean isFastOperation()
          Returns true if locally resolved, false otherwise.
static void main(java.lang.String[] argv)
          Main entery point for debugging/testing
 
Methods inherited from class org.opengts.geocoder.ReverseGeocodeProviderAdapter
_getUserPass, _main, getAuthorization, getFailoverReverseGeocodeProvider, getFailoverReverseGeocodeProviderName, getMaximumFailoverElapsedSec, getName, getPassword, getProperties, getUsername, hasFailoverReverseGeocodeProvider, isEnabled, isReverseGeocodeFailoverMode, setAuthorization, setFailoverReverseGeocodeProvider, setName, setProperties, startReverseGeocodeFailoverMode, startReverseGeocodeFailoverMode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengts.geocoder.ReverseGeocodeProvider
getFailoverReverseGeocodeProvider, getName, isEnabled, setFailoverReverseGeocodeProvider
 

Field Detail

TAG_results

protected static final java.lang.String TAG_results
See Also:
Constant Field Values

TAG_result

protected static final java.lang.String TAG_result
See Also:
Constant Field Values

TAG_QTime

protected static final java.lang.String TAG_QTime
See Also:
Constant Field Values

TAG_name

protected static final java.lang.String TAG_name
See Also:
Constant Field Values

TAG_adm1Code

protected static final java.lang.String TAG_adm1Code
See Also:
Constant Field Values

TAG_adm1Name

protected static final java.lang.String TAG_adm1Name
See Also:
Constant Field Values

TAG_countryCode

protected static final java.lang.String TAG_countryCode
See Also:
Constant Field Values

PROP_streetURL

protected static final java.lang.String PROP_streetURL
See Also:
Constant Field Values

PROP_geolocURL

protected static final java.lang.String PROP_geolocURL
See Also:
Constant Field Values

PROP_hostName

protected static final java.lang.String PROP_hostName
See Also:
Constant Field Values

PROP_failoverHost

protected static final java.lang.String PROP_failoverHost
See Also:
Constant Field Values

PROP_radiusKM

protected static final java.lang.String PROP_radiusKM
See Also:
Constant Field Values

HOST_PRIMARY

protected static java.lang.String HOST_PRIMARY

HOST_FAILOVER

protected static java.lang.String HOST_FAILOVER

SERVICE_TIMEOUT_MS

protected static int SERVICE_TIMEOUT_MS

MAX_ADDRESS_DISTANCE_KM

protected static final double MAX_ADDRESS_DISTANCE_KM
See Also:
Constant Field Values

ENCODING_UTF8

protected static final java.lang.String ENCODING_UTF8
See Also:
Constant Field Values
Constructor Detail

GisGraphy

public GisGraphy(java.lang.String name,
                 java.lang.String key,
                 RTProperties rtProps)
Constructor

Parameters:
name - The name assigned to this ReverseGeocodeProvider
key - The optional authorization key
rtProps - The properties associated with this ReverseGeocodeProvider
Method Detail

isFastOperation

public boolean isFastOperation()
Returns true if locally resolved, false otherwise. (ie. remote address resolution takes more than 20ms to complete)

Specified by:
isFastOperation in interface ReverseGeocodeProvider
Specified by:
isFastOperation in interface SubdivisionProvider
Overrides:
isFastOperation in class ReverseGeocodeProviderAdapter
Returns:
true if locally resolved, false otherwise.

getReverseGeocode

public ReverseGeocode getReverseGeocode(GeoPoint gp,
                                        java.lang.String localeStr,
                                        boolean cache)
Returns a ReverseGeocode instance for the specified GeoPoint

Specified by:
getReverseGeocode in interface ReverseGeocodeProvider
Specified by:
getReverseGeocode in class ReverseGeocodeProviderAdapter
Parameters:
gp - The GeoPoint
Returns:
The ReverseGeocode instance

getSubdivision

public java.lang.String getSubdivision(GeoPoint gp)
Description copied from interface: SubdivisionProvider
Return the subdivision of the specified point (in the US, this is "US/" as in "US/CA")

Specified by:
getSubdivision in interface SubdivisionProvider

GetNodeText

protected static java.lang.String GetNodeText(org.w3c.dom.Node root)

main

public static void main(java.lang.String[] argv)
Main entery point for debugging/testing