public class T2WAssociation extends java.lang.Object implements Association
Modifier and Type | Field and Description |
---|---|
protected org.tmapi.core.Association |
a |
protected T2WTopicMap |
tm |
Constructor and Description |
---|
T2WAssociation(T2WTopicMap tm,
org.tmapi.core.Association a) |
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(Topic player,
Topic role)
Sets the player with the specified role replacing previous player with
that role if it exists already.
|
void |
addPlayers(java.util.Map<Topic,Topic> players)
Adds players to the association.
|
Topic |
getPlayer(Topic role)
Gets the player with the specified role.
|
java.util.Collection<Topic> |
getRoles()
Gets a Collection of Topics containing the roles of this association.
|
TopicMap |
getTopicMap()
Gets the topic map this association belongs to.
|
Topic |
getType()
Gets the type of this association.
|
boolean |
isRemoved()
Tests if this association has been removed and thus this object is now
invalid.
|
void |
remove()
Removes this association.
|
void |
removePlayer(Topic role)
Removes the player with the specified role.
|
void |
setType(Topic t)
Sets the type of this association replacing the previous type.
|
protected T2WTopicMap tm
protected org.tmapi.core.Association a
public T2WAssociation(T2WTopicMap tm, org.tmapi.core.Association a)
public Topic getType() throws TopicMapException
Association
getType
in interface Association
TopicMapException
public void setType(Topic t) throws TopicMapException
Association
setType
in interface Association
TopicMapException
public Topic getPlayer(Topic role) throws TopicMapException
Association
getPlayer
in interface Association
TopicMapException
public void addPlayer(Topic player, Topic role) throws TopicMapException
Association
addPlayer
in interface Association
TopicMapException
public void addPlayers(java.util.Map<Topic,Topic> players) throws TopicMapException
Association
addPlayers
in interface Association
TopicMapException
public void removePlayer(Topic role) throws TopicMapException
Association
removePlayer
in interface Association
TopicMapException
public java.util.Collection<Topic> getRoles() throws TopicMapException
Association
getRoles
in interface Association
TopicMapException
public TopicMap getTopicMap()
Association
getTopicMap
in interface Association
public void remove() throws TopicMapException
Association
remove
in interface Association
TopicMapException
public boolean isRemoved() throws TopicMapException
Association
isRemoved
in interface Association
TopicMapException
Copyright 2004-2015 Wandora Team