net.ontopia.topicmaps.entry
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 Summary
 void addSource(TopicMapSourceIF source)
          PUBLIC: Adds the source to the repository.
 void close()
          PUBLIC: Closes the repository and releases all resources bound by the repository.
 TopicMapStoreIF createStore(java.lang.String refkey, boolean readonly)
          PUBLIC: Creates a new topic map store for the given topic map id.
 TopicMapReferenceIF getReferenceByKey(java.lang.String refkey)
          PUBLIC: Gets a topic map reference by its reference key.
 java.lang.String getReferenceKey(TopicMapReferenceIF ref)
          PUBLIC: Gets the key used to identify the reference in the repository.
 java.util.Collection<java.lang.String> getReferenceKeys()
          PUBLIC: Returns a collection containing the keys of all references.
 java.util.Collection<TopicMapReferenceIF> getReferences()
          PUBLIC: Returns a collection containing all references.
 TopicMapSourceIF getSourceById(java.lang.String source_id)
          PUBLIC: Returns the topic map source that has the given source id.
 java.util.Collection<TopicMapSourceIF> getSources()
          PUBLIC: Returns an immutable collection containing the TopicMapSourceIFs registered with the topic map repository.
 void refresh()
          PUBLIC: Refreshes all sources and recreates the reference map.
 void removeSource(TopicMapSourceIF source)
          PUBLIC: Removes the source from the repository.
 

Method Detail

createStore

TopicMapStoreIF createStore(java.lang.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(java.lang.String refkey)
PUBLIC: Gets a topic map reference by its reference key. Returns null if not found.


getReferenceKey

java.lang.String getReferenceKey(TopicMapReferenceIF ref)
PUBLIC: Gets the key used to identify the reference in the repository.


getReferences

java.util.Collection<TopicMapReferenceIF> getReferences()
PUBLIC: Returns a collection containing all references.


getReferenceKeys

java.util.Collection<java.lang.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(java.lang.String source_id)
PUBLIC: Returns the topic map source that has the given source id.


getSources

java.util.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.

Since:
2.1


Copyright © 2000-2012 Ontopia.