Package moise.oe
Class RolePlayer
- java.lang.Object
-
- moise.oe.Player
-
- moise.oe.RolePlayer
-
- All Implemented Interfaces:
java.io.Serializable
,ToXML
public class RolePlayer extends Player implements ToXML
Represents the Role that an agent is playing in a group.- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private GroupInstance
gr
private Role
role
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protected
RolePlayer(Role role, OEAgent ag, GroupInstance gr)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
org.w3c.dom.Element
getAsDOM(org.w3c.dom.Document document)
GroupInstance
getGroup()
java.util.Collection<Link>
getLinks(java.lang.String type)
gives all links of typetype
(e.g.private java.util.Collection<Permission>
getNorms(NS.OpTypes type)
java.util.Collection<Permission>
getObligations()
returns a collection of missions this role player is obliged to commit to.java.util.Collection<Permission>
getPermissions()
returns a collection of missions where this role player is permitted to commit to.Role
getRole()
static java.lang.String
getXMLTag()
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
role
private final Role role
-
gr
private final GroupInstance gr
-
-
Constructor Detail
-
RolePlayer
protected RolePlayer(Role role, OEAgent ag, GroupInstance gr) throws MoiseConsistencyException
- Throws:
MoiseConsistencyException
-
-
Method Detail
-
getRole
public Role getRole()
-
getGroup
public GroupInstance getGroup()
-
getLinks
public java.util.Collection<Link> getLinks(java.lang.String type)
gives all links of typetype
(e.g. "communication") that this role player has. if type is null, all links are given
-
getObligations
public java.util.Collection<Permission> getObligations()
returns a collection of missions this role player is obliged to commit to. each element in the returned collection is an Permission Object where: getRolePlayer() is the RolePlayer (rp), in this case "this" role player; getMission() is the Mission (m); and getScheme() is the Scheme instance (sch) where the rp is obligated to commit to m.
-
getPermissions
public java.util.Collection<Permission> getPermissions()
returns a collection of missions where this role player is permitted to commit to. each element in the returned collection is a Permission Object where: getRolePlayer() is the RolePlayer (rp), in this case "this" role player; getMission() is the Mission (m); and getScheme() is the Scheme instance (sch) where the rp is obligated to commit to m.
-
getNorms
private java.util.Collection<Permission> getNorms(NS.OpTypes type)
-
getXMLTag
public static java.lang.String getXMLTag()
-
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-