net.ontopia.topicmaps.core
Interface TMObjectIF

All Known Subinterfaces:
AssociationIF, AssociationRoleIF, OccurrenceIF, ReifiableIF, ScopedIF, TopicIF, TopicMapIF, TopicNameIF, TypedIF, VariantNameIF
All Known Implementing Classes:
Association, Association, AssociationRole, AssociationRole, DynamicAssociation, DynamicAssociationRole, Occurrence, Occurrence, PhantomAssociation, ReadOnlyAssociation, ReadOnlyAssociationRole, ReadOnlyOccurrence, ReadOnlyTMObject, ReadOnlyTopic, ReadOnlyTopicMap, ReadOnlyTopicName, ReadOnlyVariantName, RemoteTopic, SnapshotOccurrence, SnapshotTMObject, SnapshotTopic, SnapshotTopicName, SnapshotVariantName, TMObject, TMObject, Topic, Topic, TopicMap, TopicMap, TopicName, TopicName, VariantName, VariantName

public interface TMObjectIF

PUBLIC: The base topic map object interface that all topic map objects implement. This interface serves as a common supertype for all topic map objects, making very generic utilities possible.

If an object implementing this interface is marked as unmodifiable, then an UnsupportedOperationException is thrown from any method that causes a change in the state of that object.


Method Summary
 void addItemIdentifier(LocatorIF item_identifier)
          PUBLIC: Adds the given item identifier to the set of item item identifiers for this object.
 java.util.Collection<LocatorIF> getItemIdentifiers()
          PUBLIC: Gets the item identifiers of this object.
 java.lang.String getObjectId()
          PUBLIC: Gets the id of this object.
 TopicMapIF getTopicMap()
          PUBLIC: Gets the topic map that this object belongs to.
 boolean isReadOnly()
          PUBLIC: Returns true if this object is read-only, otherwise false.
 void remove()
          PUBLIC: Removes the object from its parent.
 void removeItemIdentifier(LocatorIF item_identifier)
          PUBLIC: Removes the given item identifier from the set of item identifiers.
 

Method Detail

getObjectId

java.lang.String getObjectId()
PUBLIC: Gets the id of this object. The object id is part of the topic map id space, and must be unique. The object id is not significant (or unique) outside the current topic map. The object id is immutable. The object id is thus stable through this object's lifetime.

Returns:
string which is this object's id.

isReadOnly

boolean isReadOnly()
PUBLIC: Returns true if this object is read-only, otherwise false.

Returns:
read-only (true) or not read-only (false).

getTopicMap

TopicMapIF getTopicMap()
PUBLIC: Gets the topic map that this object belongs to. If the object has been removed from its topic map or not added to a topic map yet this will be null.

Returns:
A topic map; an object implementing TopicMapIF.

getItemIdentifiers

java.util.Collection<LocatorIF> getItemIdentifiers()
PUBLIC: Gets the item identifiers of this object. These locators are pointers back to the locations from where this object originated.

The purpose is to enable the engine to detect when references to external objects refer to objects that are already present within the system, such as topic maps which are already loaded.

Returns:
A collection of LocatorIF objects addressing the item.
Since:
4.0

addItemIdentifier

void addItemIdentifier(LocatorIF item_identifier)
                       throws ConstraintViolationException
PUBLIC: Adds the given item identifier to the set of item item identifiers for this object.

Parameters:
item_identifier - The item identifier to be added; an object implementing LocatorIF.
Throws:
ConstraintViolationException - Thrown if another object in the same topic map already has the given item identifier.
Since:
4.0

removeItemIdentifier

void removeItemIdentifier(LocatorIF item_identifier)
PUBLIC: Removes the given item identifier from the set of item identifiers. If this object does not have the given item identifier the call has no effect.

Parameters:
item_identifier - The item identifier to be removed; an object implementing LocatorIF.
Since:
4.0

remove

void remove()
PUBLIC: Removes the object from its parent.

Since:
4.0


Copyright © 2000-2012 Ontopia.