Package net.ontopia.topicmaps.core
Interface TMObjectIF
- All Known Subinterfaces:
AssociationIF,AssociationRoleIF,MAssociation,MAssociationRole,MAssociationRoleWithoutAssociation,MFlatTopic,MOccurrence,MOccurrenceWithoutTopic,MTMObject,MTopic,MTopicMapAsValue,MTopicName,MTopicNameWithoutTopic,MVariantName,NameIF,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.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItemIdentifier(LocatorIF item_identifier) PUBLIC: Adds the given item identifier to the set of item item identifiers for this object.PUBLIC: Gets the item identifiers of this object.PUBLIC: Gets the id of this object.PUBLIC: Gets the topic map that this object belongs to.booleanPUBLIC: Returns true if this object is read-only, otherwise false.voidremove()PUBLIC: Removes the object from its parent.voidremoveItemIdentifier(LocatorIF item_identifier) PUBLIC: Removes the given item identifier from the set of item identifiers.
-
Field Details
-
MSG_NULL_ARGUMENT
- See Also:
-
EVENT_ADD_ITEMIDENTIFIER
- See Also:
-
EVENT_REMOVE_ITEMIDENTIFIER
- See Also:
-
-
Method Details
-
getObjectId
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
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
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
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
-