org.ceryle.tm
Class TopicMapServices

java.lang.Object
  extended by org.ceryle.tm.TopicMapServices

public class TopicMapServices
extends Object

Provides an overarching service for all TopicMapProcessors and TopicMapProviders used within the application, such that any TopicMapProcessor's TopicMap objects are available from the service, which aims to eventually (re)implement TopicMapManager (see note below). Note that each TopicMapProcessor contains one provider, so this service basically performs a registration and referral function.

From the API description:

This interface is implemented by classes which provide aggregation services for TopicMapProviders. One or more TopicMapProviders may be registered with the TopicMapManager and applications may then access any of the TopicMaps handled by the TopicMapProviders.

NOTE ON THIS CONFUSION: This class initially implemented the TopicMapManager API, but with the changes incorporated between TM4J 0.8.x and 0.9.7, many of the methods dealing with multiple providers were unnecessary, and currently throw an UnsupportedOperationException. Most operations dealing with operating via multiple providers (TopicMapProcessors) are not yet supported, so we no longer claim to implement the API, though that may be again supported in the future.

Since:
JDK1.4
Version:
$Id: TopicMapServices.java,v 3.6 2007-06-15 12:09:33 altheim Exp $
Author:
Murray Altheim

Constructor Summary
TopicMapServices(Services services)
           
 
Method Summary
 TopicMapProvider getProvider(TopicMap tm)
          Returns a handle to the TopicMapProvider which manages the storage for the specified topic map.
 TopicMapProcessor getTopicMapProcessor()
          Returns a TopicMapProcessor providing topic map processing services.
 TopicMapProcessor getTopicMapProcessor(boolean create)
          Returns a TopicMapProcessor providing topic map processing services.
 void storeTopicMap(File file, TopicMap topicmap)
          Stores the TopicMap into the given File.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopicMapServices

public TopicMapServices(Services services)
Method Detail

getTopicMapProcessor

public TopicMapProcessor getTopicMapProcessor()
                                       throws TopicMapException
Returns a TopicMapProcessor providing topic map processing services. This will be the last TopicMapProcessor object created. The processor is not created until the first time this method is called.

Throws:
TopicMapException

getTopicMapProcessor

public TopicMapProcessor getTopicMapProcessor(boolean create)
                                       throws TopicMapException
Returns a TopicMapProcessor providing topic map processing services. The processor is not created until the first time this method is called. If the boolean create is true, this will create and return a new processor, otherwise it is a reference to the last processor created. This does not affect any existing processors managed by this TopicMapManager.

Throws:
TopicMapException

getProvider

public TopicMapProvider getProvider(TopicMap tm)
Returns a handle to the TopicMapProvider which manages the storage for the specified topic map.


storeTopicMap

public void storeTopicMap(File file,
                          TopicMap topicmap)
                   throws TopicMapProcessingException
Stores the TopicMap into the given File. This method is a shortcut for using the TopicMapSerializer.

Throws:
TopicMapProcessingException


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.