Class XsdParserJar

    • Field Detail

      • classLoader

        private static java.lang.ClassLoader classLoader
    • Constructor Detail

      • XsdParserJar

        public XsdParserJar​(java.lang.String jarPath,
                            java.lang.String filePath)
        Adds the jar file represented the jarPath to the classpath and proceeds by parsing the file present in the previous jar with the path filePath.
        Parameters:
        jarPath - The path to the jar file.
        filePath - The filePath of the XSD file to parse. Relative to the Jar structure.
      • XsdParserJar

        public XsdParserJar​(java.lang.String jarPath,
                            java.lang.String filePath,
                            ParserConfig config)
        Adds the jar file represented the jarPath to the classpath and proceeds by parsing the file present in the previous jar with the path filePath.
        Parameters:
        jarPath - The path to the jar file.
        filePath - The filePath of the XSD file to parse. Relative to the Jar structure.
        config - Config for the parser.
    • Method Detail

      • parse

        private void parse​(java.lang.String jarPath,
                           java.lang.String filePath)
      • parseJarFile

        private void parseJarFile​(java.lang.String filePath)
        Parses the XSD file represented by the received InputStream.
        Parameters:
        filePath - The filePath of the XSD file.
      • getSchemaNode

        private org.w3c.dom.Node getSchemaNode​(java.io.InputStream inputStream)
                                        throws javax.xml.parsers.ParserConfigurationException,
                                               java.io.IOException,
                                               org.xml.sax.SAXException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        java.io.IOException
        org.xml.sax.SAXException
      • setClassLoader

        private void setClassLoader​(java.lang.String jarPath)
        Creates a new class loader, replacing the current one, having another path added to the classpath. The new path is the path to the jar received in this class constructor.
        Parameters:
        jarPath - The path of the jar file.