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

Field Summary
protected  java.util.List 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
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.
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

store

protected TopicMapStoreIF store

sfactory

protected TopicMapStoreFactoryIF sfactory

repository

protected TopicMapRepositoryIF repository

refkeys

protected java.util.List refkeys

reuse_store

protected boolean reuse_store
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

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


Copyright © 2000-2012 Ontopia.