Class 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 Detail

      • RootParser

        public RootParser()
        Create a new instance
    • 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 occurs
        org.xml.sax.SAXException - if some error occurs
        java.io.IOException - if some error occurs
      • parseBeliefBase

        public BeliefBase parseBeliefBase​(java.io.Reader reader)
                                   throws java.io.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:
        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: 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:
        java.io.IOException - if some IO issue occurred.
        ParserException - some parsing exceptions may be added here.