Package org.xmlet.xsdparser.core
Class XsdParserJar
- java.lang.Object
-
- org.xmlet.xsdparser.core.XsdParserCore
-
- org.xmlet.xsdparser.core.XsdParserJar
-
public class XsdParserJar extends XsdParserCore
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.ClassLoaderclassLoader-
Fields inherited from class org.xmlet.xsdparser.core.XsdParserCore
currentFile, parseElements, parseMappers, schemaLocations, schemaLocationsMap
-
-
Constructor Summary
Constructors Constructor Description 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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.w3c.dom.NodegetSchemaNode(java.io.InputStream inputStream)private voidparse(java.lang.String jarPath, java.lang.String filePath)private voidparseJarFile(java.lang.String filePath)Parses the XSD file represented by the received InputStream.private voidsetClassLoader(java.lang.String jarPath)Creates a new class loader, replacing the current one, having another path added to the classpath.-
Methods inherited from class org.xmlet.xsdparser.core.XsdParserCore
addFileToParse, addParsedElement, addUnsolvedReference, getDocumentBuilder, getParseMappers, getResultXsdElements, getResultXsdSchemas, getUnsolvedReferences, getXsdTypesToJava, isRelativePath, isXsdSchema, resolveRefs, updateConfig
-
-
-
-
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.ParserConfigurationExceptionjava.io.IOExceptionorg.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.
-
-