de.deepamehta.plugins.topicmaps
Class TopicmapsPlugin

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.osgi.PluginActivator
      extended by de.deepamehta.plugins.topicmaps.TopicmapsPlugin
All Implemented Interfaces:
PluginContext, PluginService, TopicmapsService, BundleActivator

public class TopicmapsPlugin
extends PluginActivator
implements TopicmapsService


Nested Class Summary
private  class TopicmapsPlugin.StandardViewProperties
           
 
Field Summary
private static String ASSOCIATION_MAPCONTEXT
           
private static String DEFAULT_TOPICMAP_NAME
           
private static String DEFAULT_TOPICMAP_RENDERER
           
private static String DEFAULT_TOPICMAP_URI
           
private  Logger logger
           
private static String ROLE_TYPE_ASSOCIATION
           
private static String ROLE_TYPE_TOPIC
           
private static String ROLE_TYPE_TOPICMAP
           
private static String TOPIC_MAPCONTEXT
           
private  Map<String,TopicmapRenderer> topicmapRenderers
           
private  List<ViewmodelCustomizer> viewmodelCustomizers
           
 
Fields inherited from class de.deepamehta.core.osgi.PluginActivator
bundle, dms
 
Constructor Summary
TopicmapsPlugin()
           
 
Method Summary
 void addAssociationToTopicmap(long topicmapId, long assocId)
           
 void addTopicToTopicmap(long topicmapId, long topicId, CompositeValueModel viewProps)
           
 void addTopicToTopicmap(long topicmapId, long topicId, int x, int y, boolean visibility)
          Convenience method to add a topic with the standard view properties.
 Topic createTopicmap(String name, String topicmapRendererUri, ClientState clientState)
           
 Topic createTopicmap(String name, String uri, String topicmapRendererUri, ClientState clientState)
           
private  Association fetchAssociationRefAssociation(long topicmapId, long assocId)
           
private  Association fetchTopicRefAssociation(long topicmapId, long topicId)
           
 TopicmapViewmodel getTopicmap(long topicmapId)
           
 InputStream getTopicmapAndTopicInWebclient()
           
 InputStream getTopicmapInWebclient()
           
private  TopicmapRenderer getTopicmapRenderer(String rendererUri)
           
private  void invokeViewmodelCustomizer(ViewmodelCustomizer customizer, Topic topic, CompositeValueModel viewProps)
           
private  void invokeViewmodelCustomizers(long topicId, CompositeValueModel viewProps)
           
private  InputStream invokeWebclient()
           
 boolean isTopicInTopicmap(long topicmapId, long topicId)
           
 void postInstall()
           
 void registerTopicmapRenderer(TopicmapRenderer renderer)
           
 void registerViewmodelCustomizer(ViewmodelCustomizer customizer)
           
 void removeAssociationFromTopicmap(long topicmapId, long assocId)
           
 void setClusterPosition(long topicmapId, ClusterCoords coords)
           
 void setTopicmapTranslation(long topicmapId, int transX, int transY)
           
 void setTopicPosition(long topicmapId, long topicId, int x, int y)
          Convenience method to update the "dm4.topicmaps.x" and "dm4.topicmaps.y" standard view properties.
 void setTopicVisibility(long topicmapId, long topicId, boolean visibility)
          Convenience method to update the "dm4.topicmaps.visibility" standard view property.
 void setViewProperties(long topicmapId, long topicId, CompositeValueModel viewProps)
           
private  void storeCustomViewProperties(long topicmapId, long topicId, CompositeValueModel viewProps)
           
private  void storeStandardViewProperties(long topicmapId, long topicId, CompositeValueModel viewProps)
           
 void unregisterViewmodelCustomizer(ViewmodelCustomizer customizer)
           
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, getUri, init, publishDirectory, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TOPICMAP_NAME

private static final String DEFAULT_TOPICMAP_NAME
See Also:
Constant Field Values

DEFAULT_TOPICMAP_URI

private static final String DEFAULT_TOPICMAP_URI
See Also:
Constant Field Values

DEFAULT_TOPICMAP_RENDERER

private static final String DEFAULT_TOPICMAP_RENDERER
See Also:
Constant Field Values

TOPIC_MAPCONTEXT

private static final String TOPIC_MAPCONTEXT
See Also:
Constant Field Values

ASSOCIATION_MAPCONTEXT

private static final String ASSOCIATION_MAPCONTEXT
See Also:
Constant Field Values

ROLE_TYPE_TOPICMAP

private static final String ROLE_TYPE_TOPICMAP
See Also:
Constant Field Values

ROLE_TYPE_TOPIC

private static final String ROLE_TYPE_TOPIC
See Also:
Constant Field Values

ROLE_TYPE_ASSOCIATION

private static final String ROLE_TYPE_ASSOCIATION
See Also:
Constant Field Values

topicmapRenderers

private Map<String,TopicmapRenderer> topicmapRenderers

