Package net.ontopia.topicmaps.core
Interface TopicMapIF
-
- All Superinterfaces:
ReifiableIF
,TMObjectIF
- All Known Subinterfaces:
MTopicMapAsValue
- All Known Implementing Classes:
ReadOnlyTopicMap
,TopicMap
,TopicMap
public interface TopicMapIF extends TMObjectIF, ReifiableIF
PUBLIC: Represents an entire topic map.
-
-
Field Summary
Fields Modifier and Type Field Description static String
EVENT_ADD_ASSOCIATION
static String
EVENT_ADD_TOPIC
static String
EVENT_REMOVE_ASSOCIATION
static String
EVENT_REMOVE_TOPIC
-
Fields inherited from interface net.ontopia.topicmaps.core.ReifiableIF
EVENT_SET_REIFIER
-
Fields inherited from interface net.ontopia.topicmaps.core.TMObjectIF
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
PUBLIC: Clears the topic map by removing all topics and associations.Collection<AssociationIF>
getAssociations()
PUBLIC: Gets all associations in this topic map.TopicMapBuilderIF
getBuilder()
PUBLIC: Gets a topic map builder for use with this transaction.Object
getIndex(String name)
PUBLIC: Gets an index by name.TMObjectIF
getObjectById(String object_id)
PUBLIC: Gets the topic map object that has the given object id, from this topic map.TMObjectIF
getObjectByItemIdentifier(LocatorIF locator)
PUBLIC: Gets the topic map object that has the given item identifier (given as a LocatorIF object), from this topic map.TopicMapStoreIF
getStore()
PUBLIC: Gets the store to which the topic map's transaction is connected.TopicIF
getTopicBySubjectIdentifier(LocatorIF locator)
PUBLIC: Gets the topic that has the specified subject identifier, given as a locator.TopicIF
getTopicBySubjectLocator(LocatorIF locator)
PUBLIC: Gets the topic in this topic map that represents the given addressable subject (locator given as a LocatorIF object).Collection<TopicIF>
getTopics()
PUBLIC: Gets all topics in this topic map.-
Methods inherited from interface net.ontopia.topicmaps.core.ReifiableIF
getReifier, setReifier
-
Methods inherited from interface net.ontopia.topicmaps.core.TMObjectIF
addItemIdentifier, getItemIdentifiers, getObjectId, getTopicMap, isReadOnly, remove, removeItemIdentifier
-
-
-
-
Field Detail
-
EVENT_ADD_TOPIC
static final String EVENT_ADD_TOPIC
- See Also:
- Constant Field Values
-
EVENT_REMOVE_TOPIC
static final String EVENT_REMOVE_TOPIC
- See Also:
- Constant Field Values
-
EVENT_ADD_ASSOCIATION
static final String EVENT_ADD_ASSOCIATION
- See Also:
- Constant Field Values
-
EVENT_REMOVE_ASSOCIATION
static final String EVENT_REMOVE_ASSOCIATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStore
TopicMapStoreIF getStore()
PUBLIC: Gets the store to which the topic map's transaction is connected.- Since:
- 2.0
-
getBuilder
TopicMapBuilderIF getBuilder()
PUBLIC: Gets a topic map builder for use with this transaction.- Returns:
- An object implementing TopicMapBuilderIF
- Since:
- 4.0
-
getIndex
Object getIndex(String name)
PUBLIC: Gets an index by name. An index is usually named by the IndexIF subinterface that it implements. All indexes are kept up-to-date at all times.- Parameters:
name
- A string; the index name, i.e.g the interface that it implements.- Returns:
- An instance implementing the index interface.
- Throws:
OntopiaUnsupportedException
- Thrown if the index is either unknown or not supported.- Since:
- 4.0
-
getTopics
Collection<TopicIF> getTopics()
PUBLIC: Gets all topics in this topic map. No specific order is guaranteed.- Returns:
- A collection of TopicIF objects.
-
getAssociations
Collection<AssociationIF> getAssociations()
PUBLIC: Gets all associations in this topic map. No specific order is guaranteed.- Returns:
- A collection of AssociationIF objects.
-
getObjectById
TMObjectIF getObjectById(String object_id)
PUBLIC: Gets the topic map object that has the given object id, from this topic map. If there is no object with that object id in this topic map, then null is returned.- Parameters:
object_id
- A string; the object id of the object to get.- Returns:
- A topic map object; an object implementing TMObjectIF.
-
getObjectByItemIdentifier
TMObjectIF getObjectByItemIdentifier(LocatorIF locator)
PUBLIC: Gets the topic map object that has the given item identifier (given as a LocatorIF object), from this topic map. If there is no object with the given locator in this topic map, null is returned.- Parameters:
locator
- The given locator; an object implementing LocatorIF.- Returns:
- A topic map object; an object implementing TMObjectIF.
-
getTopicBySubjectLocator
TopicIF getTopicBySubjectLocator(LocatorIF locator)
PUBLIC: Gets the topic in this topic map that represents the given addressable subject (locator given as a LocatorIF object). If there is no topic that represents the given addressable subject in this topic map, null is returned.- Parameters:
locator
- The given locator; an object implementing LocatorIF.- Returns:
- A topic; an object implementing TopicIF.
-
getTopicBySubjectIdentifier
TopicIF getTopicBySubjectIdentifier(LocatorIF locator)
PUBLIC: Gets the topic that has the specified subject identifier, given as a locator. If there is no topic that has that subject identifier in this topic map, null is returned.- Parameters:
locator
- The given locator; an object implementing LocatorIF.- Returns:
- A topic; an object implementing TopicIF.
-
clear
void clear()
PUBLIC: Clears the topic map by removing all topics and associations.- Since:
- 4.0
-
-