org.processmining.framework.models.orgmodel
Class OrgModel

java.lang.Object
  extended by org.processmining.framework.models.orgmodel.OrgModel
All Implemented Interfaces:
java.lang.Cloneable

public class OrgModel
extends java.lang.Object
implements java.lang.Cloneable

Title: Organizational Model

Description: Holds an organizational model

Copyright: Copyright (c) 2006

Company:

Version:
1.0
Author:
Minseok Song

Field Summary
static java.lang.String NULLORGMODEL
           
static java.lang.String URI
           
 
Constructor Summary
OrgModel()
           
OrgModel(java.util.HashMap orgEntities, java.util.HashMap resources, java.util.HashMap tasks)
           
 
Method Summary
 void addOrgEntity(OrgEntity orgEntity)
           
 void addResource(Resource resource)
           
 void addTask(Task task)
           
 boolean changeOrgEntityID(java.lang.String old_id, java.lang.String new_id)
           
 boolean changeResourceID(java.lang.String old_id, java.lang.String new_id)
           
 boolean changeTaskID(java.lang.String old_id, java.lang.String new_id)
           
 java.lang.Object clone()
          Makes a deep copy of the object, i.e., reconstructs the OrgModel structure with cloned resources, orgentities, and tasks.
 javax.swing.JPanel getGraphPanel()
           
 javax.swing.JPanel getGraphPanel(boolean bOrgEntity, boolean bResource, boolean bTask)
           
 java.util.HashMap getOrgEntities()
           
 OrgEntity getOrgEntity(java.lang.String id)
           
 java.util.ArrayList<OrgEntity> getOrgEntityList()
           
 java.util.List<java.lang.String> getOrgEntityList(Resource res)
           
 java.util.List<java.lang.String> getOrgEntityList(Resource res, java.lang.String type)
           
 java.util.ArrayList<OrgEntity> getOrgEntityList(java.lang.String type)
           
 java.util.List<java.lang.String> getOrgEntityList(java.lang.String orgID, java.lang.String type)
           
 java.util.ArrayList<java.lang.String> getOrgEntityStringList()
           
 java.util.ArrayList<java.lang.String> getOrgEntityStringList(java.lang.String type)
           
 Resource getResource(java.lang.String id)
           
 java.util.ArrayList<Resource> getResourceList()
           
 java.util.ArrayList<java.lang.String> getResourceList(OrgEntity orgEntity)
           
 java.util.HashMap getResources()
           
 Task getTask(LogEvent le)
           
 Task getTask(java.lang.String id)
           
 Task getTask(java.lang.String name, java.lang.String eventType)
           
 java.util.ArrayList<Task> getTaskList()
           
 java.util.HashMap getTasks()
           
 boolean hasOrgEntity(java.lang.String id)
           
 boolean hasResource(java.lang.String id)
           
 boolean hasTask(java.lang.String id)
           
 void reallocateOrgModel(java.util.ArrayList listGroups, OrgModel originalModel)
          Based on a new group definition, generate a new org model.
 void removeOrgEntity(OrgEntity orgEntity)
           
 void removeResource(Resource resource)
           
 void removeTask(Task task)
           
 void setOrgEntities(java.util.HashMap orgEntities)
           
 void setResources(java.util.HashMap resources)
           
 void setTasks(java.util.HashMap tasks)
           
 void writeToDot(java.io.Writer bw)
          Writes a DOT representation of this graph to the given Writer.
 void writeToDot(java.io.Writer bw, boolean bOrgEntity, boolean bResource, boolean bTask)
          Writes a DOT representation of this graph to the given Writer.
 void writeToTestLog()
           
 void writeToXML(java.io.Writer bw)
          Export to OrgModel file.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI

public static final java.lang.String URI
See Also:
Constant Field Values

NULLORGMODEL

public static final java.lang.String NULLORGMODEL
See Also:
Constant Field Values
Constructor Detail

OrgModel

public OrgModel()

OrgModel

public OrgModel(java.util.HashMap orgEntities,
                java.util.HashMap resources,
                java.util.HashMap tasks)
Method Detail

setOrgEntities

public void setOrgEntities(java.util.HashMap orgEntities)

getOrgEntities

public java.util.HashMap getOrgEntities()

setResources

public void setResources(java.util.HashMap resources)

getResources

public java.util.HashMap getResources()

setTasks

public void setTasks(java.util.HashMap tasks)

