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 GoogleConfiguration
getConfiguration()
Returns configuration of theGeocoderService
.String
getId()
A unique identifier for thisGeocoderService
.GeocoderResult
resolveAddress(String address)
Resolves the given address string to valid coordinates.void
validateConfiguration(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:GeocoderService
A unique identifier for thisGeocoderService
.- Specified by:
getId
in interfaceGeocoderService
- Returns:
- The unique identifier for this
GeocoderService
.
-
resolveAddress
public GeocoderResult resolveAddress(String address) throws GeocoderConfigurationException
Description copied from interface:GeocoderService
Resolves the given address string to valid coordinates. Originally it returned only theCoordinates
but that makes it hard to distinguish if there was no valid address or an exception occurred.- Specified by:
resolveAddress
in interfaceGeocoderService
- Parameters:
address
- The address to resolve- Returns:
- The result of the resolution
- Throws:
GeocoderConfigurationException
-
getConfiguration
public GoogleConfiguration getConfiguration()
Description copied from interface:GeocoderService
Returns configuration of theGeocoderService
.- Specified by:
getConfiguration
in interfaceGeocoderService
- Returns:
- configuration.
-
validateConfiguration
public void validateConfiguration(Map<String,Object> properties) throws GeocoderConfigurationException
Description copied from interface:GeocoderService
Validates the provided configuration properties.- Specified by:
validateConfiguration
in interfaceGeocoderService
- Parameters:
properties
- to validate- Throws:
GeocoderConfigurationException
- in case the configuration is invalid.
-
-