|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatt.grappa.Element
att.grappa.Subgraph
att.grappa.Graph
org.processmining.framework.models.ModelGraph
public class ModelGraph
Encapsulates a general graph, and it is used as a base class for all types of graphs in the processmining project.
Since it extends Graph
, all functionality
of the GRAPPA graph library is available.
In addition, a ModelGraph
provides a method
getGrappaVisualization
to create a visualization of the
underlying graph. First, the DOT representation as given by the
writeToDot
method is layed out with the dot.exe tool.
The output of dot.exe is then visualized using the Grappa package.
Note that the visualization depends on the writeToDot
method. Subclasses that want to customize the visualization should
override the writeToDot
method and customize the DOT
representation, instead of overriding the getGrappaVisualization
method.
Field Summary | |
---|---|
static int |
DOESNTCROSS_REGION
|
static int |
ENTERS_REGION
|
static int |
EXITS_REGION
|
protected java.lang.String |
identifier
|
protected static java.util.HashMap |
nodeMapping
|
protected java.util.ArrayList |
vertices
|
att.grappa.Graph |
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 |
Constructor Summary | |
---|---|
ModelGraph(java.lang.String graphName)
|
Method Summary | |
---|---|
ModelGraphEdge |
addEdge(ModelGraphEdge e)
|
ModelGraphEdge |
addEdge(ModelGraphVertex source,
ModelGraphVertex destination)
Adds an edge from the first node to the second node, if no such adge already exists. |
ModelGraphVertex |
addVertex(ModelGraphVertex v)
|
RegionList |
calculateAllNonCompRegions(java.util.Collection objects)
This method calculates all non-complementary regions of this graph. |
RegionList |
calculateAllRegions(java.util.Collection objects)
This method calculates all regions of this graph. |
RegionList |
calculateMinimalRegions(java.util.Collection objects)
This method calculates all minimal regions of this graph. |
RegionList |
calculateRegionsMaxSize(java.util.Collection objects,
int size)
This method calculates all regions of this graph that contain at most size states. |
protected java.lang.Object |
clone()
Makes a shallow copy of the object. |
void |
delEdge(ModelGraphVertex source,
ModelGraphVertex destination)
|
java.util.ArrayList |
getAllEdges(java.lang.Object o)
Returns all edges in the statespace that refer to the given object |
java.util.HashSet |
getEdgeObjects()
Returns a HashSet containing all objects that appear on edges, i.e. |
java.util.ArrayList |
getEdges()
|
java.util.HashSet |
getEdgesBetween(ModelGraphVertex v1,
ModelGraphVertex v2)
September 5, 2005, Eric Verbeek OK for multiple arcs. |
ModelGraphEdge |
getFirstEdge(ModelGraphVertex source,
ModelGraphVertex destination)
September 5, 2005, Eric Verbeek Renamed from hasEdge to getFirstEdge Gets the first edge from the first node to the second node. |
ModelGraphPanel |
getGrappaVisualization()
Returns a grappa panel containing the visualization of the graph. |
java.lang.String |
getIdentifier()
|
int |
getNumberOfEdges()
|
RegionList |
getPostRegions(RegionList regions,
java.lang.Object t)
This method returns a subset of the given set of regions, which represents the PreRegions of the given object. |
RegionList |
getPreRegions(RegionList regions,
java.lang.Object t)
This method returns a subset of the given set of regions, which represents the PreRegions of the given object. |
cern.colt.matrix.DoubleMatrix2D |
getShortestDistances()
|
java.util.ArrayList<ModelGraphVertex> |
getVerticeList()
|
boolean |
getWeightedArcs()
September 5, 2005, Eric Verbeek Gets whether multiple arcs should be allowed or not. |
void |
reduceTransitively()
Transitively reduces this graph, i.e. |
void |
removeEdge(ModelGraphEdge e)
|
void |
removeEdges(java.util.ArrayList edges)
|
void |
removeVertex(ModelGraphVertex v)
|
void |
setIdentifier(java.lang.String s)
|
void |
setWeightedArcs(boolean w)
September 5, 2005, Eric Verbeek Sets whether multiple arcs should be allowed or not. |
void |
Test(java.lang.String tag)
Print key indicators of the graph 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 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 |
Field Detail |
---|
public static final int EXITS_REGION
public static final int ENTERS_REGION
public static final int DOESNTCROSS_REGION
public att.grappa.Graph visualObject
protected java.lang.String identifier
protected java.util.ArrayList vertices
protected static final java.util.HashMap nodeMapping
Constructor Detail |
---|
public ModelGraph(java.lang.String graphName)
Method Detail |
---|
public void setWeightedArcs(boolean w)
w
- specifies whether multiple arcs should be allowed.public boolean getWeightedArcs()
public void setIdentifier(java.lang.String s)
public java.util.ArrayList<ModelGraphVertex> getVerticeList()
public java.util.ArrayList getEdges()
public ModelGraphVertex addVertex(ModelGraphVertex v)
public void removeVertex(ModelGraphVertex v)
public java.lang.String getIdentifier()
public java.util.HashSet getEdgesBetween(ModelGraphVertex v1, ModelGraphVertex v2)
v1
- the first nodev2
- the second node
public ModelGraphEdge getFirstEdge(ModelGraphVertex source, ModelGraphVertex destination)
source
- the first nodedestination
- the second node
public void removeEdges(java.util.ArrayList edges)
public void delEdge(ModelGraphVertex source, ModelGraphVertex destination)
public void removeEdge(ModelGraphEdge e)
public int getNumberOfEdges()
public ModelGraphEdge addEdge(ModelGraphVertex source, ModelGraphVertex destination)
source
- the first nodedestination
- the second node
public ModelGraphEdge addEdge(ModelGraphEdge e)
public void writeToDot(java.io.Writer bw) throws java.io.IOException
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
writeToDot
in interface DotFileWriter
bw
- the DOT representation will be written using this Writer
java.io.IOException
- in case there is a problem with writing to bw
public final ModelGraphPanel getGrappaVisualization()
writeToDot
method.
Subclasses that want to customize the visualization should override the
writeToDot
method instead of this one.
public cern.colt.matrix.DoubleMatrix2D getShortestDistances()
protected java.lang.Object clone()
clone
in class java.lang.Object
public RegionList calculateMinimalRegions(java.util.Collection objects)
objects
- The list of objects to which edges can refer
public RegionList calculateAllRegions(java.util.Collection objects)
objects
- The list of objects to which edges can refer
public RegionList calculateAllNonCompRegions(java.util.Collection objects)
objects
- The list of objects to which edges can refer
public RegionList calculateRegionsMaxSize(java.util.Collection objects, int size)
size
states. A region is a
set of nodes, such that for each objects in the given list of
objects holds that:
1) All edges corresponding to that object have a source in the region
and a destination outside of the region
2) All edges corresponding to that object have a source outside of the
region and a destination inside the region
3) All edges corresponding to that object have a source in the region
and a destination inside the region
4) All edges corresponding to that object have a source outside of the
region and a destination outside of the region
objects
- The list of objects to which edges can refersize
- the maximum size of the region
public java.util.HashSet getEdgeObjects()
public java.util.ArrayList getAllEdges(java.lang.Object o)
o
- Object
public RegionList getPreRegions(RegionList regions, java.lang.Object t)
regions
- ArrayListt
- Object
public RegionList getPostRegions(RegionList regions, java.lang.Object t)
regions
- ArrayListt
- Transition
public void reduceTransitively()
public void Test(java.lang.String tag)
tag
- String The tag to use for the indicators.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |