Class PetrinetGraphConnection

  • All Implemented Interfaces:
    org.processmining.framework.connections.Connection

    public class PetrinetGraphConnection
    extends org.processmining.framework.connections.impl.AbstractConnection
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SOURCE  
      static java.lang.String TARGET  
      • Fields inherited from class org.processmining.framework.connections.impl.AbstractConnection

        manager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<Place,​Place> getPlaceMapping()
      Returns the mapping from places in source to places in target
      java.util.Map<Transition,​Transition> getTransitionMapping()
      Returns the mapping from transitions in source to transitions in target
      boolean isSourceNet​(PetrinetGraph net)
      return true if this net is the source of the connection.
      boolean isTargetNet​(PetrinetGraph net)
      return true if this net is the source of the connection.
      • Methods inherited from class org.processmining.framework.connections.impl.AbstractConnection

        containsObjects, containsObjects, equals, get, getID, getLabel, getMapping, getObjects, getObjectWithRole, getRoles, hashCode, isRemoved, put, remove, remove, setLabel, setManager, toString, updated
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PetrinetGraphConnection

        public PetrinetGraphConnection​(PetrinetGraph source,
                                       PetrinetGraph target,
                                       java.util.Map<Transition,​Transition> transitionMap,
                                       java.util.Map<Place,​Place> placeMap)
        Connects the two Petri nets through the mappings described in the transitions and place map. The following assumptions are made: assert(source.getTransitions().containsAll(transitionMap.keySet())); assert(target.getTransitions().containsAll(transitionMap.values())); assert(source.getPlaces().containsAll(placeMap.keySet())); assert(target.getPlaces().containsAll(placeMap.values()));
        Parameters:
        source - the source Petri net
        target - the target Petri net
        transitionMap - the mapping between transitions. This mapping is copied as a WeakKeyValueMap to avoid keeping the net alive for the sake of storing the connection. This is necessary since Transitions keep pointers to the Petrinet in which they are contained and these nets are used in the connection.
        placeMap - the mapping between places. This mapping is copied as a WeakKeyValueMap to avoid keeping the net alive for the sake of storing the connection.
    • Method Detail

      • isSourceNet

        public boolean isSourceNet​(PetrinetGraph net)
        return true if this net is the source of the connection. Note that any user has a reference to the net available when the connection is retrieved from the framework. No equals method is used, i.e. pointers are compared.
        Parameters:
        net -
        Returns:
      • isTargetNet

        public boolean isTargetNet​(PetrinetGraph net)
        return true if this net is the source of the connection. Note that any user has a reference to the net available when the connection is retrieved from the framework. No equals method is used, i.e. pointers are compared.
        Parameters:
        net -
        Returns:
      • getTransitionMapping

        public java.util.Map<Transition,​Transition> getTransitionMapping()
        Returns the mapping from transitions in source to transitions in target
        Returns:
      • getPlaceMapping

        public java.util.Map<Place,​Place> getPlaceMapping()
        Returns the mapping from places in source to places in target
        Returns: