Class DefaultGeolocationResolver
- java.lang.Object
-
- org.opennms.features.geolocation.services.DefaultGeolocationResolver
-
- All Implemented Interfaces:
GeolocationResolver
public class DefaultGeolocationResolver extends Object implements GeolocationResolver
-
-
Constructor Summary
Constructors Constructor Description DefaultGeolocationResolver(GeocoderServiceManager geocoderServiceManager, NodeDao nodeDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Coordinates
resolve(String addressString)
Resolves the given addressString.Map<Integer,Coordinates>
resolve(Collection<Integer> nodeIds)
Resolve the address string to coordinates for all nodes in nodeIds.Map<Integer,Coordinates>
resolve(Map<Integer,String> nodeIdAddressMap)
Resolves each entry's address to its coordinate.
-
-
-
Constructor Detail
-
DefaultGeolocationResolver
public DefaultGeolocationResolver(GeocoderServiceManager geocoderServiceManager, NodeDao nodeDao)
-
-
Method Detail
-
resolve
public Map<Integer,Coordinates> resolve(Collection<Integer> nodeIds)
Description copied from interface:GeolocationResolver
Resolve the address string to coordinates for all nodes in nodeIds.- Specified by:
resolve
in interfaceGeolocationResolver
- Parameters:
nodeIds
- The ids to resolve the address string to coordinates.- Returns:
- A Map (nodeId -> Coordinate) for all nodes in nodeIds which have a address defined.
-
resolve
public Map<Integer,Coordinates> resolve(Map<Integer,String> nodeIdAddressMap)
Description copied from interface:GeolocationResolver
Resolves each entry's address to its coordinate.- Specified by:
resolve
in interfaceGeolocationResolver
- Parameters:
nodeIdAddressMap
- Key: nodeId, Value: Address- Returns:
- A Map (nodeId -> Coordinates) for all nodes which id matches the keys of the map and have an address defined and
-
resolve
public Coordinates resolve(String addressString)
Description copied from interface:GeolocationResolver
Resolves the given addressString.- Specified by:
resolve
in interfaceGeolocationResolver
- Parameters:
addressString
- The address to resolve to coordinates.- Returns:
- The resolved coordinates.
-
-