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
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
FieldsModifier and TypeFieldDescriptionprotected TopicMapRepositoryIFprotected booleanprotected TopicMapStoreFactoryIFprotected TopicMapStoreIFFields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners -
Constructor Summary
ConstructorsConstructorDescriptionMergeReference(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
Modifier and TypeMethodDescriptionvoidclose()PUBLIC: Closes all open stores and the reference itself.protected 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 Details
-
store
-
sfactory
-
repository
-
refkeys
-
reuse_store
protected boolean reuse_store
-
-
Constructor Details
-
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 Details
-
open
public void open()Description copied from interface:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF- Overrides:
openin classAbstractTopicMapReference
-
createStore
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
-
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
-