Class NominatimGeocoderService
- java.lang.Object
-
- org.opennms.features.geocoder.nominatim.NominatimGeocoderService
-
- All Implemented Interfaces:
GeocoderService
public class NominatimGeocoderService extends Object implements GeocoderService
-
-
Constructor Summary
Constructors Constructor Description NominatimGeocoderService(NominatimConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NominatimConfiguration
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
-
NominatimGeocoderService
public NominatimGeocoderService(NominatimConfiguration 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 NominatimConfiguration 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.
-
-