getTasks

public java.util.HashMap getTasks()

addOrgEntity

public void addOrgEntity(OrgEntity orgEntity)

addResource

public void addResource(Resource resource)

addTask

public void addTask(Task task)

getOrgEntity

public OrgEntity getOrgEntity(java.lang.String id)

getResource

public Resource getResource(java.lang.String id)

getTask

public Task getTask(java.lang.String id)

changeOrgEntityID

public boolean changeOrgEntityID(java.lang.String old_id,
                                 java.lang.String new_id)

changeResourceID

public boolean changeResourceID(java.lang.String old_id,
                                java.lang.String new_id)

changeTaskID

public boolean changeTaskID(java.lang.String old_id,
                            java.lang.String new_id)

hasOrgEntity

public boolean hasOrgEntity(java.lang.String id)

hasResource

public boolean hasResource(java.lang.String id)

hasTask

public boolean hasTask(java.lang.String id)

removeOrgEntity

public void removeOrgEntity(OrgEntity orgEntity)

removeResource

public void removeResource(Resource resource)

removeTask

public void removeTask(Task task)

getTask

public Task getTask(LogEvent le)

getTask

public Task getTask(java.lang.String name,
                    java.lang.String eventType)

getOrgEntityStringList

public java.util.ArrayList<java.lang.String> getOrgEntityStringList()

getOrgEntityList

public java.util.ArrayList<OrgEntity> getOrgEntityList()

getOrgEntityList

public java.util.List<java.lang.String> getOrgEntityList(Resource res)

getOrgEntityStringList

public java.util.ArrayList<java.lang.String> getOrgEntityStringList(java.lang.String type)

getOrgEntityList

public java.util.ArrayList<OrgEntity> getOrgEntityList(java.lang.String type)

getOrgEntityList

public java.util.List<java.lang.String> getOrgEntityList(Resource res,
                                                         java.lang.String type)

getOrgEntityList

public java.util.List<java.lang.String> getOrgEntityList(java.lang.String orgID,
                                                         java.lang.String type)

getResourceList

public java.util.ArrayList<Resource> getResourceList()

getResourceList

public java.util.ArrayList<java.lang.String> getResourceList(OrgEntity orgEntity)

getTaskList

public java.util.ArrayList<Task> getTaskList()

reallocateOrgModel

public void reallocateOrgModel(java.util.ArrayList listGroups,
                               OrgModel originalModel)
Based on a new group definition, generate a new org model. When this function is called, original model and parameter has the same task sets.

Parameters:
listGroups - ArrayList

writeToXML

public void writeToXML(java.io.Writer bw)
                throws java.io.IOException
Export to OrgModel file.

Parameters:
bw - Writer
Throws:
java.io.IOException - If writing fails

writeToDot

public void writeToDot(java.io.Writer bw)
                throws java.io.IOException
Writes a DOT representation of this graph to the given Writer. This representation is used by the getGrappaVisualization method to generate the visualization. Note that this function should have a call to nodeMapping.clear() at the beginning and it should call nodeMapping.put(new String(nodeID),nodeObject); after writing a node to the dot file

Parameters:
bw - the DOT representation will be written using this Writer
Throws:
java.io.IOException - in case there is a problem with writing to bw

getGraphPanel

public javax.swing.JPanel getGraphPanel()

writeToDot

public void writeToDot(java.io.Writer bw,
                       boolean bOrgEntity,
                       boolean bResource,
                       boolean bTask)
                throws java.io.IOException
Writes a DOT representation of this graph to the given Writer. This representation is used by the getGrappaVisualization method to generate the visualization. Note that this function should have a call to nodeMapping.clear() at the beginning and it should call nodeMapping.put(new String(nodeID),nodeObject); after writing a node to the dot file

Parameters:
bw - the DOT representation will be written using this Writer
Throws:
java.io.IOException - in case there is a problem with writing to bw

getGraphPanel

public javax.swing.JPanel getGraphPanel(boolean bOrgEntity,
                                        boolean bResource,
                                        boolean bTask)

writeToTestLog

public void writeToTestLog()

clone

public java.lang.Object clone()
Makes a deep copy of the object, i.e., reconstructs the OrgModel structure with cloned resources, orgentities, and tasks. Note that this method needs to be extended as soon as there are attributes added to the class which are not primitive or immutable.

Overrides:
clone in class java.lang.Object
Returns:
the cloned object