Package moise.os.ss

Class Group

    • Constructor Detail

      • Group

        public Group​(SS ss)
        Creates new GrSpec
      • Group

        public Group​(java.lang.String id,
                     SS ss)
        Creates new GrSpec
    • Method Detail

      • setSuperGroup

        protected void setSuperGroup​(Group gr)
      • getSuperGroup

        public Group getSuperGroup()
      • isRoot

        public boolean isRoot()
        returns true if this group is not a subgroup of another group
      • getSS

        public SS getSS()
      • containsRole

        public boolean containsRole​(Role r)
        checks whether the roleId can be played in this group
      • getRoleCardinality

        public Cardinality getRoleCardinality​(Role role)
        returns the cardinality for the . If it is not defined, returns null.
      • getRoles

        public CardinalitySet<Role> getRoles()
        returns a collection of this group's roles
      • addLink

        public void addLink​(Link l)
      • getLinks

        public java.util.Collection<Link> getLinks()
        returns a collection for the Link objects defined in this group
      • getLinksQty

        public int getLinksQty()
      • getUpLinks

        public java.util.Set<Link> getUpLinks()
        gets the links of this group an its supergroups's extendible links
      • getExtendibleLinks

        public java.util.Collection<Link> getExtendibleLinks()
        gets the group's Link objects which are extendible to sub groups
      • addCompatibility

        public void addCompatibility​(Compatibility c)
      • getExtendibleCompatibilities

        public java.util.Collection<Compatibility> getExtendibleCompatibilities()
        gets the group's Compatibility objects which are extendible to sub groups
      • getUpCompatibilities

        public java.util.Collection<Compatibility> getUpCompatibilities()
        gets the Compatibility objects of this group an its supergroups's Extendible compatibilities
      • getCompatibilities

        public java.util.Collection<Compatibility> getCompatibilities()
        return a collection of this group Compatibility objects
      • getCompatibilitiesQty

        public int getCompatibilitiesQty()
      • addSubGroup

        public void addSubGroup​(Group gr)
      • getSubGroups

        public CardinalitySet<Group> getSubGroups()
        gets the direct sub groups of this group
      • getAllSubGroupsTree

        public java.util.Collection<Group> getAllSubGroupsTree()
        gets this group and its all sub groups, the subgroups of the subgroups, .....
      • getSubGroup

        public Group getSubGroup​(java.lang.String grId)
        gets the grId subgroup of this group (does not looks for the subgroups' subgroups)
      • findSubGroup

        public Group findSubGroup​(java.lang.String grId)
        looks for grId in this group and in its subgroups
      • getSubGroupCardinality

        public Cardinality getSubGroupCardinality​(Group gr)
      • getXMLTag

        public static java.lang.String getXMLTag()
      • getAsDOM

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

        public java.lang.String getAsProlog()
        returns a string as a prolog predicate representing the group specification.

        The format is: group_specification(group type id, list of role, list of subgroups, properties).
        each role in the list is: role(id, list of sub-roles, list of super-roles, min cardinality, max cardinality, list of compatible roles, list of links).
        each link is: link(type, target, scope).

        Specified by:
        getAsProlog in interface ToProlog