Class GoogleGeocoderService
- java.lang.Object
-
- org.opennms.features.geocoder.google.GoogleGeocoderService
-
- All Implemented Interfaces:
GeocoderService
public class GoogleGeocoderService extends Object implements GeocoderService
-
-
Constructor Summary
Constructors Constructor Description GoogleGeocoderService(GoogleConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GoogleConfigurationgetConfiguration()Returns configuration of theGeocoderService.StringgetId()A unique identifier for thisGeocoderService.GeocoderResultresolveAddress(String address)Resolves the given address string to valid coordinates.voidvalidateConfiguration(Map<String,Object> properties)Validates the provided configuration properties.
-
-
-
Constructor Detail
-
GoogleGeocoderService
public GoogleGeocoderService(GoogleConfiguration configuration)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:GeocoderServiceA unique identifier for thisGeocoderService.- Specified by:
getIdin interfaceGeocoderService- Returns:
- The unique identifier for this
GeocoderService.
-
resolveAddress
public GeocoderResult resolveAddress(String address) throws GeocoderConfigurationException
Description copied from interface:GeocoderServiceResolves the given address string to valid coordinates. Originally it returned only theCoordinatesbut that makes it hard to distinguish if there was no valid address or an exception occurred.- Specified by:
resolveAddressin interfaceGeocoderService- Parameters:
address- The address to resolve- Returns:
- The result of the resolution
- Throws:
GeocoderConfigurationException
-
getConfiguration
public GoogleConfiguration getConfiguration()
Description copied from interface:GeocoderServiceReturns configuration of theGeocoderService.- Specified by:
getConfigurationin interfaceGeocoderService- Returns:
- configuration.
-
validateConfiguration
public void validateConfiguration(Map<String,Object> properties) throws GeocoderConfigurationException
Description copied from interface:GeocoderServiceValidates the provided configuration properties.- Specified by:
validateConfigurationin interfaceGeocoderService- Parameters:
properties- to validate- Throws:
GeocoderConfigurationException- in case the configuration is invalid.
-
-