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
  • Field Details

    • 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
  • Constructor Details

    • RoleRel

      public RoleRel()
      Creates new Link
    • RoleRel

      public RoleRel​(Role s, Role d)
      Creates new Link
  • Method Details

    • 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 class MoiseElement
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class MoiseElement
    • getAsDOM

      public org.w3c.dom.Element getAsDOM​(org.w3c.dom.Document document)
      Specified by:
      getAsDOM in interface ToXML
    • setFromDOM

      public void setFromDOM​(org.w3c.dom.Element ele) throws MoiseException
      Throws:
      MoiseException