org.tm4j.topicmap.source
Class TopicMapSourceSupport

java.lang.Object
  extended byorg.tm4j.topicmap.source.TopicMapSourceSupport
All Implemented Interfaces:
TopicMapProvider
Direct Known Subclasses:
TopicMapProviderBase

public abstract class TopicMapSourceSupport
extends java.lang.Object
implements TopicMapProvider

Author:
Kal Ahmed (kal@techquila.com)

Field Summary
 
Fields inherited from interface org.tm4j.topicmap.TopicMapProvider
DEFAULT_OPT_MAKE_CONSISTENT, DEFAULT_OPT_MERGE_REFS, DEFAULT_OPT_NAME_MERGE, DEFAULT_OPT_STATIC_MERGE, OPT_MAKE_CONSISTENT, OPT_MERGE_REFS, OPT_NAME_MERGE, OPT_STATIC_MERGE
 
Constructor Summary
TopicMapSourceSupport()
           
 
Method Summary
 TopicMap addTopicMap(TopicMapSource source)
          Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource
 TopicMap addTopicMap(TopicMapSource source, Topic[] addedThemes)
          Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource
 TopicMap addTopicMap(TopicMapSource source, TopicMap existing)
          Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource
 TopicMap addTopicMap(TopicMapSource source, TopicMap existing, Topic[] addedThemes)
          Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource
 Locator getSourceBaseLocator(TopicMapSource source)
           
protected  TopicMap postProcess(TopicMap tm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tm4j.topicmap.TopicMapProvider
addTopicMap, addTopicMap, addTopicMap, close, createTopicMap, getLocatorFactory, getOpenTransaction, getTopicMap, getTopicMapBaseLocators, getTopicMapBuilder, init, isTransactional, isTransactionOpen, mergeTopicMap, openTransaction, removeTopicMap, supportsTopicMapNotation
 

Constructor Detail

TopicMapSourceSupport

public TopicMapSourceSupport()
Method Detail

addTopicMap

public TopicMap addTopicMap(TopicMapSource source,
                            TopicMap existing)
                     throws TopicMapProviderException
Description copied from interface: TopicMapProvider
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource

Specified by:
addTopicMap in interface TopicMapProvider
Parameters:
source - a implementation of the TopicMapSource interface representing a source for a TopicMap
existing - If this parameter is not null, then the TopicMap object passed in must be a TopicMap which is provided by this TopicMapProvider. The topic map retrieved from source will be merged with existing TopicMap and no new TopicMap object will be created.
Returns:
The new TopicMap object managed by the TopicMapProvider.
Throws:
TopicMapProviderException - if initialisation or access to the TopicMapSource fails

addTopicMap

public TopicMap addTopicMap(TopicMapSource source,
                            TopicMap existing,
                            Topic[] addedThemes)
                     throws TopicMapProviderException
Description copied from interface: TopicMapProvider
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource

Specified by:
addTopicMap in interface TopicMapProvider
Parameters:
source - a implementation of the TopicMapSource interface representing a source for a TopicMap
existing - If this parameter is not null, then the TopicMap object passed in must be a TopicMap which is provided by this TopicMapProvider. The topic map retrieved from source will be merged with existing TopicMap and no new TopicMap object will be created.
addedThemes - themes to be added to the scope of each ScopedObject created by the import process.
Returns:
The new TopicMap object managed by the TopicMapProvider.
Throws:
TopicMapProviderException - if initialisation or access to the TopicMapSource fails

addTopicMap

public TopicMap addTopicMap(TopicMapSource source)
                     throws TopicMapProviderException
Description copied from interface: TopicMapProvider
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource

Specified by:
addTopicMap in interface TopicMapProvider
Parameters:
source - a implementation of the TopicMapSource interface representing a source for a TopicMap
Returns:
The new TopicMap object managed by the TopicMapProvider.
Throws:
TopicMapProviderException - if initialisation or access to the TopicMapSource fails

addTopicMap

public TopicMap addTopicMap(TopicMapSource source,
                            Topic[] addedThemes)
                     throws TopicMapProviderException
Description copied from interface: TopicMapProvider
Imports a topic map into the data store managed by this TopicMapProvider from the specified TopicMapSource

Specified by:
addTopicMap in interface TopicMapProvider
Parameters:
source - a implementation of the TopicMapSource interface representing a source for a TopicMap
addedThemes - themes to be added to the scope of each ScopedObject created by the import process.
Returns:
The new TopicMap object managed by the TopicMapProvider.
Throws:
TopicMapProviderException - if initialisation or access to the TopicMapSource fails

getSourceBaseLocator

public Locator getSourceBaseLocator(TopicMapSource source)
                             throws TopicMapProviderException
Throws:
TopicMapProviderException

postProcess

protected TopicMap postProcess(TopicMap tm)
                        throws TopicMapProviderException
Throws:
TopicMapProviderException