de.deepamehta.plugins.kiezatlas
Class KiezatlasPlugin

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.osgi.PluginActivator
      extended by de.deepamehta.plugins.kiezatlas.KiezatlasPlugin
All Implemented Interfaces:
PluginContext, PostUpdateTopicListener, PreSendTopicListener, Listener, org.osgi.framework.BundleActivator

public class KiezatlasPlugin
extends PluginActivator
implements PostUpdateTopicListener, PreSendTopicListener


Field Summary
private  FacetsService facetsService
           
private  GeomapsService geomapsService
           
private  Logger logger
           
private static String ROLE_TYPE_FACET_TYPE
           
private static String ROLE_TYPE_GEOMAP
           
private static String ROLE_TYPE_WEBSITE
           
private static String WEBSITE_FACET_TYPES
           
private static String WEBSITE_GEOMAP
           
 
Fields inherited from class de.deepamehta.core.osgi.PluginActivator
bundle, dms
 
Constructor Summary
KiezatlasPlugin()
           
 
Method Summary
private  void enrichWithFacets(Topic topic, ResultList<RelatedTopic> facetTypes)
           
private  void enrichWithMultiFacet(Topic topic, String facetTypeUri)
           
private  void enrichWithSingleFacet(Topic topic, String facetTypeUri)
           
private  List<Topic> fetchGeoObjects(long geomapId)
           
private  AssociationDefinition getAssocDef(String facetTypeUri)
           
private  ResultList<RelatedTopic> getFacetTypes(ClientState clientState)
          Determines the facet types of the selected topicmap.
 ResultList<RelatedTopic> getFacetTypes(long websiteId)
           
 List<Topic> getGeoObjects(long geomapId)
           
 Topic getWebsite(long geomapId)
           
private  boolean isGeomap(long topicmapId)
           
 InputStream launchWebclient()
           
 void postUpdateTopic(Topic topic, TopicModel newModel, TopicModel oldModel, ClientState clientState, Directives directives)
           
 void preSendTopic(Topic topic, ClientState clientState)
           
 void serviceArrived(PluginService service)
          Note: we *wait* for the Access Control service but we don't actually *consume* it.
 void serviceGone(PluginService service)
           
private  void updateFacets(Topic topic, ResultList<RelatedTopic> facetTypes, TopicModel newModel, ClientState clientState, Directives directives)
           
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, init, postInstall, publishDirectory, setCoreService, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WEBSITE_GEOMAP

private static final String WEBSITE_GEOMAP
See Also:
Constant Field Values

ROLE_TYPE_WEBSITE

private static final String ROLE_TYPE_WEBSITE
See Also:
Constant Field Values

ROLE_TYPE_GEOMAP

private static final String ROLE_TYPE_GEOMAP
See Also:
Constant Field Values

WEBSITE_FACET_TYPES

private static final String WEBSITE_FACET_TYPES
See Also:
Constant Field Values

ROLE_TYPE_FACET_TYPE

private static final String ROLE_TYPE_FACET_TYPE
See Also:
Constant Field Values

geomapsService

private GeomapsService geomapsService

facetsService

private FacetsService facetsService

logger

private Logger logger
Constructor Detail

KiezatlasPlugin

public KiezatlasPlugin()
Method Detail

launchWebclient

public InputStream launchWebclient()

getWebsite

public Topic getWebsite(long geomapId)

getFacetTypes

public ResultList<RelatedTopic> getFacetTypes(long websiteId)

getGeoObjects

public List<Topic> getGeoObjects(long geomapId)

serviceArrived

public void serviceArrived(PluginService service)
Note: we *wait* for the Access Control service but we don't actually *consume* it. This ensures the Kiezatlas types are properly setup for Access Control.

Specified by:
serviceArrived in interface PluginContext
Overrides:
serviceArrived in class PluginActivator

serviceGone

public void serviceGone(PluginService service)
Specified by:
serviceGone in interface PluginContext
Overrides:
serviceGone in class PluginActivator

preSendTopic

public void preSendTopic(Topic topic,
                         ClientState clientState)
Specified by:
preSendTopic in interface PreSendTopicListener

postUpdateTopic

public void postUpdateTopic(Topic topic,
                            TopicModel newModel,
                            TopicModel oldModel,
                            ClientState clientState,
                            Directives directives)
Specified by:
postUpdateTopic in interface PostUpdateTopicListener

enrichWithFacets

private void enrichWithFacets(Topic topic,
                              ResultList<RelatedTopic> facetTypes)

enrichWithSingleFacet

private void enrichWithSingleFacet(Topic topic,
                                   String facetTypeUri)

enrichWithMultiFacet

private void enrichWithMultiFacet(Topic topic,
                                  String facetTypeUri)

updateFacets

private void updateFacets(Topic topic,
                          ResultList<RelatedTopic> facetTypes,
                          TopicModel newModel,
                          ClientState clientState,
                          Directives directives)

getFacetTypes

private ResultList<RelatedTopic> getFacetTypes(ClientState clientState)
Determines the facet types of the selected topicmap.

Returns:
The facet types (as a result set, may be empty), or null if a) the selected topicmap is not a geomap, or b) the geomap is not associated to a Kiezatlas Website.

fetchGeoObjects

private List<Topic> fetchGeoObjects(long geomapId)

isGeomap

private boolean isGeomap(long topicmapId)

getAssocDef

private AssociationDefinition getAssocDef(String facetTypeUri)


Copyright © 2014. All Rights Reserved.