public class KiezatlasPlugin extends de.deepamehta.core.osgi.PluginActivator implements KiezatlasService, de.deepamehta.core.service.event.PostUpdateTopicListener, de.deepamehta.core.service.event.PreSendTopicListener
BEZIRKSREGION_FACET, GEO_COORDINATE_FACET, GEO_OBJECT, GEO_OBJECT_ADDRESS, GEO_OBJECT_NAME, IMAGE_FACET, IMAGE_PATH, KIEZATLAS_WORKSPACE_NAME, KIEZATLAS_WORKSPACE_SHARING_MODE, KIEZATLAS_WORKSPACE_URI, WEBSITE, WEBSITE_TITLE
Constructor and Description |
---|
KiezatlasPlugin() |
Modifier and Type | Method and Description |
---|---|
de.deepamehta.core.Association |
addGeoObjectToWebsite(long geoObjectId,
long siteId)
Useful to create a standard association between a "Geo object" topic and a "Site" topic.
|
de.deepamehta.core.Association |
addGeoObjectToWebsite(de.deepamehta.core.Topic geoObject,
de.deepamehta.core.Topic website)
Creates an assignment between a Kiezatlas Geo Object and the given Kiezatlas Website.
|
de.deepamehta.core.Topic |
createKiezatlasWebsite(String siteName,
String siteUri)
Service method to create unique "Kiezatlas Website" topics.
|
de.deepamehta.core.Topic |
createWebsite(String siteName,
String siteUri)
Useful to create a new or load an existing "Site" topic (by its uri).
|
de.deepamehta.core.Topic |
enrichWithFacets(de.deepamehta.core.Topic geoObject,
long websiteId)
Utility to enrich the given Geo Object with the facets configured for the given Kiezatlas Website.
|
List<de.deepamehta.core.RelatedTopic> |
getAggregatingGeoObjects(de.deepamehta.core.Topic bezirksFacet)
Fetches the Geo Object for any of its aggregated childs.
|
List<de.deepamehta.core.Topic> |
getAllCriteria()
Returns all Kiezatlas criteria existing in the DB.
|
de.deepamehta.core.Topic |
getDomainTopicByGeoCoordinate(de.deepamehta.core.Topic geoCoords)
Fetches the domain topic a Geo Coordinate topic.
|
List<de.deepamehta.core.TopicType> |
getFacetTopicTypes(long websiteId)
Returns the facet type definitions assigned to the given Kiezatlas Website.
|
List<de.deepamehta.core.RelatedTopic> |
getFacetTypes(long websiteId)
Returns the facet types assigned to the given Kiezatlas Website.
|
de.deepamehta.geomaps.model.GeoCoordinate |
getGeoCoordinateByGeoObject(de.deepamehta.core.Topic geoObject)
Fetches the "Geo Coordinate" facet related to the given Geo Object.
|
de.deepamehta.core.Topic |
getGeoCoordinateFacet(de.deepamehta.core.Topic addressTopic)
Fetches the geo coordinate topic for the given topic.
|
de.deepamehta.core.Topic |
getGeoObjectByGeoCoordinate(de.deepamehta.core.Topic geoCoords)
Fetches a Geo Object by a Geo Coordinate topic.
|
List<de.deepamehta.core.Topic> |
getGeoObjects(long geomapId)
Returns all Geo Objects assigned to the given "Geomap" (a special kind of "Topicmap").
|
List<de.deepamehta.core.RelatedTopic> |
getGeoObjectsByCategory(long categoryId)
Returns all "Geo Objects" associated (aggregated, parent) with the given category.
|
List<de.deepamehta.core.RelatedTopic> |
getGeoObjectsBySite(long siteId)
Returns all "Geo Objects" associated (parent) with the given Kiezatlas Website.
|
String |
getKiezatlasWorkspaceMember() |
long |
getStandardWorkspaceId() |
de.deepamehta.core.Topic |
getWebsite(long geomapId)
Returns the "Kiezatlas Website" topic the given geomap is assigned to.
|
boolean |
isAssignedToKiezatlasWebsite(de.deepamehta.core.Topic geoObject,
de.deepamehta.core.Topic website)
Utility to check if the given Geo Object is assigned to the given Kiezatlas Website.
|
boolean |
isKiezatlasWorkspaceMember()
Utility method to check if the requesting user is a member of the "Kiezatlas" workspace.
|
boolean |
isKiezatlasWorkspaceMember(de.deepamehta.core.Topic username)
Utility method to check if the requesting user is a member of the "Kiezatlas" workspace.
|
void |
postUpdateTopic(de.deepamehta.core.Topic topic,
de.deepamehta.core.model.TopicModel newModel,
de.deepamehta.core.model.TopicModel oldModel) |
void |
preSendTopic(de.deepamehta.core.Topic topic)
------------------------------------------ Listener Implementations ------------------------------------
|
void |
removeGeoObjectFromWebsite(long geoObjectId,
long siteId)
Useful to create a standard association between a "Geo object" topic and a "Site" topic.
|
void |
removeGeoObjectFromWebsite(de.deepamehta.core.Topic geoObject,
de.deepamehta.core.Topic website)
Removes an assignment between a Kiezatlas Geo Object and the given Kiezatlas Website.
|
GroupedGeoObjects |
searchCategories(String searchTerm,
long clock)
Searches for categories (topics with typeUri="ka2.criteria.*" introduced via dm4-kiezatlas-etl)
that match the search term (case-insensitive substring search) and returns all Geo Objects of
those categories, grouped by category.
|
GeoObjects |
searchGeoObjectNames(String searchTerm,
long clock)
Searches for Geo Objects whose name match the search term (case-insensitive substring search).
|
void |
updateFacets(long geoObjectId,
List<de.deepamehta.core.RelatedTopic> facetTypes,
de.deepamehta.core.model.TopicModel newModel)
Method to update the facet values configured for the given Kiezatlas Website on the Geo Object.
|
public de.deepamehta.core.Topic createWebsite(String siteName, String siteUri)
siteName
- siteUri
- public void removeGeoObjectFromWebsite(long geoObjectId, long siteId)
geoObjectId
- siteId
- public de.deepamehta.core.Association addGeoObjectToWebsite(long geoObjectId, long siteId)
geoObjectId
- siteId
- public de.deepamehta.core.Topic getWebsite(long geomapId)
KiezatlasService
getWebsite
in interface KiezatlasService
public List<de.deepamehta.core.RelatedTopic> getFacetTypes(long websiteId)
KiezatlasService
getFacetTypes
in interface KiezatlasService
public List<de.deepamehta.core.TopicType> getFacetTopicTypes(long websiteId)
KiezatlasService
getFacetTopicTypes
in interface KiezatlasService
public List<de.deepamehta.core.RelatedTopic> getGeoObjectsBySite(long siteId)
KiezatlasService
getGeoObjectsBySite
in interface KiezatlasService
public List<de.deepamehta.core.Topic> getAllCriteria()
KiezatlasService
ka2.criteria.
but does not end with .facet
.getAllCriteria
in interface KiezatlasService
public List<de.deepamehta.core.Topic> getGeoObjects(long geomapId)
KiezatlasService
getGeoObjects
in interface KiezatlasService
public List<de.deepamehta.core.RelatedTopic> getGeoObjectsByCategory(long categoryId)
KiezatlasService
getGeoObjectsByCategory
in interface KiezatlasService
public String getKiezatlasWorkspaceMember()
public long getStandardWorkspaceId()
getStandardWorkspaceId
in interface KiezatlasService
public GeoObjects searchGeoObjectNames(String searchTerm, long clock)
KiezatlasService
searchGeoObjectNames
in interface KiezatlasService
clock
- The logical clock value send back to the client (contained in GeoObjects).
Allows the client to order asynchronous responses.public GroupedGeoObjects searchCategories(String searchTerm, long clock)
KiezatlasService
searchCategories
in interface KiezatlasService
clock
- The logical clock value send back to the client (contained in GroupedGeoObjects).
Allows the client to order asynchronous responses.public de.deepamehta.core.Topic createKiezatlasWebsite(String siteName, String siteUri)
KiezatlasService
createKiezatlasWebsite
in interface KiezatlasService
public de.deepamehta.core.Association addGeoObjectToWebsite(de.deepamehta.core.Topic geoObject, de.deepamehta.core.Topic website)
KiezatlasService
addGeoObjectToWebsite
in interface KiezatlasService
public void removeGeoObjectFromWebsite(de.deepamehta.core.Topic geoObject, de.deepamehta.core.Topic website)
KiezatlasService
removeGeoObjectFromWebsite
in interface KiezatlasService
public de.deepamehta.geomaps.model.GeoCoordinate getGeoCoordinateByGeoObject(de.deepamehta.core.Topic geoObject)
KiezatlasService
getGeoCoordinateByGeoObject
in interface KiezatlasService
public de.deepamehta.core.Topic getGeoObjectByGeoCoordinate(de.deepamehta.core.Topic geoCoords)
KiezatlasService
getGeoObjectByGeoCoordinate
in interface KiezatlasService
public de.deepamehta.core.Topic getDomainTopicByGeoCoordinate(de.deepamehta.core.Topic geoCoords)
KiezatlasService
getDomainTopicByGeoCoordinate
in interface KiezatlasService
public de.deepamehta.core.Topic getGeoCoordinateFacet(de.deepamehta.core.Topic addressTopic)
KiezatlasService
getGeoCoordinateFacet
in interface KiezatlasService
null
if no geo coordinate is stored.public List<de.deepamehta.core.RelatedTopic> getAggregatingGeoObjects(de.deepamehta.core.Topic bezirksFacet)
KiezatlasService
getAggregatingGeoObjects
in interface KiezatlasService
public boolean isAssignedToKiezatlasWebsite(de.deepamehta.core.Topic geoObject, de.deepamehta.core.Topic website)
KiezatlasService
isAssignedToKiezatlasWebsite
in interface KiezatlasService
public boolean isKiezatlasWorkspaceMember()
KiezatlasService
isKiezatlasWorkspaceMember
in interface KiezatlasService
public boolean isKiezatlasWorkspaceMember(de.deepamehta.core.Topic username)
KiezatlasService
isKiezatlasWorkspaceMember
in interface KiezatlasService
public de.deepamehta.core.Topic enrichWithFacets(de.deepamehta.core.Topic geoObject, long websiteId)
KiezatlasService
enrichWithFacets
in interface KiezatlasService
public void updateFacets(long geoObjectId, List<de.deepamehta.core.RelatedTopic> facetTypes, de.deepamehta.core.model.TopicModel newModel)
KiezatlasService
updateFacets
in interface KiezatlasService
public void preSendTopic(de.deepamehta.core.Topic topic)
preSendTopic
in interface de.deepamehta.core.service.event.PreSendTopicListener
public void postUpdateTopic(de.deepamehta.core.Topic topic, de.deepamehta.core.model.TopicModel newModel, de.deepamehta.core.model.TopicModel oldModel)
postUpdateTopic
in interface de.deepamehta.core.service.event.PostUpdateTopicListener
Copyright © 2018. All rights reserved.