- java.lang.Object
-
- com.sun.tools.xjc.ModelLoader
-
public final class ModelLoader extends Object
Builds aModel
object. This is an utility class that makes it easy to load a grammar object from various sources.- Author:
- Kohsuke Kawaguchi ([email protected])
-
-
Constructor Summary
Constructors Constructor Description ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Model
annotateXMLSchema(XSSchemaSet xs)
Annotates the obtained schema set.DOMForest
buildDOMForest(InternalizationLogic logic)
Builds DOMForest and performs the internalization.XSSchemaSet
createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet)
Parses aDOMForest
into aXSSchemaSet
.XSOMParser
createXSOMParser(DOMForest forest)
XSOMParser
createXSOMParser(XMLParser parser)
Potentially problematic - make sure the parser instance passed is initialized with proper security feature.static Model
load(Options opt, JCodeModel codeModel, ErrorReceiver er)
A convenience method to load schemas into aModel
.XSSchemaSet
loadXMLSchema()
Parses a set of XML Schema files into an annotated grammar.
-
-
-
Constructor Detail
-
ModelLoader
public ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er)
-
-
Method Detail
-
load
public static Model load(Options opt, JCodeModel codeModel, ErrorReceiver er)
A convenience method to load schemas into aModel
.
-
buildDOMForest
public DOMForest buildDOMForest(InternalizationLogic logic) throws SAXException
Builds DOMForest and performs the internalization.- Throws:
SAXException
- when a fatal error happens
-
loadXMLSchema
public XSSchemaSet loadXMLSchema() throws SAXException
Parses a set of XML Schema files into an annotated grammar.- Throws:
SAXException
-
annotateXMLSchema
public Model annotateXMLSchema(XSSchemaSet xs)
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
public XSOMParser createXSOMParser(XMLParser parser)
Potentially problematic - make sure the parser instance passed is initialized with proper security feature.
-
createXSOMParser
public XSOMParser createXSOMParser(DOMForest forest)
-
createXSOM
public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException
Parses aDOMForest
into aXSSchemaSet
.- Returns:
- null if the parsing failed.
- Throws:
SAXException
-
-