|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Association

Represents an association item.
| Method Summary | |
|---|---|
Role |
createRole(Topic type,
Topic player)
Creates a new Role representing a role in this association. |
TopicMap |
getParent()
Returns the topic map to which this association belongs. |
java.util.Set<Role> |
getRoles()
Returns the roles participating in this association. |
java.util.Set<Role> |
getRoles(Topic type)
Returns all roles with the specified type. |
java.util.Set<Topic> |
getRoleTypes()
Returns the role types participating in this association. |
| Methods inherited from interface org.tmapi.core.Reifiable |
|---|
getReifier, setReifier |
| Methods inherited from interface org.tmapi.core.Typed |
|---|
getType, setType |
| Methods inherited from interface org.tmapi.core.Scoped |
|---|
addTheme, getScope, removeTheme |
| Methods inherited from interface org.tmapi.core.Construct |
|---|
addItemIdentifier, equals, getId, getItemIdentifiers, getTopicMap, hashCode, remove, removeItemIdentifier |
| Method Detail |
|---|
TopicMap getParent()
getParent in interface ConstructConstruct.getParent()java.util.Set<Role> getRoles()
Roles.java.util.Set<Topic> getRoleTypes()
This method returns the same result as the following code:
Set<Topic> types = new HashSet<Topic>();
for (Role role: assoc.getRoles()) {
types.add(role.getType());
}
The return value may be empty but must never be null.
java.util.Set<Role> getRoles(Topic type)
This method returns the same result as the following code:
Set<Role> roles = new HashSet<Role>();
for (Role role: assoc.getRoles()) {
if (role.getType().equals(type)) {
roles.add(role);
}
}
The return value may be empty but must never be null.
type - The type of the Role instances to be returned,
must not be null.
java.lang.IllegalArgumentException - In case the type is null.
Role createRole(Topic type,
Topic player)
throws ModelConstraintException
Role representing a role in this association.
type - The role type; MUST NOT be null.player - The role player; MUST NOT be null.
ModelConstraintException - In case the role type or
player is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||