net.ontopia.topicmaps.utils
Class MergeReference

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractTopicMapReference
      extended by net.ontopia.topicmaps.utils.MergeReference
All Implemented Interfaces:
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

Constructor Summary
MergeReference(java.lang.String id, java.lang.String title, TopicMapStoreFactoryIF sfactory, TopicMapRepositoryIF repository, java.util.List refkeys)
          INTERNAL: Creates a TopicMapReferenceIF which references the result of merging a number of topic maps
 
Method Summary
 void close()
          PUBLIC: Closes all open stores and the reference itself.
 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, isDeleted, isOpen, registerTopicListeners, removeTopicListener, setId, setSource, setTitle, storeClosed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeReference

public MergeReference(java.lang.String id,
                      java.lang.String title,
                      TopicMapStoreFactoryIF sfactory,
                      TopicMapRepositoryIF repository,
                      java.util.List 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 interface TopicMapReferenceIF
Overrides:
open in class AbstractTopicMapReference

createStore

public TopicMapStoreIF createStore(boolean readonly)
                            throws java.io.IOException
Description copied from interface: TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.

Specified by:
createStore in interface TopicMapReferenceIF
Specified by:
createStore in class AbstractTopicMapReference
Throws:
java.io.IOException

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 interface TopicMapReferenceIF
Overrides:
close in class AbstractTopicMapReference


Copyright © 2000-2010 Ontopia.