|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmapi.core.TopicMapSystemFactory
This factory class provides access to a topic map system. A new TopicMapSystem instance is created by invoking the newTopicMapSystem() method. Configuration properties for the new TopicMapSystem instance can be set by calling the setFeature() and/or setProperty() methods prior to invoking newTopicMapSystem().
Constructor Summary | |
TopicMapSystemFactory()
|
Method Summary | |
abstract boolean |
getFeature(java.lang.String featureName)
Returns the particular feature requested for in the underlying implementation of TopicMapSystem . |
abstract java.lang.String |
getProperty(java.lang.String propertyName)
Gets the value of a property in the underlying implementation of TopicMapSystem . |
abstract boolean |
hasFeature(java.lang.String featureName)
Returns if the particular feature is supported by the TopicMapSystem . |
static TopicMapSystemFactory |
newInstance()
Obtain a new instance of a TopicMapSystemFactory. |
abstract TopicMapSystem |
newTopicMapSystem()
Creates a new TopicMapSystem instance using the currently configured factory parameters. |
abstract void |
setFeature(java.lang.String featureName,
boolean value)
Sets a particular feature in the underlying implementation of TopicMapSystem . |
abstract void |
setProperties(java.util.Properties props)
Sets the properties in the underlying implementation of TopicMapSystem . |
abstract void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Sets a property in the underlying implementation of TopicMapSystem . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopicMapSystemFactory()
Method Detail |
public abstract TopicMapSystem newTopicMapSystem() throws TMAPIException
TMAPIException
- if a TopicMapSystem cannot be created which
satisfies the requested configuration.public static TopicMapSystemFactory newInstance() throws FactoryConfigurationException
org.tmapi.core.TopicMapSystemFactory
system property.
The value of this property is the fully qualified name of the
implementation class to use.
lib/tmapi.properties
in the JRE directory.
This configuration file is in standard java.util.Properties format
and contains the fully qualified name of the implementation class
with the key being the system property defined above.
META-INF/services/org.tmapi.TopicMapSystemFactory
in jars available to the runtime.
Once an application has obtained a reference to a TopicMapSystemFactory it can use the factory to configure and obtain TopicMapSystem instances.
FactoryConfigurationException
public abstract boolean hasFeature(java.lang.String featureName)
TopicMapSystem
.
Opposite to #getFeature this method returns if the requested feature is
generally available / supported by the underlying TopicMapSystem
and does not return the state (enabled/disabled) of the feature.
featureName
- the name of the feature to check
public abstract boolean getFeature(java.lang.String featureName) throws FeatureNotRecognizedException
TopicMapSystem
.
featureName
- the name of the feature to check
FeatureNotRecognizedException
- if the underlying implementation does not
recongnize the named feature.public abstract void setFeature(java.lang.String featureName, boolean value) throws FeatureNotSupportedException, FeatureNotRecognizedException
TopicMapSystem
. A list of the core features
can be found at
http://tmapi.org/features/
featureName
- the name of the feature to be setvalue
- true to enable the feature, false to disable it
FeatureNotRecognizedException
- if the underlying implementation does not
recongnize the named feature.
FeatureNotSupportedException
- if the underlying implementation recongnizes the
named feature but does not support enabling or disabling it (as specified by the value
parameter.public abstract java.lang.String getProperty(java.lang.String propertyName)
TopicMapSystem
.
A list of the core properties defined by TMAPI can be found at
http://tmapi.org/properties/. An implementation is free to
support properties other than the core ones.
propertyName
- the name of the property to retrieve.
null
if no value is currently
set for the property.public abstract void setProperty(java.lang.String propertyName, java.lang.String value)
TopicMapSystem
.
A list of the core
properties defined by TMAPI can be found at
http://tmapi.org/properties/. An implementation is free to
support properties other than the core ones.
propertyName
- the name of the property to be setvalue
- the value to be set of this property or null
to remove the
property from the current factory configuration.public abstract void setProperties(java.util.Properties props)
TopicMapSystem
.
props
- The properties to be used to initialise the
system.setProperty(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |