public class MetadataParser extends Object
The class will start a DTD parsing when the files are ending with '.dtd'. Otherwise, the files are considered as XSD's.
| Constructor and Description |
|---|
MetadataParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateCode(MetadataParserPath path)
Generates source code by applying the
ddJavaAll.xsl XSLT extracted from the resource stream. |
Metadata |
getMetadata()
Creates a new instance of the parser.
|
void |
parse(MetadataParserPath path,
List<?> confList,
boolean verbose)
Parses the specified schema and produces the
metadata object. |
public Metadata getMetadata()
pathToXsd - Full path to the xsd or dtd file.nameSpace - Defines the default namespace.packageApi - Defines the package name for the API classes.packageImpl - Defines the package name for the implementation classes.descriptorName - Defines the descriptor namerootElementName - Defines the root element name used by the to be created descriptorrootElementType - Defines the type of the root element.pathToApi - Path to the API folder. All API classes are created here.pathToImpl - Path to the implementation folder. All implementation classes are created here.pathToTest - Path to the test folder. All test classes are created here.If this is an empty string, then no classes are produced.pathToServices - Path to the service folder. All service files are created here.If this is an empty string, then no service files are produced.verbose - If true, the detailed parsing information are printed out.IOException - Thrown if a temporary file can not be created.public void parse(MetadataParserPath path, List<?> confList, boolean verbose) throws Exception
metadata object.Exceptionpublic void generateCode(MetadataParserPath path) throws TransformerException
ddJavaAll.xsl XSLT extracted from the resource stream.TransformerExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.