org.processmining.framework.models.causality
Class CausalFootprint

java.lang.Object
  extended by att.grappa.Element
      extended by att.grappa.Subgraph
          extended by att.grappa.Graph
              extended by org.processmining.framework.models.ModelGraph
                  extended by org.processmining.framework.models.causality.CausalFootprint
All Implemented Interfaces:
att.grappa.GrappaConstants, java.util.Comparator, DotFileWriter

public class CausalFootprint
extends ModelGraph

Title:

Description:

Copyright: Copyright (c) 2004

Company:

Version:
1.0
Author:
not attributable

Field Summary
 
Fields inherited from class org.processmining.framework.models.ModelGraph
DOESNTCROSS_REGION, ENTERS_REGION, EXITS_REGION, identifier, nodeMapping, visualObject
 
Fields inherited from class att.grappa.Graph
INDENT_STRING, REFCNTXT
 
Fields inherited from class att.grappa.Subgraph
currentSelection, 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
 
Method Summary
 boolean addEdge(java.util.HashSet sources, ModelGraphVertex destination)
          Adds an edge from the source to a set of destinations, if no such adge already exists.
 boolean addEdge(ModelGraphVertex source, java.util.HashSet destinations)
          Adds an edge from the source to a set of destinations, if no such adge already exists.
 ModelGraphVertex addVertex(ModelGraphVertex newVertex, ModelGraphVertex baseVertex)
          adds a node in the graph with a reference to the original object in the base graph
 void closeTransitively(CancelationComponent cancel)
           
 boolean containsBaseVertex(ModelGraphVertex baseVertex)
          Tells whether or not this graph holds a reference to a given vertex in the base graph.
 boolean containsEdge(java.util.HashSet sources, ModelGraphVertex destination)
          Checks if an edge exists in the graph
 boolean containsEdge(ModelGraphVertex source, java.util.HashSet destinations)
          Checks if an edge exists in the graph
 boolean containsSmallerEdge(java.util.HashSet sources, ModelGraphVertex destination)
          Checks if a smaller edge exists in the graph
 boolean containsSmallerEdge(ModelGraphVertex source, java.util.HashSet destinations)
          Checks if a smaller edge exists in the graph
 boolean containsStrictSmallerEdge(java.util.HashSet sources, ModelGraphVertex destination)
          Checks if a strictly smaller edge exists in the graph
 boolean containsStrictSmallerEdge(ModelGraphVertex source, java.util.HashSet destinations)
          Checks if a strictly smaller edge exists in the graph
 ModelGraphVertex getBaseVertex(ModelGraphVertex vertex)
          Returns the vertex in the basegraph that is referenced by this vertex in the causal structure
 java.util.HashSet getBaseVertices(java.util.Collection causalVertices)
          Returns the vertex in the basegraph that is referenced by this vertex in the causal structure
 ModelGraphVertex getCausalVertex(ModelGraphVertex baseVertex)
          Returns the vertex in the causalStructure that is referenced by this vertex in the basegraph
 java.util.HashSet getCausalVertices(java.util.Collection baseVertices)
          Returns the vertex in the causalStructure that is referenced by this vertex in the basegraph
 BackwardEdge getEdge(java.util.HashSet sources, ModelGraphVertex destination)
          gets a backwardEdge from the graph
 ForwardEdge getEdge(ModelGraphVertex source, java.util.HashSet destinations)
          gets a forwardEdge from the graph
 java.util.HashSet<BackwardEdge> getIncomingLookBackEdges(ModelGraphVertex v)
           
 java.util.ArrayList getLookAheadEdges()
           
 java.util.ArrayList getLookBackEdges()
           
 java.util.HashSet<ForwardEdge> getOutgoingLookAheadEdges(ModelGraphVertex v)
           
 ModelGraphVertex getSource()
           
 ModelGraphVertex getTarget()
           
 java.util.ArrayList getVerticeList()
           
 boolean removeAllBaseVertices(java.util.Collection vertices)
          Remove all objects with a reference to one of the vertices in the given collection
 void removeObsoleteEdges(CancelationComponent cancel)
           
 void removeVertex(ModelGraphVertex v)
           
 void setWriteSelection(ModelGraphVertex selection)
          This method tells the causal footprint whether the dot visualization should only write the output for the selected node.
 void Test(java.lang.String tag)
          Print key indicators of the EPC to the Test tab.
 void writeToDot(java.io.Writer bw)
          Writes a DOT representation of this graph to the given Writer.
 
Methods inherited from class org.processmining.framework.models.ModelGraph
addEdge, addEdge, addVertex, calculateAllNonCompRegions, calculateAllRegions, calculateMinimalRegions, calculateRegionsMaxSize, clone, delEdge, getAllEdges, getEdgeObjects, getEdges, getEdgesBetween, getFirstEdge, getGrappaVisualization, getIdentifier, getNumberOfEdges, getPostRegions, getPreRegions, getShortestDistances, getWeightedArcs, reduceTransitively, removeEdge, removeEdges, setIdentifier, setWeightedArcs
 
Methods inherited from class att.grappa.Graph
addPanel, attributeType, buildShapes, decrementIndent, dropcloth, getErrorWriter, getGlobalAttribute, getGlobalAttributeKeys, getGlobalAttributePairs, getGlobalAttributeSize, getGrappaAttribute, getGrappaAttributeKeys, getGrappaAttributeValue, getId, getIndent, getSynchronizePaint, getToolTipText, incrementIndent, isDirected, isEditable, isMenuable, isSelectable, isStrict, paintImmediately, printError, printError, printGraph, printGraph, removePanel, repaint, reset, reset, resync, setEditable, setErrorWriter, setGrappaAttribute, setMenuable, setSelectable, setSynchronizePaint, setToolTipText, validGrappaAttributeKey
 
Methods inherited from class att.grappa.Subgraph
addEdge, addNode, addSubgraph, addTypeTag, clearPatchWork, compare, computePatchWork, countOfElements, countOfLocalElements, createElement, edgeElements, elements, elements, equals, findEdgeByName, findNodeByName, findSubgraphByName, getBoundingBox, getEdgeAttribute, getEdgeAttributeKeys, getEdgeAttributePairs, getEdgeAttributeValue, getNodeAttribute, getNodeAttributeKeys, getNodeAttributePairs, getNodeAttributeValue, getShowEdgeLabels, getShowNodeLabels, getShowSubgraphLabels, getType, hasEmptySubgraphs, hasTypeTag, hasTypeTags, isCluster, isLR, isRoot, isSubgraph, nodeElements, patchWork, preparePatchWork, printSubgraph, removeEdge, removeEmptySubgraphs, removeNode, removeSubgraph, removeTypeTag, removeTypeTags, resetBoundingBox, setAttribute, setAttribute, setEdgeAttribute, setEdgeAttribute, setName, setNodeAttribute, setNodeAttribute, setShowEdgeLabels, setShowNodeLabels, setShowSubgraphLabels, subgraphElements, vectorOfElements
 
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, isNode, isOfInterest, listAttrsOfInterest, printElement, removeTag, removeTags, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setIdKey, setSubgraph, setUserAttributeType, toString, typeString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addEdge

public boolean addEdge(ModelGraphVertex source,
                       java.util.HashSet destinations)
Adds an edge from the source to a set of destinations, if no such adge already exists. If such an edge already exists, the ModelGraph's weightedArc attribute specifies whether a duplicate edge is added (true) or not (false).

Parameters:
source - the source node
destinations - the set of destination nodes
Returns:
true if the edge was added, false if it existed allready

containsEdge

public boolean containsEdge(ModelGraphVertex source,
                            java.util.HashSet destinations)
Checks if an edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

containsSmallerEdge

public boolean containsSmallerEdge(ModelGraphVertex source,
                                   java.util.HashSet destinations)
Checks if a smaller edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

containsStrictSmallerEdge

public boolean containsStrictSmallerEdge(ModelGraphVertex source,
                                         java.util.HashSet destinations)
Checks if a strictly smaller edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

addEdge

public boolean addEdge(java.util.HashSet sources,
                       ModelGraphVertex destination)
Adds an edge from the source to a set of destinations, if no such adge already exists. If such an edge already exists, the ModelGraph's weightedArc attribute specifies whether a duplicate edge is added (true) or not (false).

Parameters:
source - the source node
destinations - the set of destination nodes
Returns:
true if the edge was added, false if it existed allready

containsEdge

public boolean containsEdge(java.util.HashSet sources,
                            ModelGraphVertex destination)
Checks if an edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

containsSmallerEdge

public boolean containsSmallerEdge(java.util.HashSet sources,
                                   ModelGraphVertex destination)
Checks if a smaller edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

containsStrictSmallerEdge

public boolean containsStrictSmallerEdge(java.util.HashSet sources,
                                         ModelGraphVertex destination)
Checks if a strictly smaller edge exists in the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

getEdge

public BackwardEdge getEdge(java.util.HashSet sources,
                            ModelGraphVertex destination)
gets a backwardEdge from the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

getEdge

public ForwardEdge getEdge(ModelGraphVertex source,
                           java.util.HashSet destinations)
gets a forwardEdge from the graph

Parameters:
source - The source node
destinations - The set of destination nodes
Returns:
boolean true if it exists, false if not.

addVertex

public ModelGraphVertex addVertex(ModelGraphVertex newVertex,
                                  ModelGraphVertex baseVertex)
adds a node in the graph with a reference to the original object in the base graph

Parameters:
v - ModelGraphVertex
Returns:
ModelGraphVertex

getTarget

public ModelGraphVertex getTarget()

getSource

public ModelGraphVertex getSource()

getBaseVertex

public ModelGraphVertex getBaseVertex(ModelGraphVertex vertex)
Returns the vertex in the basegraph that is referenced by this vertex in the causal structure

Parameters:
vertex - ModelGraphVertex referring to the object in this graph
Returns:
ModelGraphVertex referring to the object in the base graph

getCausalVertex

public ModelGraphVertex getCausalVertex(ModelGraphVertex baseVertex)
Returns the vertex in the causalStructure that is referenced by this vertex in the basegraph

Parameters:
vertex - ModelGraphVertex referring to the object in the base graph
Returns:
ModelGraphVertex referring to the object in this graph

getBaseVertices

public java.util.HashSet getBaseVertices(java.util.Collection causalVertices)
Returns the vertex in the basegraph that is referenced by this vertex in the causal structure

Parameters:
vertex - ModelGraphVertex referring to the object in this graph
Returns:
ModelGraphVertex referring to the object in the base graph

getCausalVertices

public java.util.HashSet getCausalVertices(java.util.Collection baseVertices)
Returns the vertex in the causalStructure that is referenced by this vertex in the basegraph

Parameters:
vertex - ModelGraphVertex referring to the object in the base graph
Returns:
ModelGraphVertex referring to the object in this graph

containsBaseVertex

public boolean containsBaseVertex(ModelGraphVertex baseVertex)
Tells whether or not this graph holds a reference to a given vertex in the base graph.

Parameters:
baseVertex - ModelGraphVertex referring to the vertex in the base graph
Returns:
true if this graph has a reference to the baseVertex, false otherwise.

getLookAheadEdges

public java.util.ArrayList getLookAheadEdges()

getLookBackEdges

public java.util.ArrayList getLookBackEdges()

getOutgoingLookAheadEdges

public java.util.HashSet<ForwardEdge> getOutgoingLookAheadEdges(ModelGraphVertex v)

getIncomingLookBackEdges

public java.util.HashSet<BackwardEdge> getIncomingLookBackEdges(ModelGraphVertex v)

removeObsoleteEdges

public void removeObsoleteEdges(CancelationComponent cancel)

closeTransitively

public void closeTransitively(CancelationComponent cancel)

setWriteSelection

public void setWriteSelection(ModelGraphVertex selection)
This method tells the causal footprint whether the dot visualization should only write the output for the selected node.

Parameters:
selection - ModelGraphVertex This vertex will be the center of the written output. If the whole graph needs to be shown, set this to null

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

Specified by:
writeToDot in interface DotFileWriter
Overrides:
writeToDot in class ModelGraph
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

removeAllBaseVertices

public boolean removeAllBaseVertices(java.util.Collection vertices)
Remove all objects with a reference to one of the vertices in the given collection

Parameters:
vertices - Collection
Returns:
boolean true if the graph changed

removeVertex

public void removeVertex(ModelGraphVertex v)
Overrides:
removeVertex in class ModelGraph

getVerticeList

public java.util.ArrayList getVerticeList()
Overrides:
getVerticeList in class ModelGraph

Test

public void Test(java.lang.String tag)
Print key indicators of the EPC to the Test tab.

Overrides:
Test in class ModelGraph
Parameters:
tag - String The tag to use for the indicators.