public class Role extends MoiseElement implements ToXML
Modifier and Type | Field and Description |
---|---|
protected boolean |
isAbstract |
protected SS |
ss |
protected java.util.Set<Role> |
superRoles |
debug
Constructor and Description |
---|
Role(java.lang.String id,
SS ss)
Creates a new Role
|
Modifier and Type | Method and Description |
---|---|
void |
addSuperRole(java.lang.String superId) |
boolean |
containsSuperRole(Role r)
returns true if some of the direct super roles is equal r
|
java.util.Map<java.lang.String,Role> |
getAllSuperRoles()
gets the super roles of this role (including the super roles of the super roles....,
but excluding this role).
|
org.w3c.dom.Element |
getAsDetailedDom(org.w3c.dom.Document document) |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document) |
java.util.Collection<Compatibility> |
getCompatibilities(Group gr)
gets all compatibilities for this role (and its super roles) in the context of the GrSpec
|
java.util.Collection<Norm> |
getDeonticRelations()
gets all deontic relations (obligations, permissions, ...) for this role (and its super roles)
|
java.util.Map<java.lang.String,Role> |
getEntailedRoles()
gets the super roles of this role (including this role, the super roles of the super roles....)
The returned map keys are the roles' id (String) and the value is the role
|
java.util.Collection<Group> |
getGroups()
gets a list of groups where this role can be played
|
java.util.Collection<Link> |
getLinks(Group gr)
gets all links for this role (and its super roles) in the context of the GrSpec
|
java.util.Collection<Norm> |
getNorms(NS.OpTypes type,
java.lang.String mission)
gets norms for this role (and its super roles).
|
java.lang.Object |
getProperty(java.lang.String id)
gets properties of this role (it also looks at
super roles properties not "over written"
|
java.util.Collection<Role> |
getSubRoles()
gets the direct specialisations (sub-roles) of this role.
|
java.util.Collection<Role> |
getSuperRoles()
gets the super roles of this role
|
static java.lang.String |
getXMLTag() |
boolean |
hasNorm(NS.OpTypes type,
java.lang.String mission)
returns true if this role has a norm towards the mission.
|
boolean |
isAbstract() |
protected void |
setAbstract(boolean a) |
void |
setFromDOM(org.w3c.dom.Element ele) |
void |
setSS(SS ss) |
compareTo, equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty, toString
protected java.util.Set<Role> superRoles
protected boolean isAbstract
protected SS ss
public Role(java.lang.String id, SS ss)
ss
- the SS this role will belongs toid
- the identification of the rolepublic void setSS(SS ss)
public void addSuperRole(java.lang.String superId) throws MoiseConsistencyException
MoiseConsistencyException
public java.util.Collection<Role> getSuperRoles()
public boolean containsSuperRole(Role r)
public java.util.Map<java.lang.String,Role> getAllSuperRoles()
public java.util.Map<java.lang.String,Role> getEntailedRoles()
public java.util.Collection<Role> getSubRoles()
public java.util.Collection<Group> getGroups()
public java.util.Collection<Compatibility> getCompatibilities(Group gr)
public java.util.Collection<Link> getLinks(Group gr)
public java.util.Collection<Norm> getDeonticRelations()
public java.util.Collection<Norm> getNorms(NS.OpTypes type, java.lang.String mission)
public boolean hasNorm(NS.OpTypes type, java.lang.String mission)
public java.lang.Object getProperty(java.lang.String id)
getProperty
in class MoiseElement
protected void setAbstract(boolean a)
public boolean isAbstract()
public static java.lang.String getXMLTag()
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
public org.w3c.dom.Element getAsDetailedDom(org.w3c.dom.Document document)
public void setFromDOM(org.w3c.dom.Element ele) throws MoiseException
MoiseException