Class 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.
    Author:
    Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
    • Method Detail

      • buildDOMForest

        public DOMForest buildDOMForest​(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 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 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.
        Parameters:
        parser -
        Returns: