Package org.opennms.features.geocoder
Interface GeocoderService
-
- All Known Implementing Classes:
GoogleGeocoderService
,MapquestGeocoderService
,NominatimGeocoderService
public interface GeocoderService
AGeocoderService
capable of resolving an address string to actual coordinates.- Author:
- mvrueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GeocoderConfiguration
getConfiguration()
Returns configuration of theGeocoderService
.java.lang.String
getId()
A unique identifier for thisGeocoderService
.GeocoderResult
resolveAddress(java.lang.String address)
Resolves the given address string to valid coordinates.void
validateConfiguration(java.util.Map<java.lang.String,java.lang.Object> properties)
Validates the provided configuration properties.
-
-
-
Method Detail
-
getId
java.lang.String getId()
A unique identifier for thisGeocoderService
.- Returns:
- The unique identifier for this
GeocoderService
.
-
resolveAddress
GeocoderResult resolveAddress(java.lang.String address) throws GeocoderConfigurationException
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.- Parameters:
address
- The address to resolve- Returns:
- The result of the resolution
- Throws:
GeocoderException
GeocoderConfigurationException
-
getConfiguration
GeocoderConfiguration getConfiguration()
Returns configuration of theGeocoderService
.- Returns:
- configuration.
-
validateConfiguration
void validateConfiguration(java.util.Map<java.lang.String,java.lang.Object> properties) throws GeocoderConfigurationException
Validates the provided configuration properties.- Parameters:
properties
- to validate- Throws:
GeocoderConfigurationException
- in case the configuration is invalid.
-
-