Package systems.dmx.topicmaps
Interface TopicmapsService
-
- All Known Implementing Classes:
TopicmapsPlugin
public interface TopicmapsService
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TOPICMAP_NAMEstatic StringDEFAULT_TOPICMAP_TYPE_URI
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAssocToTopicmap(long topicmapId, long assocId, ViewProps viewProps)Adds an association to a topicmap.voidaddRelatedTopicToTopicmap(long topicmapId, long topicId, long assocId, ViewProps viewProps)voidaddTopicToTopicmap(long topicmapId, long topicId, int x, int y, boolean visibility)Convenience method to add a topic with the standard view properties.voidaddTopicToTopicmap(long topicmapId, long topicId, ViewProps viewProps)Adds a topic to a topicmap.TopiccreateTopicmap(String name, String topicmapTypeUri, ViewProps viewProps)AssocgetAssocMapcontext(long topicmapId, long assocId)ViewPropsgetAssocViewProps(long topicmapId, long assocId)Retrieves an assoc's standard view properties: "visibility" and "pinned".TopicmapgetTopicmap(long topicmapId, boolean includeChildren)Fetches a topicmap from DB.AssocgetTopicMapcontext(long topicmapId, long topicId)List<RelatedTopic>getTopicmapTopics(long objectId)Returns all topicmaps which contain the given topic/assoc.ViewPropsgetTopicViewProps(long topicmapId, long topicId)Retrieves a topic's standard view properties: "x", "y", "visibility", "pinned", "width", and "height".voidhideAssocs(long topicmapId, IdList assocIds)voidhideMulti(long topicmapId, IdList topicIds, IdList assocIds)voidhideTopics(long topicmapId, IdList topicIds)voidregisterTopicmapCustomizer(TopicmapCustomizer customizer)voidregisterTopicmapType(TopicmapType topicmapType)voidsetAssocViewProps(long topicmapId, long assocId, ViewProps viewProps)voidsetAssocVisibility(long topicmapId, long assocId, boolean visibility)Convenience method to update the "dmx.topicmaps.visibility" standard view property.voidsetTopicmapViewport(long topicmapId, int panX, int panY, double zoom)voidsetTopicPosition(long topicmapId, long topicId, int x, int y)Convenience method to update the "dmx.topicmaps.x" and "dmx.topicmaps.y" standard view properties.voidsetTopicPositions(long topicmapId, TopicCoords coords)voidsetTopicViewProps(long topicmapId, long topicId, ViewProps viewProps)voidsetTopicVisibility(long topicmapId, long topicId, boolean visibility)Convenience method to update the "dmx.topicmaps.visibility" standard view property.voidunregisterTopicmapCustomizer(TopicmapCustomizer customizer)
-
-
-
Field Detail
-
DEFAULT_TOPICMAP_NAME
static final String DEFAULT_TOPICMAP_NAME
- See Also:
- Constant Field Values
-
DEFAULT_TOPICMAP_TYPE_URI
static final String DEFAULT_TOPICMAP_TYPE_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
createTopicmap
Topic createTopicmap(String name, String topicmapTypeUri, ViewProps viewProps)
- Returns:
- the created Topicmap topic.
-
getTopicmap
Topicmap getTopicmap(long topicmapId, boolean includeChildren)
Fetches a topicmap from DB.- Parameters:
includeChildren- if true the topics contained in the topicmap will include their child topics.
-
getTopicmapTopics
List<RelatedTopic> getTopicmapTopics(long objectId)
Returns all topicmaps which contain the given topic/assoc. Only those topicmaps are returned in which the given topic/assoc is visible (not hidden). TODO: rename to findTopicmaps() or something likes this- Parameters:
objectId- a topic ID or an assoc ID- Returns:
- topics of type Topicmap
-
addTopicToTopicmap
void addTopicToTopicmap(long topicmapId, long topicId, int x, int y, boolean visibility)Convenience method to add a topic with the standard view properties.
-
addTopicToTopicmap
void addTopicToTopicmap(long topicmapId, long topicId, ViewProps viewProps)Adds a topic to a topicmap. If the topic is added already an exception is thrown.
-
addAssocToTopicmap
void addAssocToTopicmap(long topicmapId, long assocId, ViewProps viewProps)Adds an association to a topicmap. If the association is added already an exception is thrown.
-
addRelatedTopicToTopicmap
void addRelatedTopicToTopicmap(long topicmapId, long topicId, long assocId, ViewProps viewProps)
-
getTopicViewProps
ViewProps getTopicViewProps(long topicmapId, long topicId)
Retrieves a topic's standard view properties: "x", "y", "visibility", "pinned", "width", and "height". The latter 2 are optional, the returned view props object will contain these only if available in DB.
-
getAssocViewProps
ViewProps getAssocViewProps(long topicmapId, long assocId)
Retrieves an assoc's standard view properties: "visibility" and "pinned".
-
getTopicMapcontext
Assoc getTopicMapcontext(long topicmapId, long topicId)
-
getAssocMapcontext
Assoc getAssocMapcontext(long topicmapId, long assocId)
-
setTopicViewProps
void setTopicViewProps(long topicmapId, long topicId, ViewProps viewProps)
-
setAssocViewProps
void setAssocViewProps(long topicmapId, long assocId, ViewProps viewProps)
-
setTopicPosition
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.
-
setTopicPositions
void setTopicPositions(long topicmapId, TopicCoords coords)
-
setTopicVisibility
void setTopicVisibility(long topicmapId, long topicId, boolean visibility)Convenience method to update the "dmx.topicmaps.visibility" standard view property.
-
setAssocVisibility
void setAssocVisibility(long topicmapId, long assocId, boolean visibility)Convenience method to update the "dmx.topicmaps.visibility" standard view property. ### FIXME: idempotence? If the associationn is not contained in the topicmap nothing is performed.
-
hideTopics
void hideTopics(long topicmapId, IdList topicIds)
-
hideAssocs
void hideAssocs(long topicmapId, IdList assocIds)
-
setTopicmapViewport
void setTopicmapViewport(long topicmapId, int panX, int panY, double zoom)
-
registerTopicmapType
void registerTopicmapType(TopicmapType topicmapType)
-
registerTopicmapCustomizer
void registerTopicmapCustomizer(TopicmapCustomizer customizer)
-
unregisterTopicmapCustomizer
void unregisterTopicmapCustomizer(TopicmapCustomizer customizer)
-
-