Interface TopicMapRepositoryIF

  • All Known Implementing Classes:
    TopicMapSourceManager

    public interface TopicMapRepositoryIF
    PUBLIC: Class used to provide easy access to references from one or more topic map sources.

    The repository allows access to its underlying references using reference keys that the repository assigns each reference. It is up to the repository implementation to generate these keys. Each repository decides how to generate its reference keys. Note that the reference key is therefore not neccessarily identical to the reference's id. See the implementations for more information on their key generation policies.

    The default implementation of TopicMapRepositoryIF is thread-safe.

    Since:
    1.3.2
    • Method Detail

      • createStore

        TopicMapStoreIF createStore​(String refkey,
                                    boolean readonly)
        PUBLIC: Creates a new topic map store for the given topic map id. This method effectively delegates the call to the underlying topic map reference. An exception is thrown if the topic map reference cannot be found or any errors occurs while loading it.
        Since:
        3.4
      • getReferenceByKey

        TopicMapReferenceIF getReferenceByKey​(String refkey)
        PUBLIC: Gets a topic map reference by its reference key. Returns null if not found.
      • getReferenceKey

        String getReferenceKey​(TopicMapReferenceIF ref)
        PUBLIC: Gets the key used to identify the reference in the repository.
      • getReferenceKeys

        Collection<String> getReferenceKeys()
        PUBLIC: Returns a collection containing the keys of all references.
      • refresh

        void refresh()
        PUBLIC: Refreshes all sources and recreates the reference map.
      • getSourceById

        TopicMapSourceIF getSourceById​(String source_id)
        PUBLIC: Returns the topic map source that has the given source id.
      • getSources

        Collection<TopicMapSourceIF> getSources()
        PUBLIC: Returns an immutable collection containing the TopicMapSourceIFs registered with the topic map repository.
      • addSource

        void addSource​(TopicMapSourceIF source)
        PUBLIC: Adds the source to the repository.
      • removeSource

        void removeSource​(TopicMapSourceIF source)
        PUBLIC: Removes the source from the repository.
      • close

        void close()
        PUBLIC: Closes the repository and releases all resources bound by the repository. Closing the repository will also close any open topic map references held by the topic map repository as well as the topic map sources added to it.
        Since:
        2.1