org.processmining.plugins.pnml
Class PnmlNode

java.lang.Object
  extended by org.processmining.plugins.pnml.PnmlElement
      extended by org.processmining.plugins.pnml.PnmlBasicObject
          extended by org.processmining.plugins.pnml.PnmlNode
Direct Known Subclasses:
PnmlLabel, PnmlPage, PnmlPlace, PnmlPort, PnmlReferencePlace, PnmlReferenceTransition, PnmlTransition

public abstract class PnmlNode
extends PnmlBasicObject

Basic PNML node object.

Author:
hverbeek

Field Summary
protected  PnmlNodeGraphics graphics
          Graphics element.
protected  java.lang.String id
          Id attribute.
 
Fields inherited from class org.processmining.plugins.pnml.PnmlBasicObject
name, toolSpecificList
 
Fields inherited from class org.processmining.plugins.pnml.PnmlElement
lineNumber, tag
 
Constructor Summary
PnmlNode(java.lang.String tag)
          Creates a fresh PNML node.
 
Method Summary
protected  void checkValidity(Pnml pnml)
          Checks the validity of this node.
 PnmlNode convertFromNet(ExpandableSubNet parent, org.processmining.models.graphbased.AbstractGraphElement element, java.util.Map<org.processmining.framework.util.Pair<org.processmining.models.graphbased.AbstractGraphElement,ExpandableSubNet>,java.lang.String> idMap, org.processmining.models.connections.GraphLayoutConnection layout)
           
protected  void convertToNet(ExpandableSubNet subNet, PetrinetNode node, java.awt.geom.Point2D.Double displacement, org.processmining.models.connections.GraphLayoutConnection layout)
           
protected  java.lang.String exportAttributes(Pnml pnml)
          Exports all attributes.
protected  java.lang.String exportElements(Pnml pnml)
          Exports all child elements.
 org.processmining.framework.util.Pair<java.awt.geom.Point2D.Double,java.awt.geom.Point2D.Double> getBoundingBox()
          Gets the bounding box for this node.
 PnmlNodeGraphics getGraphics()
           
protected  void importAttributes(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
          Imports all known attributes.
protected  boolean importElements(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
          Checks whether the current start tag is known.
 
Methods inherited from class org.processmining.plugins.pnml.PnmlBasicObject
convertFromNet, convertToNet, convertToNet, getName
 
Methods inherited from class org.processmining.plugins.pnml.PnmlElement
exportAttribute, exportElement, importElement, importText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
Id attribute.


graphics

protected PnmlNodeGraphics graphics
Graphics element.

Constructor Detail

PnmlNode

public PnmlNode(java.lang.String tag)
Creates a fresh PNML node.

Parameters:
tag -
Method Detail

importAttributes

protected void importAttributes(org.xmlpull.v1.XmlPullParser xpp,
                                Pnml pnml)
Imports all known attributes.

Overrides:
importAttributes in class PnmlElement

exportAttributes

protected java.lang.String exportAttributes(Pnml pnml)
Exports all attributes.

Overrides:
exportAttributes in class PnmlElement
Returns:

importElements

protected boolean importElements(org.xmlpull.v1.XmlPullParser xpp,
                                 Pnml pnml)
Checks whether the current start tag is known. If known, it imports the corresponding child element and returns true. Otherwise, it returns false.

Overrides:
importElements in class PnmlBasicObject
Returns:
Whether the start tag was known.

exportElements

protected java.lang.String exportElements(Pnml pnml)
Exports all child elements.

Overrides:
exportElements in class PnmlBasicObject
Returns:

checkValidity

protected void checkValidity(Pnml pnml)
Checks the validity of this node. Should have an id attribute.

Overrides:
checkValidity in class PnmlElement

getGraphics

public PnmlNodeGraphics getGraphics()

getBoundingBox

public org.processmining.framework.util.Pair<java.awt.geom.Point2D.Double,java.awt.geom.Point2D.Double> getBoundingBox()
Gets the bounding box for this node.

Returns:
The bounding box for this node.

convertToNet

protected void convertToNet(ExpandableSubNet subNet,
                            PetrinetNode node,
                            java.awt.geom.Point2D.Double displacement,
                            org.processmining.models.connections.GraphLayoutConnection layout)

convertFromNet

public PnmlNode convertFromNet(ExpandableSubNet parent,
                               org.processmining.models.graphbased.AbstractGraphElement element,
                               java.util.Map<org.processmining.framework.util.Pair<org.processmining.models.graphbased.AbstractGraphElement,ExpandableSubNet>,java.lang.String> idMap,
                               org.processmining.models.connections.GraphLayoutConnection layout)