com.sun.tools.xjc

Class ModelLoader

public final class ModelLoader extends Object

Builds a Model object. This is an utility class that makes it easy to load a grammar object from various sources.
Constructor Summary
ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er)
Method Summary
ModelannotateXMLSchema(XSSchemaSet xs)
Annotates the obtained schema set.
DOMForestbuildDOMForest(InternalizationLogic logic)
Builds DOMForest and performs the internalization.
XSSchemaSetcreateXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet)
Parses a DOMForest into a XSSchemaSet.
XSOMParsercreateXSOMParser(XMLParser parser)
XSOMParsercreateXSOMParser(DOMForest forest)
static Modelload(Options opt, JCodeModel codeModel, ErrorReceiver er)
A convenience method to load schemas into a Model.
XSSchemaSetloadXMLSchema()
Parses a set of XML Schema files into an annotated grammar.

Constructor Detail

ModelLoader

public ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er)

Method Detail

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.

buildDOMForest

public DOMForest buildDOMForest(InternalizationLogic logic)
Builds DOMForest and performs the internalization.

Throws: SAXException when a fatal error happens

createXSOM

public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet)
Parses a DOMForest into a XSSchemaSet.

Returns: null if the parsing failed.

createXSOMParser

public XSOMParser createXSOMParser(XMLParser parser)

createXSOMParser

public XSOMParser createXSOMParser(DOMForest forest)

load

public static Model load(Options opt, JCodeModel codeModel, ErrorReceiver er)
A convenience method to load schemas into a Model.

loadXMLSchema

public XSSchemaSet loadXMLSchema()
Parses a set of XML Schema files into an annotated grammar.