Package moise.os.ss
Class RoleRel
- java.lang.Object
-
- moise.common.MoiseElement
-
- moise.os.ss.RoleRel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
,Identifiable
,ToXML
- Direct Known Subclasses:
Compatibility
,Link
public abstract class RoleRel extends MoiseElement implements ToXML
Represents a relation between roles (links, compatibilities, etc).- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RoleRel.RoleRelScope
-
Field Summary
Fields Modifier and Type Field Description protected boolean
biDirectional
protected boolean
extendsToSubGroups
protected Group
grSpec
protected RoleRel.RoleRelScope
scope
protected Role
source
protected Role
target
-
Fields inherited from class moise.common.MoiseElement
debug
-
-
Method Summary
Modifier and Type Method Description boolean
contains(Role r)
checks if one of this relation's role are equal to r (or its super roles)boolean
equals(java.lang.Object o)
org.w3c.dom.Element
getAsDOM(org.w3c.dom.Document document)
java.lang.String
getBiDirStr()
boolean
getExtendsToSubGroups()
java.lang.String
getExtendsToSubGroupsStr()
Group
getGrSpec()
RoleRel.RoleRelScope
getScope()
Role
getSource()
Role
getTarget()
protected java.lang.String
getTypeStr()
java.lang.String
getXMLTag()
boolean
isBiDir()
void
setBiDir(boolean b)
void
setExtendsToSubGroups(boolean b)
void
setFromDOM(org.w3c.dom.Element ele)
private void
setId()
void
setScope(java.lang.String s)
void
setScope(RoleRel.RoleRelScope s)
boolean
sourceContains(Role r)
checks if the source role is equal to r (or its super roles) (in case this relation is symmetric, this methods also checks the destination)boolean
targetContains(Role r)
checks if the target role is equal to r (or its super roles) (in case this relation is bi-dir, this methods also checks the source)java.lang.String
toString()
-
Methods inherited from class moise.common.MoiseElement
compareTo, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty
-
-
-
-
Field Detail
-
source
protected Role source
-
target
protected Role target
-
scope
protected RoleRel.RoleRelScope scope
-
extendsToSubGroups
protected boolean extendsToSubGroups
-
biDirectional
protected boolean biDirectional
-
grSpec
protected Group grSpec
-
-
Method Detail
-
setId
private void setId()
-
getSource
public Role getSource()
-
getTarget
public Role getTarget()
-
getTypeStr
protected java.lang.String getTypeStr()
-
getXMLTag
public java.lang.String getXMLTag()
-
getGrSpec
public Group getGrSpec()
-
setScope
public void setScope(RoleRel.RoleRelScope s) throws MoiseConsistencyException
- Throws:
MoiseConsistencyException
-
setScope
public void setScope(java.lang.String s) throws MoiseConsistencyException
- Throws:
MoiseConsistencyException
-
getScope
public RoleRel.RoleRelScope getScope()
-
setExtendsToSubGroups
public void setExtendsToSubGroups(boolean b)
-
getExtendsToSubGroups
public boolean getExtendsToSubGroups()
-
getExtendsToSubGroupsStr
public java.lang.String getExtendsToSubGroupsStr()
-
setBiDir
public void setBiDir(boolean b)
-
isBiDir
public boolean isBiDir()
-
getBiDirStr
public java.lang.String getBiDirStr()
-
sourceContains
public boolean sourceContains(Role r)
checks if the source role is equal to r (or its super roles) (in case this relation is symmetric, this methods also checks the destination)
-
targetContains
public boolean targetContains(Role r)
checks if the target role is equal to r (or its super roles) (in case this relation is bi-dir, this methods also checks the source)
-
contains
public boolean contains(Role r)
checks if one of this relation's role are equal to r (or its super roles)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classMoiseElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classMoiseElement
-
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
-
setFromDOM
public void setFromDOM(org.w3c.dom.Element ele) throws MoiseException
- Throws:
MoiseException
-
-