Interface TopicmapsService

  • All Known Implementing Classes:
    TopicmapsPlugin

    public interface TopicmapsService
    • 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)
      • hideMulti

        void hideMulti​(long topicmapId,
                       IdList topicIds,
                       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)