Class PlanitXmlReader<T>

    • Constructor Detail

      • PlanitXmlReader

        public PlanitXmlReader​(Class<T> clazz,
                               String networkPathDirectory,
                               String xmlFileExtension)
        location of where to collect Xml file and poopulate an instance of provided class
        Parameters:
        clazz - to create root element and populate it for
        networkPathDirectory - directory on where to find the file
        xmlFileExtension - xml extension to use
      • PlanitXmlReader

        public PlanitXmlReader​(T xmlRootElement)
        Constructor where root element is already provided and assumed to be populated as well
        Parameters:
        xmlRootElement - to use
    • Method Detail

      • initialiseAndParseXmlRootElement

        protected T initialiseAndParseXmlRootElement()
                                              throws PlanItException
        parse the raw XML root (and rest) from file if not already set via constructor
        Returns:
        populated xml root element if possible based on provided input to constructor
        Throws:
        PlanItException - thrown if error
      • getXmlRootElement

        protected T getXmlRootElement()
        Collect the root element of this reader
        Returns:
        root element
      • clearXmlContent

        public void clearXmlContent()
        mark the xml root element for garbage collection