|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmapi.core.TopicMapSystemFactory
public abstract class 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(String, boolean)
and / or
setProperty(String, Object)
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.Object |
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 enable)
Sets a particular feature in the underlying implementation of TopicMapSystem . |
abstract void |
setProperty(java.lang.String propertyName,
java.lang.Object 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 boolean hasFeature(java.lang.String featureName)
TopicMapSystem
.
Opposite to getFeature(java.lang.String)
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.
TopicMapSystem
instances created by this factory;
false if the named feature is disabled for
TopicMapSystem
instances created by this factory.
FeatureNotRecognizedException
- If the underlying implementation does not recognize the
named feature.public abstract void setFeature(java.lang.String featureName, boolean enable) 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 set.enable
- true to enable the feature,
false to disable it.
FeatureNotRecognizedException
- If the underlying implementation
does not recognize the named feature.
FeatureNotSupportedException
- If the underlying implementation
recognizes the named feature but does not support enabling or
disabling it (as specified by the enabled parameter.public abstract java.lang.Object 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.
public abstract void setProperty(java.lang.String propertyName, java.lang.Object 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 set.value
- The value to be set of this property or null to
remove the property from the current factory configuration.public abstract TopicMapSystem newTopicMapSystem() throws TMAPIException
TopicMapSystem
instance using the currently
configured factory parameters.
TopicMapSystem
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |