com.apelon.dts.client.attribute
Class RoleGroup

java.lang.Object
  extended by com.apelon.dts.client.attribute.RoleGroup

public class RoleGroup
extends Object

RoleGroup represents a specific grouping of roles. This class facilitates the creation and modification of a single role grouping.

Copyright: Copyright (c) 2004

Company: Apelon, Inc.

Since:
DTS 3.3.0
Version:
DTS 3.3.0
Author:
Apelon, Inc.

Constructor Summary
RoleGroup(int groupNum, int conceptNamespaceId)
          This object represents a group of roles.
 
Method Summary
 void add(DTSRole r)
          Adds a role to the role group.
 Object clone()
          Deep copy of role group.
 int getConceptNamespaceId()
          Returns the concept's Namespace ID.
 int getGroupNum()
          Returns the RoleGroup number.
 int getNumberOfRoles()
          Returns number of roles in the group.
 Iterator iterator()
          Used to iterate over all the roles in this RoleGroup.
static int minimumSize()
          The minimum size of any RoleGroup.
 void remove(DTSRole r)
          Removes a role from the group.
 void setGroupNum(int newGroupNum)
          Sets the group number for this RoleGroup.
 Vector unGroup()
          Ungroups roles.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleGroup

public RoleGroup(int groupNum,
                 int conceptNamespaceId)
This object represents a group of roles. The group number passed in will be the identifier for a particular role group.

Method Detail

minimumSize

public static final int minimumSize()
The minimum size of any RoleGroup.

Returns:
the minimum number of DTSRoles in a group.

add

public void add(DTSRole r)
Adds a role to the role group.

Parameters:
r - role to add

clone

public Object clone()
Deep copy of role group.

Overrides:
clone in class Object

getGroupNum

public int getGroupNum()
Returns the RoleGroup number.

Returns:
int

getConceptNamespaceId

public int getConceptNamespaceId()
Returns the concept's Namespace ID. When dealing with Ontylog Extension namespaces, the role values may be in a different namespace from the concept's namespace.

Returns:
the concept's Namespace ID.

getNumberOfRoles

public int getNumberOfRoles()
Returns number of roles in the group.


iterator

public Iterator iterator()
Used to iterate over all the roles in this RoleGroup.

Returns:
an iterator over the roles in the group.

remove

public void remove(DTSRole r)
Removes a role from the group.


setGroupNum

public void setGroupNum(int newGroupNum)
Sets the group number for this RoleGroup.

Parameters:
newGroupNum - int

unGroup

public Vector unGroup()
Ungroups roles. This method returns a Vector of the ungrouped roles and each role's group reference is set to the role's group number. This is used to keep track of the last group a particular role belonged to.



Copyright © 2011. All Rights Reserved.