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, org.osgi.framework.BundleActivator

public class TopicmapsPlugin
extends PluginActivator
implements TopicmapsService


Field Summary
private static String ASSOCIATION_MAPCONTEXT
           
private  Logger logger
           
private static String PROP_VISIBILITY
           
private static String PROP_X
           
private static String PROP_Y
           
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
 
Fields inherited from interface de.deepamehta.plugins.topicmaps.service.TopicmapsService
DEFAULT_TOPICMAP_NAME, DEFAULT_TOPICMAP_RENDERER
 
Constructor Summary
TopicmapsPlugin()
           
 
Method Summary
 void addAssociationToTopicmap(long topicmapId, long assocId)
           
 void addTopicToTopicmap(long topicmapId, long topicId, int x, int y, boolean visibility)
          Convenience method to add a topic with the standard view properties.
 void addTopicToTopicmap(long topicmapId, long topicId, ViewProperties viewProps)
           
 Topic createTopicmap(String name, String topicmapRendererUri)
           
private  TopicViewmodel createTopicViewmodel(RelatedTopic topic)
           
private  Association fetchAssociationRefAssociation(long topicmapId, long assocId)
           
private  Map<Long,AssociationViewmodel> fetchAssociations(Topic topicmapTopic)
           
private  Association fetchTopicRefAssociation(long topicmapId, long topicId)
           
private  Map<Long,TopicViewmodel> fetchTopics(Topic topicmapTopic, boolean includeChilds)
           
private  ViewProperties fetchViewProperties(Association mapcontextAssoc)
           
 TopicmapViewmodel getTopicmap(long topicmapId, boolean includeChilds)
           
 InputStream getTopicmapAndTopicInWebclient()
           
 InputStream getTopicmapInWebclient()
           
private  TopicmapRenderer getTopicmapRenderer(String rendererUri)
           
private  void invokeViewmodelCustomizer(ViewmodelCustomizer customizer, RelatedTopic topic, ViewProperties viewProps)
           
private  void invokeViewmodelCustomizers(RelatedTopic topic, ViewProperties viewProps)
           
private  InputStream invokeWebclient()
           
 boolean isTopicInTopicmap(long topicmapId, long topicId)
           
 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, ViewProperties viewProps)
           
private  void storeViewProperties(Association mapcontextAssoc, ViewProperties viewProps)
           
private  void storeViewProperties(long topicmapId, long topicId, ViewProperties viewProps)
           
 void unregisterViewmodelCustomizer(ViewmodelCustomizer customizer)
           
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, getPluginName, getStaticResource, 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

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

PROP_X

private static final String PROP_X
See Also:
Constant Field Values

PROP_Y

private static final String PROP_Y
See Also:
Constant Field Values

PROP_VISIBILITY

private static final String PROP_VISIBILITY
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

createTopicmap

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

getTopicmap

public TopicmapViewmodel getTopicmap(long topicmapId,
                                     boolean includeChilds)
Specified by:
getTopicmap in interface TopicmapsService
includeChilds - if true the topics contained in the topicmap will include their child topics.

isTopicInTopicmap

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

addTopicToTopicmap

public void addTopicToTopicmap(long topicmapId,
                               long topicId,
                               ViewProperties 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

setViewProperties

public void setViewProperties(long topicmapId,
                              long topicId,
                              ViewProperties 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()

fetchTopics

private Map<Long,TopicViewmodel> fetchTopics(Topic topicmapTopic,
                                             boolean includeChilds)

fetchAssociations

private Map<Long,AssociationViewmodel> fetchAssociations(Topic topicmapTopic)

createTopicViewmodel

private TopicViewmodel createTopicViewmodel(RelatedTopic topic)

fetchTopicRefAssociation

private Association fetchTopicRefAssociation(long topicmapId,
                                             long topicId)

fetchAssociationRefAssociation

private Association fetchAssociationRefAssociation(long topicmapId,
                                                   long assocId)

fetchViewProperties

private ViewProperties fetchViewProperties(Association mapcontextAssoc)

storeViewProperties

private void storeViewProperties(long topicmapId,
                                 long topicId,
                                 ViewProperties viewProps)

storeViewProperties

private void storeViewProperties(Association mapcontextAssoc,
                                 ViewProperties viewProps)

invokeViewmodelCustomizers

private void invokeViewmodelCustomizers(RelatedTopic topic,
                                        ViewProperties viewProps)

invokeViewmodelCustomizer

private void invokeViewmodelCustomizer(ViewmodelCustomizer customizer,
                                       RelatedTopic topic,
                                       ViewProperties viewProps)

getTopicmapRenderer

private TopicmapRenderer getTopicmapRenderer(String rendererUri)

invokeWebclient

private InputStream invokeWebclient()


Copyright © 2015. All Rights Reserved.