Package systems.dmx.topicmaps
Interface TopicmapsService
-
- All Known Implementing Classes:
TopicmapsPlugin
public interface TopicmapsService
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_TOPICMAP_NAME
static String
DEFAULT_TOPICMAP_TYPE_URI
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAssocToTopicmap(long topicmapId, long assocId, ViewProps viewProps)
Adds an association to a topicmap.void
addRelatedTopicToTopicmap(long topicmapId, long topicId, long assocId, ViewProps 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, ViewProps viewProps)
Adds a topic to a topicmap.Topic
createTopicmap(String name, String topicmapTypeUri, ViewProps viewProps)
Assoc
getAssocMapcontext(long topicmapId, long assocId)
ViewProps
getAssocViewProps(long topicmapId, long assocId)
Retrieves an assoc's standard view properties: "visibility" and "pinned".Topicmap
getTopicmap(long topicmapId, boolean includeChildren)
Fetches a topicmap from DB.Assoc
getTopicMapcontext(long topicmapId, long topicId)
List<RelatedTopic>
getTopicmapTopics(long objectId)
Returns all topicmaps which contain the given topic/assoc.ViewProps
getTopicViewProps(long topicmapId, long topicId)
Retrieves a topic's standard view properties: "x", "y", "visibility", "pinned", "width", and "height".void
hideAssocs(long topicmapId, IdList assocIds)
void
hideMulti(long topicmapId, IdList topicIds, IdList assocIds)
void
hideTopics(long topicmapId, IdList topicIds)
void
registerTopicmapCustomizer(TopicmapCustomizer customizer)
void
registerTopicmapType(TopicmapType topicmapType)
void
setAssocViewProps(long topicmapId, long assocId, ViewProps viewProps)
void
setAssocVisibility(long topicmapId, long assocId, boolean visibility)
Convenience method to update the "dmx.topicmaps.visibility" standard view property.void
setTopicmapViewport(long topicmapId, int panX, int panY, double zoom)
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
setTopicPositions(long topicmapId, TopicCoords coords)
void
setTopicViewProps(long topicmapId, long topicId, ViewProps viewProps)
void
setTopicVisibility(long topicmapId, long topicId, boolean visibility)
Convenience method to update the "dmx.topicmaps.visibility" standard view property.void
unregisterTopicmapCustomizer(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)
-
-