Class RootParser

java.lang.Object
org.tweetyproject.commons.Parser
org.tweetyproject.logics.bpm.parser.xml_to_bpmn.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 Details

    • RootParser

      public RootParser()
      Create a new instance
  • Method Details

    • getNormalizedTagName

      public String getNormalizedTagName(Node node)
      Return the node name free of possible namespace prefixes
      Parameters:
      node - the node to retrieve the name for
      Returns:
      the node name free of possible namespace prefixes
    • getBpmnModel

      public BpmnModel getBpmnModel()
      Return the parsed BpmnModel
      Returns:
      the parsed BpmnModel
    • putNode

      public void putNode(BpmnNode node)
      Put node
      Parameters:
      node - a parsed node
    • putBufferedEdge

      public void putBufferedEdge(BufferedBpmnEdge edge)
      Buffer Edge
      Parameters:
      edge - a prepared buffered edge
    • parseFile

      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:
      ParserConfigurationException - if some error occurs
      SAXException - if some error occurs
      IOException - if some error occurs
    • 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.