org.processmining.exporting.petrinet.cpnexport
Class SubpageMapping

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.SubpageMapping
All Implemented Interfaces:
java.lang.Cloneable

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

A mapping for the subpage of a transition, that is needed for writing the cpn-file, is defined.

Author:
arozinat (a.rozinat@tm.tue.nl), Ronny Mans

Constructor Summary
SubpageMapping()
           
 
Method Summary
 void addMapping(ColoredPlace sub, ColoredPlace top)
          Add a mapping from a subplace to a topplace
 java.lang.Object clone(java.util.ArrayList topPlacesNew, java.util.ArrayList subPlacesNew)
          Make a deep copy of the object.
 org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping getMappingForSubPlace(ColoredPlace sub)
          Retrieves the mapping that belongs to the sub place
 org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping getMappingForTopPlace(ColoredPlace top)
          Retrieves the mapping that belongs to the top place
 java.util.ArrayList<org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping> getMappings()
          Retrieves the list with all mappings from sub to top
 java.lang.String getSubPageID()
          Gives the cpnID of the subpage for a transition
 void setSubPageID(java.lang.String id)
          Sets the cpnID of the subpage for a transition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubpageMapping

public SubpageMapping()
Method Detail

getSubPageID

public java.lang.String getSubPageID()
Gives the cpnID of the subpage for a transition

Returns:
String the cpnID for the subpage of this transition.

setSubPageID

public void setSubPageID(java.lang.String id)
Sets the cpnID of the subpage for a transition

Parameters:
id - the cpnID for the subpage of a transition.

addMapping

public void addMapping(ColoredPlace sub,
                       ColoredPlace top)
Add a mapping from a subplace to a topplace

Parameters:
sub - ColoredPlace the subplace
top - ColoredPlace the topplace

getMappings

public java.util.ArrayList<org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping> getMappings()
Retrieves the list with all mappings from sub to top

Returns:
ArrayList (Mapping) a list with mappings, one mapping defines a mapping from a sub place to a top place

getMappingForSubPlace

public org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping getMappingForSubPlace(ColoredPlace sub)
Retrieves the mapping that belongs to the sub place

Parameters:
sub - ColoredPlace the place on the sub page
Returns:
Mapping the mapping that belongs to this sub place null if no mapping exists

getMappingForTopPlace

public org.processmining.exporting.petrinet.cpnexport.SubpageMapping.Mapping getMappingForTopPlace(ColoredPlace top)
Retrieves the mapping that belongs to the top place

Parameters:
top - ColoredPlace the place on the top page
Returns:
Mapping the mapping that belongs to this top place null if no mapping exists

clone

public java.lang.Object clone(java.util.ArrayList topPlacesNew,
                              java.util.ArrayList subPlacesNew)
                       throws java.lang.CloneNotSupportedException
Make a deep copy of the object. Note, that because a cloned mapping from a place on the subpage to a place on the top page has to be made, that the cloned places on the subpage and top page level has to be provided.

Parameters:
topPlacesNew - ArrayList the cloned places on the top page level
subPlacesNew - ArrayList the cloned places on the sub page level
Returns:
Object the cloned subpage mapping
Throws:
java.lang.CloneNotSupportedException