Package net.ontopia.topicmaps.utils
Class MergeReference
- java.lang.Object
-
- net.ontopia.topicmaps.entry.AbstractTopicMapReference
-
- net.ontopia.topicmaps.utils.MergeReference
-
- All Implemented Interfaces:
AutoCloseable
,TopicMapReferenceIF
public class MergeReference extends AbstractTopicMapReference
INTERNAL: A topic map reference that uses a TopicMapRepositoryIF to retrieve a list of topic maps and create a new merged topic map from them.- Since:
- 2.1
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
refkeys
protected TopicMapRepositoryIF
repository
protected boolean
reuse_store
protected TopicMapStoreFactoryIF
sfactory
protected TopicMapStoreIF
store
-
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
-
-
Constructor Summary
Constructors Constructor Description MergeReference(String id, String title, TopicMapStoreFactoryIF sfactory, TopicMapRepositoryIF repository, List<String> refkeys)
INTERNAL: Creates a TopicMapReferenceIF which references the result of merging a number of topic maps
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PUBLIC: Closes all open stores and the reference itself.protected TopicMapStoreIF
createStore()
TopicMapStoreIF
createStore(boolean readonly)
PUBLIC: Creates a topic map store that lets you access the referenced topic map.void
open()
PUBLIC: Opens the reference.-
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, clear, delete, getId, getSource, getTitle, getTopicListeners, isDeleted, isOpen, makeListenerArray, registerTopicListeners, removeTopicListener, setId, setSource, setTitle, setTopicListeners, storeClosed
-
-
-
-
Field Detail
-
store
protected TopicMapStoreIF store
-
sfactory
protected TopicMapStoreFactoryIF sfactory
-
repository
protected TopicMapRepositoryIF repository
-
reuse_store
protected boolean reuse_store
-
-
Constructor Detail
-
MergeReference
public MergeReference(String id, String title, TopicMapStoreFactoryIF sfactory, TopicMapRepositoryIF repository, List<String> refkeys)
INTERNAL: Creates a TopicMapReferenceIF which references the result of merging a number of topic maps- Parameters:
sfactory
- the store factory to use for creating the resulting merged topic map.repository
- the topic map repository to look up the topic maps that are to be merged in.refkeys
- a list of topic map reference key strings which refers to the topic maps that are to be merged. should be used.
-
-
Method Detail
-
open
public void open()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Opens the reference.- Specified by:
open
in interfaceTopicMapReferenceIF
- Overrides:
open
in classAbstractTopicMapReference
-
createStore
public TopicMapStoreIF createStore(boolean readonly) throws IOException
Description copied from interface:TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStore
in interfaceTopicMapReferenceIF
- Specified by:
createStore
in classAbstractTopicMapReference
- Throws:
IOException
-
createStore
protected TopicMapStoreIF createStore()
-
close
public void close()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Closes all open stores and the reference itself. Note that topic map stores created through this reference are closed and dereferenced when the reference is closed. The reference can be reopened after it has been closed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTopicMapReferenceIF
- Overrides:
close
in classAbstractTopicMapReference
-
-