viewmodelCustomizers

private List<ViewmodelCustomizer> viewmodelCustomizers

logger

private Logger logger
Constructor Detail

TopicmapsPlugin

public TopicmapsPlugin()
Method Detail

getTopicmap

public TopicmapViewmodel getTopicmap(long topicmapId)
Specified by:
getTopicmap in interface TopicmapsService

createTopicmap

public Topic createTopicmap(String name,
                            String topicmapRendererUri,
                            @HeaderParam(value="Cookie")
                            ClientState clientState)
Specified by:
createTopicmap in interface TopicmapsService

createTopicmap

public Topic createTopicmap(String name,
                            String uri,
                            String topicmapRendererUri,
                            ClientState clientState)
Specified by:
createTopicmap in interface TopicmapsService

addTopicToTopicmap

public void addTopicToTopicmap(long topicmapId,
                               long topicId,
                               CompositeValueModel viewProps)
Specified by:
addTopicToTopicmap in interface TopicmapsService

addTopicToTopicmap

public void addTopicToTopicmap(long topicmapId,
                               long topicId,
                               int x,
                               int y,
                               boolean visibility)
Description copied from interface: TopicmapsService
Convenience method to add a topic with the standard view properties.

Specified by:
addTopicToTopicmap in interface TopicmapsService

addAssociationToTopicmap

public void addAssociationToTopicmap(long topicmapId,
                                     long assocId)
Specified by:
addAssociationToTopicmap in interface TopicmapsService

isTopicInTopicmap

public boolean isTopicInTopicmap(long topicmapId,
                                 long topicId)
Specified by:
isTopicInTopicmap in interface TopicmapsService

setViewProperties

public void setViewProperties(long topicmapId,
                              long topicId,
                              CompositeValueModel viewProps)
Specified by:
setViewProperties in interface TopicmapsService

setTopicPosition

public void setTopicPosition(long topicmapId,
                             long topicId,
                             int x,
                             int y)
Description copied from interface: TopicmapsService
Convenience method to update the "dm4.topicmaps.x" and "dm4.topicmaps.y" standard view properties.

Specified by:
setTopicPosition in interface TopicmapsService

setTopicVisibility

public void setTopicVisibility(long topicmapId,
                               long topicId,
                               boolean visibility)
Description copied from interface: TopicmapsService
Convenience method to update the "dm4.topicmaps.visibility" standard view property.

Specified by:
setTopicVisibility in interface TopicmapsService

removeAssociationFromTopicmap

public void removeAssociationFromTopicmap(long topicmapId,
                                          long assocId)
Specified by:
removeAssociationFromTopicmap in interface TopicmapsService

setClusterPosition

public void setClusterPosition(long topicmapId,
                               ClusterCoords coords)
Specified by:
setClusterPosition in interface TopicmapsService

setTopicmapTranslation

public void setTopicmapTranslation(long topicmapId,
                                   int transX,
                                   int transY)
Specified by:
setTopicmapTranslation in interface TopicmapsService

registerTopicmapRenderer

public void registerTopicmapRenderer(TopicmapRenderer renderer)
Specified by:
registerTopicmapRenderer in interface TopicmapsService

registerViewmodelCustomizer

public void registerViewmodelCustomizer(ViewmodelCustomizer customizer)
Specified by:
registerViewmodelCustomizer in interface TopicmapsService

unregisterViewmodelCustomizer

public void unregisterViewmodelCustomizer(ViewmodelCustomizer customizer)
Specified by:
unregisterViewmodelCustomizer in interface TopicmapsService

getTopicmapInWebclient

public InputStream getTopicmapInWebclient()

getTopicmapAndTopicInWebclient

public InputStream getTopicmapAndTopicInWebclient()

postInstall

public void postInstall()
Specified by:
postInstall in interface PluginContext
Overrides:
postInstall in class PluginActivator

storeStandardViewProperties

private void storeStandardViewProperties(long topicmapId,
                                         long topicId,
                                         CompositeValueModel viewProps)

storeCustomViewProperties

private void storeCustomViewProperties(long topicmapId,
                                       long topicId,
                                       CompositeValueModel viewProps)

fetchTopicRefAssociation

private Association fetchTopicRefAssociation(long topicmapId,
                                             long topicId)

fetchAssociationRefAssociation

private Association fetchAssociationRefAssociation(long topicmapId,
                                                   long assocId)

invokeViewmodelCustomizers

private void invokeViewmodelCustomizers(long topicId,
                                        CompositeValueModel viewProps)

invokeViewmodelCustomizer

private void invokeViewmodelCustomizer(ViewmodelCustomizer customizer,
                                       Topic topic,
                                       CompositeValueModel viewProps)

getTopicmapRenderer

private TopicmapRenderer getTopicmapRenderer(String rendererUri)

invokeWebclient

private InputStream invokeWebclient()


Copyright © 2014. All Rights Reserved.