net.abriraqui.dm4.importexport
Class ImportExportPlugin

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.osgi.PluginActivator
      extended by net.abriraqui.dm4.importexport.ImportExportPlugin
All Implemented Interfaces:
PluginContext, org.osgi.framework.BundleActivator

public class ImportExportPlugin
extends PluginActivator


Field Summary
private  FilesService filesService
           
private  Logger log
           
private  TopicmapsService topicmapsService
           
 
Fields inherited from class de.deepamehta.core.osgi.PluginActivator
bundle, dms
 
Constructor Summary
ImportExportPlugin()
           
 
Method Summary
private  String color(String typeUri)
           
private  void createAssociation(org.codehaus.jettison.json.JSONObject association, Map<Long,Long> mapTopicIds, long topicmapId)
           
private  void createTopic(org.codehaus.jettison.json.JSONObject topic, Map<Long,Long> mapTopicIds, long topicmapId)
           
 Topic exportTopicmapToJSON(long topicmapId)
           
 void exportTopicmapToSVG(long topicmapId)
           
private  void importAssociations(org.codehaus.jettison.json.JSONArray assocsArray, Map<Long,Long> mapTopicIds, long topicmapId)
           
 Topic importTopicmap(UploadedFile file)
           
private  void importTopics(org.codehaus.jettison.json.JSONArray topicsArray, Map<Long,Long> mapTopicIds, long topicmapId)
           
 void serviceArrived(PluginService service)
           
 void serviceGone(PluginService service)
           
private  String typeIconDataUri(String typeUri)
           
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, getUri, init, postInstall, publishDirectory, setCoreService, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topicmapsService

private TopicmapsService topicmapsService

filesService

private FilesService filesService

log

private Logger log
Constructor Detail

ImportExportPlugin

public ImportExportPlugin()
Method Detail

exportTopicmapToJSON

public Topic exportTopicmapToJSON(long topicmapId)

exportTopicmapToSVG

public void exportTopicmapToSVG(long topicmapId)
                         throws XMLStreamException
Throws:
XMLStreamException

importTopicmap

public Topic importTopicmap(UploadedFile file)

importTopics

private void importTopics(org.codehaus.jettison.json.JSONArray topicsArray,
                          Map<Long,Long> mapTopicIds,
                          long topicmapId)

importAssociations

private void importAssociations(org.codehaus.jettison.json.JSONArray assocsArray,
                                Map<Long,Long> mapTopicIds,
                                long topicmapId)

serviceArrived

public void serviceArrived(PluginService service)
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

color

private String color(String typeUri)

typeIconDataUri

private String typeIconDataUri(String typeUri)
                        throws IOException
Throws:
IOException

createTopic

private void createTopic(org.codehaus.jettison.json.JSONObject topic,
                         Map<Long,Long> mapTopicIds,
                         long topicmapId)
                  throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

createAssociation

private void createAssociation(org.codehaus.jettison.json.JSONObject association,
                               Map<Long,Long> mapTopicIds,
                               long topicmapId)


Copyright © 2014. All Rights Reserved.