public class DynamicAssociationRole extends AssociationRole
player, reifier, type
oid, parent, sources, topicmap
EVENT_ADDED, EVENT_REMOVED, EVENT_SET_PLAYER, EVENT_SET_TYPE
EVENT_SET_REIFIER
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENT
Constructor and Description |
---|
DynamicAssociationRole(TopicMap tm) |
Modifier and Type | Method and Description |
---|---|
void |
addItemIdentifier(LocatorIF source_locator)
PUBLIC: Adds the given item identifier to the set of item
item identifiers for this object.
|
boolean |
equals(DynamicAssociationRole obj) |
boolean |
equals(Object obj) |
AssociationIF |
getAssociation()
PUBLIC: Gets the association to which this association role
belongs.
|
Collection<LocatorIF> |
getItemIdentifiers()
PUBLIC: Gets the item identifiers of this object.
|
String |
getObjectId()
PUBLIC: Gets the id of this object.
|
TopicIF |
getPlayer()
PUBLIC: Gets the topic that plays this association role (this member of the association).
|
TopicMapIF |
getTopicMap()
PUBLIC: Gets the topic map that this object belongs to.
|
TopicIF |
getType()
PUBLIC: Gets the type that this object is an instance of.
|
int |
hashCode() |
boolean |
isConnected() |
boolean |
isReadOnly()
PUBLIC: Returns true if this object is read-only, otherwise false.
|
void |
removeItemIdentifier(LocatorIF source_locator)
PUBLIC: Removes the given item identifier from the set of item
identifiers.
|
void |
setPlayer(TopicIF player)
PUBLIC: Sets the topic that plays this association role.
|
void |
setTarget(AssociationRole aRole) |
void |
setType(TopicIF type)
PUBLIC: Sets the type that this object is an instance of.
|
String |
toString() |
fireEvent, getReifier, remove, setAssociation, setReifier
public DynamicAssociationRole(TopicMap tm)
tm
- public AssociationIF getAssociation()
AssociationRoleIF
getAssociation
in interface AssociationRoleIF
getAssociation
in class AssociationRole
public TopicIF getPlayer()
AssociationRoleIF
getPlayer
in interface AssociationRoleIF
getPlayer
in class AssociationRole
public TopicIF getType()
TypedIF
getType
in interface TypedIF
getType
in class AssociationRole
public boolean isConnected()
isConnected
in class AssociationRole
public void setPlayer(TopicIF player)
AssociationRoleIF
setPlayer
in interface AssociationRoleIF
setPlayer
in class AssociationRole
player
- The topic (member) which plays this role in the association.
Can be null; if null, then the effect is that there is no player
of this role in this association.public void setType(TopicIF type)
TypedIF
setType
in interface TypedIF
setType
in class AssociationRole
type
- The type for this object; an object implementing TopicIF.public void setTarget(AssociationRole aRole)
public String toString()
toString
in class AssociationRole
public void addItemIdentifier(LocatorIF source_locator) throws ConstraintViolationException
TMObjectIF
addItemIdentifier
in interface TMObjectIF
addItemIdentifier
in class TMObject
source_locator
- The item identifier to be added; an object implementing LocatorIF.ConstraintViolationException
- Thrown if another object
in the same topic map already has the given item
identifier.public String getObjectId()
TMObjectIF
getObjectId
in interface TMObjectIF
getObjectId
in class TMObject
public Collection<LocatorIF> getItemIdentifiers()
TMObjectIF
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.
getItemIdentifiers
in interface TMObjectIF
getItemIdentifiers
in class TMObject
public TopicMapIF getTopicMap()
TMObjectIF
getTopicMap
in interface TMObjectIF
getTopicMap
in class TMObject
public boolean isReadOnly()
TMObjectIF
isReadOnly
in interface TMObjectIF
isReadOnly
in class TMObject
public void removeItemIdentifier(LocatorIF source_locator)
TMObjectIF
removeItemIdentifier
in interface TMObjectIF
removeItemIdentifier
in class TMObject
source_locator
- The item identifier to be removed; an object implementing LocatorIF.public boolean equals(DynamicAssociationRole obj)