public class TopicmapsPlugin extends PluginActivator implements TopicmapsService
Modifier and Type | Class and Description |
---|---|
private class |
TopicmapsPlugin.Messenger |
Modifier and Type | Field and Description |
---|---|
private static String |
ASSOCIATION_MAPCONTEXT |
private Logger |
logger |
private TopicmapsPlugin.Messenger |
me |
private static String |
PROP_PINNED |
private static String |
PROP_VISIBILITY |
private static String |
PROP_X |
private static String |
PROP_Y |
private javax.servlet.http.HttpServletRequest |
request |
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 |
bundle, dmx, mf
DEFAULT_TOPICMAP_NAME, DEFAULT_TOPICMAP_RENDERER
Constructor and Description |
---|
TopicmapsPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
addAssociationToTopicmap(long topicmapId,
long assocId,
ViewProperties viewProps)
Adds an association to a topicmap.
|
void |
addRelatedTopicToTopicmap(long topicmapId,
long topicId,
long assocId,
ViewProperties viewProps) |
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)
Adds a topic to a topicmap.
|
private void |
createAssociationMapcontext(long topicmapId,
long assocId,
ViewProperties viewProps) |
private AssociationViewModel |
createAssocViewModel(RelatedAssociation assoc) |
Topic |
createTopicmap(String name,
String topicmapRendererUri,
boolean isPrivate) |
private void |
createTopicMapcontext(long topicmapId,
long topicId,
ViewProperties viewProps) |
private TopicViewModel |
createTopicViewModel(RelatedTopic topic) |
private void |
deleteAssociationMapcontext(Association assocMapcontext) |
private Association |
fetchAssociationMapcontext(long topicmapId,
long assocId) |
private Map<Long,AssociationViewModel> |
fetchAssociations(Topic topicmapTopic) |
private ViewProperties |
fetchAssocViewProperties(Association assocMapcontext) |
private Association |
fetchTopicMapcontext(long topicmapId,
long topicId) |
private Map<Long,TopicViewModel> |
fetchTopics(Topic topicmapTopic,
boolean includeChilds) |
private ViewProperties |
fetchTopicViewProperties(Association topicMapcontext) |
TopicmapViewmodel |
getTopicmap(long topicmapId,
boolean includeChilds) |
InputStream |
getTopicmapAndTopicInWebclient() |
InputStream |
getTopicmapInWebclient() |
private TopicmapRenderer |
getTopicmapRenderer(String rendererUri) |
void |
hideAssocs(long topicmapId,
IdList assocIds) |
void |
hideMulti(long topicmapId,
IdList topicIds,
IdList assocIds) |
void |
hideTopics(long topicmapId,
IdList topicIds) |
private void |
invokeViewmodelCustomizer(ViewmodelCustomizer customizer,
RelatedTopic topic,
ViewProperties viewProps) |
private void |
invokeViewmodelCustomizers(RelatedTopic topic,
ViewProperties viewProps) |
private InputStream |
invokeWebclient() |
boolean |
isAssociationInTopicmap(long topicmapId,
long assocId) |
boolean |
isTopicInTopicmap(long topicmapId,
long topicId) |
private boolean |
pinned(Association mapcontext) |
void |
registerTopicmapRenderer(TopicmapRenderer renderer) |
void |
registerViewmodelCustomizer(ViewmodelCustomizer customizer) |
void |
removeAssociationFromTopicmap(long topicmapId,
long assocId)
Removes an association from a topicmap.
|
void |
setAssociationViewProperties(long topicmapId,
long assocId,
ViewProperties viewProps) |
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 "dmx.topicmaps.x" and "dmx.topicmaps.y" standard view properties.
|
void |
setTopicViewProperties(long topicmapId,
long topicId,
ViewProperties viewProps) |
void |
setTopicVisibility(long topicmapId,
long topicId,
boolean visibility)
Convenience method to update the "dmx.topicmaps.visibility" standard view property.
|
private void |
storeAssociationViewProperties(long topicmapId,
long assocId,
ViewProperties viewProps)
Convenience.
|
private void |
storeTopicViewProperties(long topicmapId,
long topicId,
ViewProperties viewProps)
Convenience.
|
private void |
storeViewProperties(Association mapcontext,
ViewProperties viewProps) |
void |
unregisterViewmodelCustomizer(ViewmodelCustomizer customizer) |
private boolean |
visibility(Association topicMapcontext) |
getBundleContext, getPluginName, getStaticResource, getUri, init, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
private static final String TOPIC_MAPCONTEXT
private static final String ASSOCIATION_MAPCONTEXT
private static final String ROLE_TYPE_TOPICMAP
private static final String ROLE_TYPE_TOPIC
private static final String ROLE_TYPE_ASSOCIATION
private static final String PROP_X
private static final String PROP_Y
private static final String PROP_VISIBILITY
private static final String PROP_PINNED
private Map<String,TopicmapRenderer> topicmapRenderers
private List<ViewmodelCustomizer> viewmodelCustomizers
private TopicmapsPlugin.Messenger me
@Context private javax.servlet.http.HttpServletRequest request
public TopicmapsPlugin()
public Topic createTopicmap(String name, String topicmapRendererUri, boolean isPrivate)
createTopicmap
in interface TopicmapsService
public TopicmapViewmodel getTopicmap(long topicmapId, boolean includeChilds)
getTopicmap
in interface TopicmapsService
includeChilds
- if true the topics contained in the topicmap will include their child topics.public boolean isTopicInTopicmap(long topicmapId, long topicId)
isTopicInTopicmap
in interface TopicmapsService
public boolean isAssociationInTopicmap(long topicmapId, long assocId)
isAssociationInTopicmap
in interface TopicmapsService
public void addTopicToTopicmap(long topicmapId, long topicId, ViewProperties viewProps)
TopicmapsService
addTopicToTopicmap
in interface TopicmapsService
public void addTopicToTopicmap(long topicmapId, long topicId, int x, int y, boolean visibility)
TopicmapsService
addTopicToTopicmap
in interface TopicmapsService
public void addAssociationToTopicmap(long topicmapId, long assocId, ViewProperties viewProps)
TopicmapsService
addAssociationToTopicmap
in interface TopicmapsService
public void addRelatedTopicToTopicmap(long topicmapId, long topicId, long assocId, ViewProperties viewProps)
addRelatedTopicToTopicmap
in interface TopicmapsService
public void setTopicViewProperties(long topicmapId, long topicId, ViewProperties viewProps)
setTopicViewProperties
in interface TopicmapsService
public void setAssociationViewProperties(long topicmapId, long assocId, ViewProperties viewProps)
setAssociationViewProperties
in interface TopicmapsService
public void setTopicPosition(long topicmapId, long topicId, int x, int y)
TopicmapsService
setTopicPosition
in interface TopicmapsService
public void setTopicVisibility(long topicmapId, long topicId, boolean visibility)
TopicmapsService
setTopicVisibility
in interface TopicmapsService
public void removeAssociationFromTopicmap(long topicmapId, long assocId)
TopicmapsService
removeAssociationFromTopicmap
in interface TopicmapsService
public void hideTopics(long topicmapId, IdList topicIds)
hideTopics
in interface TopicmapsService
public void hideAssocs(long topicmapId, IdList assocIds)
hideAssocs
in interface TopicmapsService
public void hideMulti(long topicmapId, IdList topicIds, IdList assocIds)
hideMulti
in interface TopicmapsService
public void setClusterPosition(long topicmapId, ClusterCoords coords)
setClusterPosition
in interface TopicmapsService
public void setTopicmapTranslation(long topicmapId, int transX, int transY)
setTopicmapTranslation
in interface TopicmapsService
public void registerTopicmapRenderer(TopicmapRenderer renderer)
registerTopicmapRenderer
in interface TopicmapsService
public void registerViewmodelCustomizer(ViewmodelCustomizer customizer)
registerViewmodelCustomizer
in interface TopicmapsService
public void unregisterViewmodelCustomizer(ViewmodelCustomizer customizer)
unregisterViewmodelCustomizer
in interface TopicmapsService
public InputStream getTopicmapInWebclient()
public InputStream getTopicmapAndTopicInWebclient()
private Map<Long,TopicViewModel> fetchTopics(Topic topicmapTopic, boolean includeChilds)
private Map<Long,AssociationViewModel> fetchAssociations(Topic topicmapTopic)
private TopicViewModel createTopicViewModel(RelatedTopic topic)
private AssociationViewModel createAssocViewModel(RelatedAssociation assoc)
private Association fetchTopicMapcontext(long topicmapId, long topicId)
private Association fetchAssociationMapcontext(long topicmapId, long assocId)
private void createTopicMapcontext(long topicmapId, long topicId, ViewProperties viewProps)
private void createAssociationMapcontext(long topicmapId, long assocId, ViewProperties viewProps)
private void deleteAssociationMapcontext(Association assocMapcontext)
private ViewProperties fetchTopicViewProperties(Association topicMapcontext)
private ViewProperties fetchAssocViewProperties(Association assocMapcontext)
private boolean visibility(Association topicMapcontext)
private boolean pinned(Association mapcontext)
private void storeTopicViewProperties(long topicmapId, long topicId, ViewProperties viewProps)
private void storeAssociationViewProperties(long topicmapId, long assocId, ViewProperties viewProps)
private void storeViewProperties(Association mapcontext, ViewProperties viewProps)
private void invokeViewmodelCustomizers(RelatedTopic topic, ViewProperties viewProps)
private void invokeViewmodelCustomizer(ViewmodelCustomizer customizer, RelatedTopic topic, ViewProperties viewProps)
private TopicmapRenderer getTopicmapRenderer(String rendererUri)
private InputStream invokeWebclient()
Copyright © 2018. All Rights Reserved.