org.processmining.exporting.petrinet.cpnexport
Class ColoredTransition

java.lang.Object
  extended by att.grappa.Element
      extended by att.grappa.Node
          extended by org.processmining.framework.models.ModelGraphVertex
              extended by org.processmining.framework.models.petrinet.PNNode
                  extended by org.processmining.framework.models.petrinet.Transition
                      extended by org.processmining.exporting.petrinet.cpnexport.ColoredTransition
All Implemented Interfaces:
att.grappa.GrappaConstants, java.lang.Cloneable, LogEventProvider

public class ColoredTransition
extends Transition

A transition being part of a high-level Petri net simulation model.

Author:
Anne Rozinat, Ronny Mans
See Also:
ColoredPetriNet, ColoredPlace, ColoredEdge

Nested Class Summary
static class ColoredTransition.EventType
          Defines an enumeration type for the event types.
 
Field Summary
 
Fields inherited from class org.processmining.framework.models.ModelGraphVertex
identifier, object2, value, visualObject
 
Fields inherited from class att.grappa.Node
defaultNamePrefix
 
Fields inherited from class att.grappa.Element
counter, highlight, linewidth, object, printAllAttributes, printDefaultAttributes, usePrintList, visible
 
Fields inherited from interface att.grappa.GrappaConstants
_NO_TYPE, ANONYMOUS_PREFIX, BBOX_ATTR, BBOX_HASH, BOX_SHAPE, BOX_TYPE, CLUSTERRANK_ATTR, COLOR_ATTR, COLOR_HASH, COLOR_TYPE, CUSTOM_ATTR, CUSTOM_HASH, CUSTOM_SHAPE, DELETION_MASK, DIAMOND_SHAPE, DIR_ATTR, DIR_HASH, DIR_TYPE, DISTORTION_ATTR, DISTORTION_HASH, DOUBLE_TYPE, DOUBLECIRCLE_SHAPE, DOUBLEOCTAGON_SHAPE, EDGE, EGG_SHAPE, FILLCOLOR_ATTR, FILLCOLOR_HASH, FONTCOLOR_ATTR, FONTCOLOR_HASH, FONTNAME_ATTR, FONTNAME_HASH, FONTSIZE_ATTR, FONTSIZE_HASH, FONTSTYLE_ATTR, FONTSTYLE_HASH, FONTSTYLE_TYPE, GRAPPA_BACKGROUND_COLOR_ATTR, GRAPPA_BACKGROUND_COLOR_HASH, GRAPPA_DELETION_STYLE_ATTR, GRAPPA_DELETION_STYLE_HASH, GRAPPA_FONTSIZE_ADJUSTMENT_ATTR, GRAPPA_FONTSIZE_ADJUSTMENT_HASH, GRAPPA_SELECTION_STYLE_ATTR, GRAPPA_SELECTION_STYLE_HASH, GRAPPA_SHAPE, HASHLIST_TYPE, HEIGHT_ATTR, HEIGHT_HASH, HEXAGON_SHAPE, HIGHLIGHT_MASK, HIGHLIGHT_OFF, HIGHLIGHT_ON, HIGHLIGHT_TOGGLE, HOUSE_SHAPE, IDENTXFRM, IMAGE_ATTR, IMAGE_HASH, INTEGER_TYPE, INVERTEDHOUSE_SHAPE, INVERTEDTRAPEZIUM_SHAPE, INVERTEDTRIANGLE_SHAPE, LABEL_ATTR, LABEL_HASH, LINE_SHAPE, LINE_TYPE, LOG10, LP_ATTR, LP_HASH, MARGIN_ATTR, MARGIN_HASH, MCIRCLE_SHAPE, MCLIMIT_ATTR, MCLIMIT_HASH, MDIAMOND_SHAPE, MINBOX_ATTR, MINBOX_HASH, MINLEN_ATTR, MINLEN_HASH, MINSIZE_ATTR, MINSIZE_HASH, MRECORD_SHAPE, MSQUARE_SHAPE, NBSP, NEW_LINE, NO_SHAPE, NODE, NODESEP_ATTR, NODESEP_HASH, OCTAGON_SHAPE, ORIENTATION_ATTR, ORIENTATION_HASH, OVAL_SHAPE, PACKAGE_PREFIX, PARALLELOGRAM_SHAPE, PATCH_ATTR, PATCH_HASH, PENTAGON_SHAPE, PERIPHERIES_ATTR, PERIPHERIES_HASH, PERIPHERY_GAP, PKG_LOWER, PKG_UPLOW, PKG_UPPER, PLAINTEXT_SHAPE, POINT_TYPE, PointsPerInch, POLYGON_SHAPE, POS_ATTR, POS_HASH, PRINTLIST_ATTR, PRINTLIST_HASH, RANKDIR_ATTR, RANKDIR_HASH, RANKSEP_ATTR, RANKSEP_HASH, RECORD_SHAPE, RECTS_ATTR, RECTS_HASH, ROTATION_ATTR, ROTATION_HASH, ROUNDEDBOX_SHAPE, SELECTION_MASK, SHAPE_ATTR, SHAPE_HASH, SHAPE_MASK, SHAPE_TYPE, SIDES_ATTR, SIDES_HASH, SIZE_ATTR, SIZE_HASH, SIZE_TYPE, SKEW_ATTR, SKEW_HASH, STRING_TYPE, STYLE_ATTR, STYLE_HASH, STYLE_TYPE, SUBGRAPH, SYSTEM, TAG_ATTR, TAG_HASH, TIP_ATTR, TIP_HASH, TRAPEZIUM_SHAPE, TRIANGLE_SHAPE, TRIPLEOCTAGON_SHAPE, TYPES_SHIFT, WEIGHT_ATTR, WEIGHT_HASH, WIDTH_ATTR, WIDTH_HASH
 
