|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the topic map member construct (known as association role in HyTM). This class represents a normalised association member. In normalising the members of an association, one member must be created for each of the role players of the association. For example the following (XTM) association would result in three Member objects.
<association> <member> <instanceOf><topicRef xlink:href="#parent"/></instanceOf> <topicRef xlink:href="#homer"/> </member> <member> <instanceOf><topicRef xlink:href="#child"/></instanceOf> <topicRef xlink:href="#bart"/> <topicRef xlink:href="#lisa"/> </member> </association>
Method Summary | |
Association |
getAssociation()
Returns the association to which this AssociationRole belongs. |
Topic |
getPlayer()
Returns the player of this AssociationRole. |
Topic |
getReifier()
Returns the Topic that reifies this association role. |
Topic |
getType()
Returns the topic which defines the type of this AssociationRole |
void |
remove()
Removes this AssociationRole from the collection of AssociationRoles managed by the parent Association. |
void |
setPlayer(Topic player)
Sets the player of this AssociationRole. |
void |
setType(Topic type)
Sets the topic which defines the type of this AssociationRole. |
Methods inherited from interface org.tmapi.core.TopicMapObject |
addSourceLocator, equals, getObjectId, getSourceLocators, getTopicMap, hashCode, removeSourceLocator |
Method Detail |
public Association getAssociation()
public void setPlayer(Topic player)
player
overwrites any previous value.
player
- The topic which plays this role in the association,
or null
if no topic plays this role.public Topic getPlayer()
null
if there is no role player.public Topic getType()
null
if there is no role-defining topic.public void setType(Topic type)
type
- The Topic which defines the type of this
AssociationRole, or null
to remove any
existing role-defining topic.public Topic getReifier()
null
if the association role is not reified.public void remove() throws TMAPIException
player
and type
properties are not
affected by this method.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |