Class PetriNetParser
java.lang.Object
org.tweetyproject.commons.Parser
org.tweetyproject.logics.bpm.parser.bpmn_to_petri.PetriNetParser
A class to map a BPMN model to a Petri net
- Author:
- Benedikt Knopp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Construct the Petri netget()
retrieve the constructed Petri netparseBeliefBase
(Reader reader) Parses the given reader into a belief base of the given type.parseFormula
(Reader reader) Parses the given reader into a formula of the given type.void
setProvideInitialTokensAtStartEvents
(boolean provide) Specify if the BPMN start events should get an initial token in the corresponding places of parsed Petri netMethods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
Constructor Details
-
PetriNetParser
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
Construct the Petri net- Throws:
IllegalStateException
- if the net has already been constructed
-
get
retrieve the constructed Petri net- Returns:
- the Petri net
- Throws:
IllegalStateException
- if the Petri net has not been constructed yet
-
parseBeliefBase
Description copied from class:Parser
Parses the given reader into a belief base of the given type.- Specified by:
parseBeliefBase
in classParser
- Parameters:
reader
- a reader- Returns:
- a belief base
- Throws:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-
parseFormula
Description copied from class:Parser
Parses the given reader into a formula of the given type.- Specified by:
parseFormula
in classParser
- Parameters:
reader
- a reader- Returns:
- a formula
- Throws:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-