Package com.sun.tools.xjc
Class ModelLoader
java.lang.Object
com.sun.tools.xjc.ModelLoader
Builds a
Model object.
This is an utility class that makes it easy to load a grammar object
from various sources.- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnnotates the obtained schema set.Builds DOMForest and performs the internalization.createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) Parses aDOMForestinto aXSSchemaSet.createXSOMParser(DOMForest forest) createXSOMParser(XMLParser parser) Potentially problematic - make sure the parser instance passed is initialized with proper security feature.static Modelload(Options opt, JCodeModel codeModel, ErrorReceiver er) A convenience method to load schemas into aModel.Parses a set of XML Schema files into an annotated grammar.
-
Constructor Details
-
ModelLoader
-
-
Method Details
-
load
A convenience method to load schemas into aModel. -
buildDOMForest
Builds DOMForest and performs the internalization.- Throws:
SAXException- when a fatal error happens
-
loadXMLSchema
Parses a set of XML Schema files into an annotated grammar.- Throws:
SAXException
-
annotateXMLSchema
Annotates the obtained schema set.- Returns:
- null if an error happens. In that case, the error messages will be properly reported to the controller by this method.
-
createXSOMParser
Potentially problematic - make sure the parser instance passed is initialized with proper security feature.- Parameters:
parser-- Returns:
-
createXSOMParser
-
createXSOM
public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException Parses aDOMForestinto aXSSchemaSet.- Returns:
- null if the parsing failed.
- Throws:
SAXException
-