org.processmining.framework.models.hlprocess
Interface HighLevelGroup

All Known Implementing Classes:
HLGroup

public interface HighLevelGroup

Defines the data operations that are available for a high-level group. For a group it is possible to define the members that are associated to the group.

Author:
arozinat, rmans

Method Summary
 boolean addResource(HighLevelResource resource)
          Adds the given resource to the list of resources that belong to this group, or organizational unit.
 boolean equals(java.lang.Object obj)
          Compares the specified object with this HighLevelGroup for equality.
 boolean equalsName(java.lang.Object obj)
          Compares the specified object with this HighLevelGroup for equality only on the name of a HighLevelGroup.
 java.lang.String getName()
          Retrives the name of this group or organizational unit.
 java.util.Set<HighLevelResource> getResources()
          Retrieves all the resources that are associated to this group.
 int hashCode()
          Returns the hascode for a HighLevelGroup object.
 boolean removeResource(HighLevelResource resource)
          Removes the given resource from the list of resources that belong to this group.
 void setName(java.lang.String name)
          Sets the name of this group or organization unit.
 void writeDistributionToDot(java.lang.String boxId, java.lang.String nodeId, java.lang.String addText, java.io.Writer bw)
          Writes the highlevel group to dot.
 

Method Detail

getName

java.lang.String getName()
Retrives the name of this group or organizational unit.

Returns:
String the name of this group or organizational unit.

setName

void setName(java.lang.String name)
Sets the name of this group or organization unit.

Parameters:
name - String the name of this group or organizational unit.

addResource

boolean addResource(HighLevelResource resource)
Adds the given resource to the list of resources that belong to this group, or organizational unit.

Parameters:
resource - the resource to be added

removeResource

boolean removeResource(HighLevelResource resource)
Removes the given resource from the list of resources that belong to this group.

Parameters:
resource - Resource the resource that has to be removed from this group
Returns:
boolean True if there has been a resource with the same name in this group and that is has been removed correctly. False otherwise (method call had no effect)

getResources

java.util.Set<HighLevelResource> getResources()
Retrieves all the resources that are associated to this group.

Returns:
a set of Resource objects representing the people that have this group. If no resources are defined for this group an empty set is returned

equals

boolean equals(java.lang.Object obj)
Compares the specified object with this HighLevelGroup for equality. Returns true if the given object is also a HighLevelGroup object, have both the same name (without leading and trailing whitespaces) and have both the same set of resources.

Overrides:
equals in class java.lang.Object
Parameters:
o - Object object to be compared for equality with this HighLevelGroup.
Returns:
boolean true if both HighLevelGroups have the same name and the same set of resources.

equalsName

boolean equalsName(java.lang.Object obj)
Compares the specified object with this HighLevelGroup for equality only on the name of a HighLevelGroup. Returns true if the given object is also a HighLevelGroup object and have both exactly the same name.

Parameters:
o - Object object to be compared for equality on the name with this HighLevelGroup.
Returns:
boolean if the name of the specified object is equal to the name of this HighLevelGroup.

hashCode

int hashCode()
Returns the hascode for a HighLevelGroup object. The hashcode value for a HighLevelDataDependency object is calculated according to the recipe of Josha Bloch in Effective Java (Addison-Wesley 2001). For this recipe, we have to consider the following items:

Overrides:
hashCode in class java.lang.Object
Returns:
int the hashcode value for this highLevelGroup

writeDistributionToDot

void writeDistributionToDot(java.lang.String boxId,
                            java.lang.String nodeId,
                            java.lang.String addText,
                            java.io.Writer bw)
                            throws java.io.IOException
Writes the highlevel group to dot. The general idea is that the relevant information of the highlevel group is written in a box and if needed can be connected to another node in the dot file. In that case the connection has to be an undirected line.

Parameters:
boxId - the identifier of the box (in the DOT file) in which the relevant information of the highlevel group will be written.
nodeId - the identifier of the node (in the DOT file) to which the box that will be created has to be connected. "" has to be provided if the box that will be created does not need to be connected to another node in the DOT file.
addText - additional text that needs to be filled in at the beginning of the box
bw - Writer the BufferedWriter used to stream the data to the file
Throws:
java.io.IOException