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>refkeysprotected TopicMapRepositoryIFrepositoryprotected booleanreuse_storeprotected TopicMapStoreFactoryIFsfactoryprotected TopicMapStoreIFstore-
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 voidclose()PUBLIC: Closes all open stores and the reference itself.protected TopicMapStoreIFcreateStore()TopicMapStoreIFcreateStore(boolean readonly)PUBLIC: Creates a topic map store that lets you access the referenced topic map.voidopen()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:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF- Overrides:
openin classAbstractTopicMapReference
-
createStore
public TopicMapStoreIF createStore(boolean readonly) throws IOException
Description copied from interface:TopicMapReferenceIFPUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStorein interfaceTopicMapReferenceIF- Specified by:
createStorein classAbstractTopicMapReference- Throws:
IOException
-
createStore
protected TopicMapStoreIF createStore()
-
close
public void close()
Description copied from interface:TopicMapReferenceIFPUBLIC: 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopicMapReferenceIF- Overrides:
closein classAbstractTopicMapReference
-
-