public class GeomapsPlugin extends de.deepamehta.core.osgi.PluginActivator implements GeomapsService, de.deepamehta.core.service.event.PostCreateTopicListener, de.deepamehta.core.service.event.PostUpdateTopicListener, de.deepamehta.core.service.event.PreSendTopicListener
| Constructor and Description |
|---|
GeomapsPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCoordinateToGeomap(long geomapId,
long geoCoordId)
Adds a Geo Coordinate topic to a geomap.
|
GeoCoordinate |
geoCoordinate(de.deepamehta.core.Topic geoCoordTopic)
Returns the geo coordinate encoded in a Geo Coordinate topic.
|
double |
getDistance(GeoCoordinate coord1,
GeoCoordinate coord2)
Calculates the distance between 2 geo coordinates in kilometer.
|
de.deepamehta.core.Topic |
getDomainTopic(long geoCoordId)
Finds the domain topic that corresponds to a Geo Coordinate topic.
|
GeoCoordinate |
getGeoCoordinate(de.deepamehta.core.Topic geoTopic)
Returns the geo coordinate of a geo-facetted topic (e.g.
|
Geomap |
getGeomap(long geomapId) |
void |
init() |
void |
postCreateTopic(de.deepamehta.core.Topic topic) |
void |
postUpdateTopic(de.deepamehta.core.Topic topic,
de.deepamehta.core.model.TopicModel updateModel,
de.deepamehta.core.model.TopicModel oldTopic) |
void |
preSendTopic(de.deepamehta.core.Topic topic)
Enriches an Address topic with its geo coordinate.
|
<V> V |
runWithoutGeocoding(Callable<V> callable)
Executes the passed codeblock and suppresses geocoding for Address topics created/updated while execution.
|
void |
setGeomapState(long geomapId,
double lon,
double lat,
int zoom) |
public Geomap getGeomap(long geomapId)
getGeomap in interface GeomapsServicepublic de.deepamehta.core.Topic getDomainTopic(long geoCoordId)
GeomapsServicegetDomainTopic in interface GeomapsServicepublic GeoCoordinate getGeoCoordinate(de.deepamehta.core.Topic geoTopic)
GeomapsServicenull if no geo coordinate is stored.getGeoCoordinate in interface GeomapsServicenull.public GeoCoordinate geoCoordinate(de.deepamehta.core.Topic geoCoordTopic)
GeomapsServicegeoCoordinate in interface GeomapsServicepublic void addCoordinateToGeomap(long geomapId,
long geoCoordId)
GeomapsServiceaddCoordinateToGeomap in interface GeomapsServicepublic void setGeomapState(long geomapId,
double lon,
double lat,
int zoom)
setGeomapState in interface GeomapsServicepublic double getDistance(GeoCoordinate coord1, GeoCoordinate coord2)
GeomapsServicegetDistance in interface GeomapsServicepublic <V> V runWithoutGeocoding(Callable<V> callable) throws Exception
GeomapsServicerunWithoutGeocoding in interface GeomapsServiceExceptionpublic void init()
init in interface de.deepamehta.core.osgi.PluginContextinit in class de.deepamehta.core.osgi.PluginActivatorpublic void postCreateTopic(de.deepamehta.core.Topic topic)
postCreateTopic in interface de.deepamehta.core.service.event.PostCreateTopicListenerpublic void postUpdateTopic(de.deepamehta.core.Topic topic,
de.deepamehta.core.model.TopicModel updateModel,
de.deepamehta.core.model.TopicModel oldTopic)
postUpdateTopic in interface de.deepamehta.core.service.event.PostUpdateTopicListenerpublic void preSendTopic(de.deepamehta.core.Topic topic)
preSendTopic in interface de.deepamehta.core.service.event.PreSendTopicListenerCopyright © 2017. All rights reserved.