|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a topic map construct.
Method Summary | |
void |
close()
Closes use of this TopicMap. |
Association |
createAssociation()
Creates a new association in the topic map. |
Locator |
createLocator(java.lang.String reference)
Creates and returns a new Locator object. |
Locator |
createLocator(java.lang.String reference,
java.lang.String notation)
Creates a locator with the specified notation and reference. |
Topic |
createTopic()
Creates a new topic in the topic map. |
java.util.Set |
getAssociations()
Returns all of the associations in the topic map. |
Locator |
getBaseLocator()
Returns the base locator of this topic map. |
java.lang.Object |
getHelperObject(java.lang.Class implementationInterface)
Returns a concrete implementation of a specified helper object interface. |
TopicMapObject |
getObjectById(java.lang.String objectId)
Returns the TopicMapObject managed by this TopicMap with the specified object ID. |
Topic |
getReifier()
Returns the Topic that reifies this topic map. |
TopicMapSystem |
getTopicMapSystem()
Returns the TopicMapSystem to which this topic map belongs. |
java.util.Set |
getTopics()
Returns all of the topics in the topic map. |
void |
mergeIn(TopicMap other)
Merges the TopicMap other into this TopicMap. |
void |
remove()
Removes this TopicMap from the parent TopicMapSystem. |
Methods inherited from interface org.tmapi.core.TopicMapObject |
addSourceLocator, equals, getObjectId, getSourceLocators, getTopicMap, hashCode, removeSourceLocator |
Method Detail |
public TopicMapSystem getTopicMapSystem()
public Locator getBaseLocator()
public java.util.Set getAssociations()
null
.
public Association createAssociation()
public java.util.Set getTopics()
null
.
public Topic createTopic()
public Locator createLocator(java.lang.String reference, java.lang.String notation)
reference
- The reference string of the new locator.notation
- The notation of the new locator.
public Locator createLocator(java.lang.String reference)
reference
- The address string of the new locator.
public Topic getReifier()
null
if the topic map is not reified.public void remove() throws TMAPIException
remove
in interface TopicMapObject
TMAPIException
- if the object cannot be removed from the container. Derived
interfaces may define specific circumstances under which a subclass of TMAPIException
must be raised.
Implementations MUST NOT use a TMAPIException to
wrap a failure raised in the underlying engine - such errors must always be wrapped in a
TMAPIRuntimeException.public TopicMapObject getObjectById(java.lang.String objectId)
objectId
- the object ID of the TopicMapObject to be returned
null
if no TopicMapObject with that ID is managed by
this TopicMappublic void mergeIn(TopicMap other) throws MergeException
other
into this TopicMap.
All Topics and Associations and all of their contents in
other
will be added to this TopicMap. Topics
in other
will be merged with topics in this
TopicMap as defined by XTM merging rules. The merge
process will not modify other
in any way.
other
- the TopicMap to be merged with this TopicMap
SubjectLocatorClashException
- if merging of topics
of this TopicMap instance and the other
cannot be completed because of subjectLocator property
conflicts and the XTM 1.0 processing model is enabled.
MergeException
public java.lang.Object getHelperObject(java.lang.Class implementationInterface) throws UnsupportedHelperObjectException, HelperObjectInstantiationException, HelperObjectConfigurationException
implementationInterface
parameter.
The steps must be applied in the order specified above,
if a step does not result in a fully qualified Java class
name being located, then the next step should be applied.
If all steps are applied without finding an implementation
class name, then an UnsupportedHelperObjectException
exception must be thrown.
If a step results in a value being returned, that value shall
be interpreted as a fully qualified Java class name.
Implementations are free to return either a new instance of
the specified class or a cached instance. If instantiation
of the implementation class results in an exception, this
should be propagated as a
HelperObjectInstantiationException
.
If the implementation class implements the interface
TopicMapSystem.ConfigurableHelperObject
, then before returning
the implementation instance, the method TopicMapSystem.ConfigurableHelperObject.configure(TopicMap)
must be
invoked on the instance. If the method throws a
HelperObjectConfigurationException
, the
exception must be propagated from this method.
implementationInterface
- a Class that specifies
the interface that the returned implementation object
must implement.
implementationInterface
.
UnsupportedHelperObjectException
- if no implementation
of the specified helper interface can be found.
HelperObjectInstantiationException
- if the specified
implementation class could not be loaded or if a new instance
of the helper class could not be instantiated.
HelperObjectConfigurationException
- if the
TopicMapSystem.ConfigurableHelperObject.configure(TopicMap)
method of the helper object implementation raises
an exception.public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |