public class ImportExportPlugin extends PluginActivator
Modifier and Type | Field and Description |
---|---|
private FilesService |
filesService |
private Logger |
log |
private TopicmapsService |
topicmapsService |
bundle, dms
Constructor and Description |
---|
ImportExportPlugin() |
Modifier and Type | Method and Description |
---|---|
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) |
Topic |
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) |
private String |
prefix() |
private String |
typeIconDataUri(String typeUri)
### Make this work for custom icons too, this works currently just with icons included in the standard
distribution.
|
getBundleContext, getPluginName, getStaticResource, getUri, init, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
private TopicmapsService topicmapsService
private FilesService filesService
public ImportExportPlugin()
public Topic exportTopicmapToJSON(long topicmapId)
public Topic exportTopicmapToSVG(long topicmapId) throws XMLStreamException
XMLStreamException
public Topic importTopicmap(UploadedFile file)
private void importTopics(org.codehaus.jettison.json.JSONArray topicsArray, Map<Long,Long> mapTopicIds, long topicmapId)
private void importAssociations(org.codehaus.jettison.json.JSONArray assocsArray, Map<Long,Long> mapTopicIds, long topicmapId)
private String typeIconDataUri(String typeUri) throws IOException
IOException
private void createTopic(org.codehaus.jettison.json.JSONObject topic, Map<Long,Long> mapTopicIds, long topicmapId) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
private void createAssociation(org.codehaus.jettison.json.JSONObject association, Map<Long,Long> mapTopicIds, long topicmapId)
Copyright © 2015. All Rights Reserved.