java.lang.Object
org.tweetyproject.commons.Parser
org.tweetyproject.logics.bpm.parser.bpmn_to_petri.PetriNetParser

public class PetriNetParser extends Parser
A class to map a BPMN model to a Petri net
Author:
Benedikt Knopp
  • Constructor Details

    • PetriNetParser

      public PetriNetParser(BpmnModel bpmnModel)
      Create a new instance
      Parameters:
      bpmnModel - the BPMN model that is to be parsed
  • Method Details

    • setProvideInitialTokensAtStartEvents

      public void setProvideInitialTokensAtStartEvents(boolean provide)
      Specify if the BPMN start events should get an initial token in the corresponding places of parsed Petri net
      Parameters:
      provide - true iff the places should get an initial token
    • construct

      public void construct() throws IllegalStateException
      Construct the Petri net
      Throws:
      IllegalStateException - if the net has already been constructed
    • get

      public PetriNet get() throws IllegalStateException
      retrieve the constructed Petri net
      Returns:
      the Petri net
      Throws:
      IllegalStateException - if the Petri net has not been constructed yet
    • parseBeliefBase

      public BeliefBase parseBeliefBase(Reader reader) throws IOException, ParserException
      Description copied from class: Parser
      Parses the given reader into a belief base of the given type.
      Specified by:
      parseBeliefBase in class Parser
      Parameters:
      reader - a reader
      Returns:
      a belief base
      Throws:
      IOException - if some IO issue occurred.
      ParserException - some parsing exceptions may be added here.
    • parseFormula

      public Formula parseFormula(Reader reader) throws IOException, ParserException
      Description copied from class: Parser
      Parses the given reader into a formula of the given type.
      Specified by:
      parseFormula in class Parser
      Parameters:
      reader - a reader
      Returns:
      a formula
      Throws:
      IOException - if some IO issue occurred.
      ParserException - some parsing exceptions may be added here.