com.sun.tools.xjc
Class ModelLoader

java.lang.Object
  extended by com.sun.tools.xjc.ModelLoader

public final class ModelLoader
extends java.lang.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, com.sun.codemodel.JCodeModel _codeModel, ErrorReceiver er)
           
 
Method Summary
 com.sun.tools.xjc.model.Model annotateXMLSchema(com.sun.xml.xsom.XSSchemaSet xs)
          Annotates the obtained schema set.
 com.sun.tools.xjc.reader.internalizer.DOMForest buildDOMForest(com.sun.tools.xjc.reader.internalizer.InternalizationLogic logic)
          Builds DOMForest and performs the internalization.
 com.sun.xml.xsom.XSSchemaSet createXSOM(com.sun.tools.xjc.reader.internalizer.DOMForest forest, com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet scdBasedBindingSet)
          Parses a DOMForest into a XSSchemaSet.
 com.sun.xml.xsom.parser.XSOMParser createXSOMParser(com.sun.tools.xjc.reader.internalizer.DOMForest forest)
           
 com.sun.xml.xsom.parser.XSOMParser createXSOMParser(com.sun.xml.xsom.parser.XMLParser parser)
          Potentially problematic - make sure the parser instance passed is initialized with proper security feature.
static com.sun.tools.xjc.model.Model load(Options opt, com.sun.codemodel.JCodeModel codeModel, ErrorReceiver er)
          A convenience method to load schemas into a Model.
 com.sun.xml.xsom.XSSchemaSet loadXMLSchema()
          Parses a set of XML Schema files into an annotated grammar.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelLoader

public ModelLoader(Options _opt,
                   com.sun.codemodel.JCodeModel _codeModel,
                   ErrorReceiver er)
Method Detail

load

public static com.sun.tools.xjc.model.Model load(Options opt,
                                                 com.sun.codemodel.JCodeModel codeModel,
                                                 ErrorReceiver er)
A convenience method to load schemas into a Model.


buildDOMForest

public com.sun.tools.xjc.reader.internalizer.DOMForest buildDOMForest(com.sun.tools.xjc.reader.internalizer.InternalizationLogic logic)
                                                               throws org.xml.sax.SAXException
Builds DOMForest and performs the internalization.

Throws:
org.xml.sax.SAXException - when a fatal error happens

loadXMLSchema

public com.sun.xml.xsom.XSSchemaSet loadXMLSchema()
                                           throws org.xml.sax.SAXException
Parses a set of XML Schema files into an annotated grammar.

Throws:
org.xml.sax.SAXException

annotateXMLSchema

public com.sun.tools.xjc.model.Model annotateXMLSchema(com.sun.xml.xsom.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 com.sun.xml.xsom.parser.XSOMParser createXSOMParser(com.sun.xml.xsom.parser.XMLParser parser)
Potentially problematic - make sure the parser instance passed is initialized with proper security feature.

Parameters:
parser -
Returns:

createXSOMParser

public com.sun.xml.xsom.parser.XSOMParser createXSOMParser(com.sun.tools.xjc.reader.internalizer.DOMForest forest)

createXSOM

public com.sun.xml.xsom.XSSchemaSet createXSOM(com.sun.tools.xjc.reader.internalizer.DOMForest forest,
                                               com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet scdBasedBindingSet)
                                        throws org.xml.sax.SAXException
Parses a DOMForest into a XSSchemaSet.

Returns:
null if the parsing failed.
Throws:
org.xml.sax.SAXException