de.topicmapslab.majortom.store
Class TopicMapStoreFactory

java.lang.Object
  extended by de.topicmapslab.majortom.store.TopicMapStoreFactory

public class TopicMapStoreFactory
extends java.lang.Object

Factory implementation creating a topic map store object from given runtime properties.

Author:
Sven Krosse

Nested Class Summary
private static class TopicMapStoreFactory.TMStoreFactory
           
 
Field Summary
private static java.util.List<java.lang.String> defaultTopicMapStores
           
private static java.util.Map<java.lang.String,de.topicmapslab.majortom.model.store.ITopicMapStoreFactory> storeFactories
           
 
Constructor Summary
TopicMapStoreFactory()
           
 
Method Summary
static de.topicmapslab.majortom.model.store.ITopicMapStore createTopicMapStore(org.tmapi.core.TopicMapSystemFactory factory, de.topicmapslab.majortom.model.core.ITopicMapSystem topicMapSystem, org.tmapi.core.Locator topicMapBaseLocator)
          Create a new topic map store object using the properties given by the first argument.
static java.util.Map<java.lang.String,de.topicmapslab.majortom.model.store.ITopicMapStoreFactory> getStoreFactories()
          Returns a map of store factories initialized by OSGi or Java services.
private static void initStoreFactories()
          loads the store list either from the bundle activator or from the services
private static de.topicmapslab.majortom.model.store.ITopicMapStoreFactory loadWithJavaServices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultTopicMapStores

private static final java.util.List<java.lang.String> defaultTopicMapStores

storeFactories

private static java.util.Map<java.lang.String,de.topicmapslab.majortom.model.store.ITopicMapStoreFactory> storeFactories
Constructor Detail

TopicMapStoreFactory

public TopicMapStoreFactory()
Method Detail

createTopicMapStore

public static de.topicmapslab.majortom.model.store.ITopicMapStore createTopicMapStore(org.tmapi.core.TopicMapSystemFactory factory,
                                                                                      de.topicmapslab.majortom.model.core.ITopicMapSystem topicMapSystem,
                                                                                      org.tmapi.core.Locator topicMapBaseLocator)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new topic map store object using the properties given by the first argument.

Parameters:
factory - the factory containing the set properties
topicMapSystem - the topic map system
topicMapBaseLocator - the base locator of the topic map TopicMap.getLocator()
Returns:
the generated topic map store
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if the topic map store cannot create

loadWithJavaServices

private static de.topicmapslab.majortom.model.store.ITopicMapStoreFactory loadWithJavaServices()

getStoreFactories

public static java.util.Map<java.lang.String,de.topicmapslab.majortom.model.store.ITopicMapStoreFactory> getStoreFactories()
Returns a map of store factories initialized by OSGi or Java services.

Returns:
a map of store factories initialized by OSGi or Java services

initStoreFactories

private static void initStoreFactories()
loads the store list either from the bundle activator or from the services