Constructor Summary
ColoredTransition(java.lang.String name, ColoredPetriNet net)
          Constructor to create a ColoredTransition without having a template transition.
ColoredTransition(java.lang.String name, ColoredPetriNet net, int x, int y, int w, int h)
          Constructor to create a ColoredTransition without having a template transition.
ColoredTransition(java.lang.String name, java.lang.String nameEvent, ColoredPetriNet net)
          Constructor to create a ColoredTransition without having a template transition.
ColoredTransition(Transition template, ColoredPetriNet net)
          The constructor creates a ColoredTransition from an ordinary transition.
ColoredTransition(Transition template, ColoredPetriNet net, int x, int y, int w, int h)
          The constructor creates a ColoredTransition from an ordinary transition, but the position, width and height can be provided
 
Method Summary
 java.lang.String getCodeInscription()
          Retrieves the code inscription of this transition.
 java.lang.String getCpnID()
          Returns the cpnID for this transition.
 ColoredTransition.EventType getEventType()
          Retrieves the event type of this transition.
 java.lang.String getGuard()
          Retrieves the guard of this transition.
 int getHeight()
          Retrieves the height of this node.
 HLTransition getHighLevelTransition()
          Returns the object containing the high-level information referring to this transition.
 ColoredPetriNet getSubpage()
          Returns the sub Simulated PetriNet for this transition.
 SubpageMapping getSubpageMapping()
          Returns the subpage mapping for this transition.
 java.lang.String getTimeDelay()
          Retrieves the time delay for this transition
 int getWidth()
          Retrieves the width of this node.
 int getXCoordinate()
          Retrieves the x coordinate of the center point.
 int getYCoordinate()
          Retrieves the y coordinate of the center point.
 void setCodeInscription(java.lang.String inscription)
          Sets the code inscription of this transition.
 void setCpnID(java.lang.String id)
          Sets the cpnID for this transition.
 void setEventType(ColoredTransition.EventType eventType)
          Sets the event type of this transition
 void setGuard(java.lang.String guard)
          Sets the guard of this node.
 void setHeight(int value)
          Sets the height of this node.
 void setHighLevelTransition(HLTransition hlTransition)
          Sets the high level activity for this transition
 void setSubpage(ColoredPetriNet subpage)
          Sets the subpage for this transition.
 void setSubpageMapping(SubpageMapping mapping)
          Set the subpageMapping for this node.
 void setTimeDelay(java.lang.String timeDelay)
          Sets the time delay for this transition.
 void setWidth(int value)
          Sets the width of this node.
 void setXCoordinate(int value)
          Sets the x coordinate of the center point.
 void setYCoordinate(int value)
          Sets the y coordinate of the center point.
 void write(java.io.BufferedWriter bw)
          Writes this transition to the cpn-file.
 void writeInitMonitor(java.io.BufferedWriter bw)
          Writes the monitor for a initialisation transition.
 void writeLoggingMonitor(java.io.BufferedWriter bw, java.util.ArrayList<java.lang.String> usedNamesMonitors)
          Writes the monitor for this transition, which is needed to enable the logging functionality in cpn-tools.
 
