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