Class PetriNetCopier


  • public class PetriNetCopier
    extends java.lang.Object
    This class provides method to create and modify a deep copy of a Petri net. Furthermore, there are methods to translate places/nodes between the copy and the original net.
    • Constructor Summary

      Constructors 
      Constructor Description
      PetriNetCopier​(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet)  
      PetriNetCopier​(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet, java.lang.String label)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PetriNetCopier colorPlaces​(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.elements.Place> places)
      Colors the given places in the deep copy.
      org.processmining.models.graphbased.directed.petrinet.Petrinet getDeepCopy()
      Returns the deep copy of the net
      org.processmining.models.graphbased.directed.petrinet.PetrinetNode getNodeInCopyForOriginalNode​(org.processmining.models.graphbased.directed.petrinet.PetrinetNode node)
      Takes a PetrinetNode in the deep copy and returns the corresponding node of the original net.
      org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInCopyForOriginalPlace​(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
      Returns the place in the copy for a place in the original net.
      org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInOriginalNetForPlaceInCopy​(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
      Returns the place in the original net for a place in the deep copy.
      org.processmining.models.semantics.petrinet.Marking originalToCopyMarking​(org.processmining.models.semantics.petrinet.Marking m1)
      Takes a Marking of the original net and returns the corresponding marking in the copy.
      PetriNetCopier removeNodes​(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.PetrinetNode> nodes)
      Removes the given nodes from the deep copy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PetriNetCopier

        public PetriNetCopier​(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet)
      • PetriNetCopier

        public PetriNetCopier​(org.processmining.models.graphbased.directed.petrinet.Petrinet petrinet,
                              java.lang.String label)
    • Method Detail

      • getDeepCopy

        public org.processmining.models.graphbased.directed.petrinet.Petrinet getDeepCopy()
        Returns the deep copy of the net
        Returns:
        the deep copy of the net
      • originalToCopyMarking

        public org.processmining.models.semantics.petrinet.Marking originalToCopyMarking​(org.processmining.models.semantics.petrinet.Marking m1)
        Takes a Marking of the original net and returns the corresponding marking in the copy.
        Parameters:
        m1 - the Marking of the original net
        Returns:
        the marking of the deep copy
      • getNodeInCopyForOriginalNode

        public org.processmining.models.graphbased.directed.petrinet.PetrinetNode getNodeInCopyForOriginalNode​(org.processmining.models.graphbased.directed.petrinet.PetrinetNode node)
        Takes a PetrinetNode in the deep copy and returns the corresponding node of the original net.
        Parameters:
        node - a node in the deep copy.
        Returns:
        the node in the original net
      • getPlaceInCopyForOriginalPlace

        public org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInCopyForOriginalPlace​(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
        Returns the place in the copy for a place in the original net.
        Parameters:
        p - a place from the original net
        Returns:
        the place in the deep copy
      • getPlaceInOriginalNetForPlaceInCopy

        public org.processmining.models.graphbased.directed.petrinet.elements.Place getPlaceInOriginalNetForPlaceInCopy​(org.processmining.models.graphbased.directed.petrinet.elements.Place p)
        Returns the place in the original net for a place in the deep copy.
        Parameters:
        p - a place in the deep copy
        Returns:
        the place in the original net
      • removeNodes

        public PetriNetCopier removeNodes​(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.PetrinetNode> nodes)
        Removes the given nodes from the deep copy.
        Parameters:
        nodes - of the original net to be removed in the deep copy
        Returns:
        the PetriNetCopier instance
      • colorPlaces

        public PetriNetCopier colorPlaces​(java.util.Collection<org.processmining.models.graphbased.directed.petrinet.elements.Place> places)
        Colors the given places in the deep copy.
        Parameters:
        places - of the original net that should be colored in the deep copy
        Returns:
        the PetriNetCopier instance