Methods inherited from class org.processmining.framework.models.petrinet.Transition
clone, equals, fire, fire, fireQuick, fireQuick, getLogEvent, getModelElement, getNumber, hashCode, hasLogModelElement, isDuplicateTask, isEnabled, isEnabled, isInvisibleTask, isNegativeEnabled, setLogEvent, setModelElement, setNumber, toString, unFire, unFireQuick
 
Methods inherited from class org.processmining.framework.models.ModelGraphVertex
getIdentifier, getIncidentEdges, getInEdgesIterator, getNeighbors, getOutEdgesIterator, getPredecessors, getSuccessors, getValue, getVerticesOnlyPredecessor, getVerticesOnlySuccessor, getVerticesPredecessorAndSuccessor, setIdentifier, setValue
 
Methods inherited from class att.grappa.Node
addEdge, attributeType, edgeElements, findInEdgeByKey, findOutEdgeByKey, getCenterPoint, getInEdges, getOutEdges, getType, inDegree, inEdgeElements, isNode, outDegree, outEdgeElements, printNode, removeEdge
 
Methods inherited from class att.grappa.Element
addTag, attrNotOfInterest, attrOfInterest, bdfs, buildShape, canonString, canonValue, clearBBox, delete, getAttribute, getAttributePairs, getAttributeValue, getDefaultAttribute, getDefaultAttribute, getGraph, getGrappaNexus, getId, getIdKey, getLocalAttribute, getLocalAttributeKeys, getLocalAttributePairs, getName, getSubgraph, getThisAttribute, getThisAttributeValue, hasAttributeForKey, hasDefaultTag, hasDefaultTags, hasLocalTag, hasLocalTags, hasTag, hasTags, isEdge, isOfInterest, isSubgraph, listAttrsOfInterest, printElement, removeTag, removeTags, setAttribute, setAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setIdKey, setSubgraph, setUserAttributeType, typeString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColoredTransition

public ColoredTransition(java.lang.String name,
                         ColoredPetriNet net)
Constructor to create a ColoredTransition without having a template transition.

Parameters:
name - the identifier is to be passed to super class
net - the Petri net it belongs to (to be passed to super class)

ColoredTransition

public ColoredTransition(java.lang.String name,
                         java.lang.String nameEvent,
                         ColoredPetriNet net)
Constructor to create a ColoredTransition without having a template transition.

Parameters:
name - the identifier is to be passed to super class
net - the Petri net it belongs to (to be passed to super class)

ColoredTransition

public ColoredTransition(java.lang.String name,
                         ColoredPetriNet net,
                         int x,
                         int y,
                         int w,
                         int h)
Constructor to create a ColoredTransition without having a template transition.

Parameters:
name - the identifier is to be passed to super class
net - the Petri net it belongs to (to be passed to super class)
x - The x coordinate of the center point for this transition
y - The y coordinate of the center point for this transition
w - The width of this transition
h - The height of this transition

ColoredTransition

public ColoredTransition(Transition template,
                         ColoredPetriNet net)
The constructor creates a ColoredTransition from an ordinary transition.

Parameters:
template - the template transition for creating the object (to be passed to super class)
net - the Petri net it belongs to (to be passed to super class)

ColoredTransition

public ColoredTransition(Transition template,
                         ColoredPetriNet net,
                         int x,
                         int y,
                         int w,
                         int h)
The constructor creates a ColoredTransition from an ordinary transition, but the position, width and height can be provided

Parameters:
template - Transition The template transition for creating the object (to be passed to super class)
net - PetriNet The Petri Net it belongs to (to be passed to the super class)
x - int The x coordinate of the center point for this transition
y - int The y coordinate of the center point for this transition
w - int the width of this transition
h - int the height of this transition
Method Detail

getHighLevelTransition

public HLTransition getHighLevelTransition()
Returns the object containing the high-level information referring to this transition.

Returns:
the high-level transition information for this transition

setHighLevelTransition

public void setHighLevelTransition(HLTransition hlTransition)
Sets the high level activity for this transition

Parameters:
hlTransition - HLTransition the high level activity

write

public void write(java.io.BufferedWriter bw)
           throws java.io.IOException
Writes this transition to the cpn-file.

Parameters:
bw - BufferedWriter used to stream the data to the file.
Throws:
java.io.IOException

writeLoggingMonitor

public void writeLoggingMonitor(java.io.BufferedWriter bw,
                                java.util.ArrayList<java.lang.String> usedNamesMonitors)
                         throws java.io.IOException
Writes the monitor for this transition, which is needed to enable the logging functionality in cpn-tools. So, when a transition is executed for some case-id that into the corresponding log of that case-id an audit trail entry is written.

Parameters:
bw - BufferedWriter the BufferedWriter used to stream the data to the file
usedNamesMonitors - the list of names that have already been used for a monitor
Throws:
java.io.IOException

writeInitMonitor

public void writeInitMonitor(java.io.BufferedWriter bw)
                      throws java.io.IOException
Writes the monitor for a initialisation transition. This is needed to enable the logging functionality in cpn-tools. This monitor that monitors the initialisation transition ensures that for each case-id that enters the net the corresponding mxml file is created

Parameters:
bw - BufferedWriter the BufferedWriter used to stream the data to the file
Throws:
java.io.IOException

getCpnID

public java.lang.String getCpnID()
Returns the cpnID for this transition.

Returns:
String the cpnID for this transition or "" if no such cpnID exists.

setCpnID

public void setCpnID(java.lang.String id)
Sets the cpnID for this transition.

Parameters:
id - String the cpnID.

getSubpage

public ColoredPetriNet getSubpage()
Returns the sub Simulated PetriNet for this transition.

Returns:
ColoredPetriNet the sub ColoredPetriNet. Null if no such submodel exists.

setSubpage

public void setSubpage(ColoredPetriNet subpage)
Sets the subpage for this transition.

Parameters:
subpage - the subpage that belongs to this transition.

getSubpageMapping

public SubpageMapping getSubpageMapping()
Returns the subpage mapping for this transition.

Returns:
SubpageMapping the subpage mapping for this transition. Null is returned if no such mapping exists.

getXCoordinate

public int getXCoordinate()
Retrieves the x coordinate of the center point.

Returns:
the x coordinate.

getYCoordinate

public int getYCoordinate()
Retrieves the y coordinate of the center point.

Returns:
the y coordinate.

getWidth

public int getWidth()
Retrieves the width of this node.

Returns:
the width.

getHeight

public int getHeight()
Retrieves the height of this node.

Returns:
the height.

getGuard

public java.lang.String getGuard()
Retrieves the guard of this transition.

Returns:
String the guard (cpn syntax).

getTimeDelay

public java.lang.String getTimeDelay()
Retrieves the time delay for this transition

Returns:
String the time delay (cpn syntax).

getCodeInscription

public java.lang.String getCodeInscription()
Retrieves the code inscription of this transition.

Returns:
String the code inscription (cpn syntax).

getEventType

public ColoredTransition.EventType getEventType()
Retrieves the event type of this transition.

Returns:
EventType the event type

setSubpageMapping

public void setSubpageMapping(SubpageMapping mapping)
Set the subpageMapping for this node.

Parameters:
mapping - SubpageMapping.

setXCoordinate

public void setXCoordinate(int value)
Sets the x coordinate of the center point.

Parameters:
value - the new x coordinate to be assigned.

setYCoordinate

public void setYCoordinate(int value)
Sets the y coordinate of the center point.

Parameters:
value - the new y coordinate to be assigned.

setWidth

public void setWidth(int value)
Sets the width of this node.

Parameters:
value - the new width to be assigned.

setHeight

public void setHeight(int value)
Sets the height of this node.

Parameters:
value - the new height to be assigned.

setGuard

public void setGuard(java.lang.String guard)
Sets the guard of this node.

Parameters:
guard - String the guard to be assigned (cpn syntax).

setTimeDelay

public void setTimeDelay(java.lang.String timeDelay)
Sets the time delay for this transition.

Parameters:
timeDelay - String the time delay to be assigned (cpn syntax).

setCodeInscription

public void setCodeInscription(java.lang.String inscription)
Sets the code inscription of this transition.

Parameters:
inscription - String the code inscription to be assigned (cpn syntax).

setEventType

public void setEventType(ColoredTransition.EventType eventType)
Sets the event type of this transition

Parameters:
eventType - EventType the event type to be assigned (needed for the monitors)