Class RootParser
- java.lang.Object
-
- org.tweetyproject.commons.Parser
-
- org.tweetyproject.logics.bpm.parser.RootParser
-
public class RootParser extends Parser
Instances of this class serve as the root of a parsing process for a BPMN XML file.- Author:
- Benedikt
-
-
Constructor Summary
Constructors Constructor Description RootParser()Create a new instance
-
Method Summary
Modifier and Type Method Description BpmnModelgetBpmnModel()java.lang.StringgetNormalizedTagName(org.w3c.dom.Node node)BeliefBaseparseBeliefBase(java.io.Reader reader)Parses the given reader into a belief base of the given type.BeliefBaseparseFile(java.io.File xmlFile)Parse the XML file to an instance of the BpmnModel classFormulaparseFormula(java.io.Reader reader)Parses the given reader into a formula of the given type.voidputBufferedEdge(BufferedBpmnEdge edge)voidputNode(BpmnNode node)-
Methods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
-
-
-
Method Detail
-
getNormalizedTagName
public java.lang.String getNormalizedTagName(org.w3c.dom.Node node)
- Parameters:
node- the node to retrieve the name for- Returns:
- the node name free of possible namespace prefixes
-
getBpmnModel
public BpmnModel getBpmnModel()
- Returns:
- the parsed BpmnModel
-
putNode
public void putNode(BpmnNode node)
- Parameters:
node- a parsed node
-
putBufferedEdge
public void putBufferedEdge(BufferedBpmnEdge edge)
- Parameters:
edge- a prepared buffered edge
-
parseFile
public BeliefBase parseFile(java.io.File xmlFile) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
Parse the XML file to an instance of the BpmnModel class- Parameters:
xmlFile- the XML file to parse to a BPMN model- Returns:
- the parsed belief base
- Throws:
javax.xml.parsers.ParserConfigurationException- if some error occursorg.xml.sax.SAXException- if some error occursjava.io.IOException- if some error occurs
-
parseBeliefBase
public BeliefBase parseBeliefBase(java.io.Reader reader) throws java.io.IOException, ParserException
Description copied from class:ParserParses the given reader into a belief base of the given type.- Specified by:
parseBeliefBasein classParser- Parameters:
reader- a reader- Returns:
- a belief base
- Throws:
java.io.IOException- if some IO issue occurred.ParserException- some parsing exceptions may be added here.
-
parseFormula
public Formula parseFormula(java.io.Reader reader) throws java.io.IOException, ParserException
Description copied from class:ParserParses the given reader into a formula of the given type.- Specified by:
parseFormulain classParser- Parameters:
reader- a reader- Returns:
- a formula
- Throws:
java.io.IOException- if some IO issue occurred.ParserException- some parsing exceptions may be added here.
-
-