Model object.
This is an utility class that makes it easy to load a grammar object
from various sources.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private class | ModelLoader.
|
| Modifier and Type | Field and Description |
|---|---|
| private final JCodeModel | |
| private final ErrorReceiverFilter | |
| private final Options | |
| private SCDBasedBindingSet | scdBasedBindingSet
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Model | Returns: null if an error happens. In that case, the error messages will be properly reported to the controller by this method.Annotates the obtained schema set. |
| public DOMForest | |
| private void | |
| public XSSchemaSet | Returns: null if the parsing failed.Parses a |
| public XSOMParser | createXSOMParser(XMLParser parser)
Potentially problematic - make sure the parser instance passed is initialized with proper security feature. |
| public XSOMParser | |
| private XSSchemaSet | createXSOMSpeculative()
Parses schemas directly into XSOM by assuming that there's no external annotations. |
| private String | |
| public static Model | load(Options opt, JCodeModel codeModel, ErrorReceiver er)
A convenience method to load schemas into a |
| private Model | |
| private Model | loadDTD(InputSource
DTD file source, InputSource External binding file. bindFile)Parses a DTD file into an annotated grammar. |
| private Model | |
| private Model | |
| private Model | |
| private XSSchemaSet | |
| public XSSchemaSet | |
| private boolean |
| codeModel | back to summary |
|---|---|
| private final JCodeModel codeModel | |
| errorReceiver | back to summary |
|---|---|
| private final ErrorReceiverFilter errorReceiver | |
| opt | back to summary |
|---|---|
| private final Options opt | |
| scdBasedBindingSet | back to summary |
|---|---|
| private SCDBasedBindingSet scdBasedBindingSet
| |
| ModelLoader | back to summary |
|---|---|
| public ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er) | |
| annotateXMLSchema | back to summary |
|---|---|
| public Model annotateXMLSchema(XSSchemaSet xs) Annotates the obtained schema set.
| |
| buildDOMForest | back to summary |
|---|---|
| public DOMForest buildDOMForest(InternalizationLogic logic) throws SAXException Builds DOMForest and performs the internalization.
| |
| checkTooManySchemaErrors | back to summary |
|---|---|
| private void checkTooManySchemaErrors() | |
| createXSOM | back to summary |
|---|---|
| public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException Parses a
| |
| createXSOMParser | back to summary |
|---|---|
| public XSOMParser createXSOMParser(XMLParser parser) Potentially problematic - make sure the parser instance passed is initialized with proper security feature. | |
| createXSOMParser | back to summary |
|---|---|
| public XSOMParser createXSOMParser(final DOMForest forest) | |
| createXSOMSpeculative | back to summary |
|---|---|
| private XSSchemaSet createXSOMSpeculative() throws SAXException, SpeculationFailure Parses schemas directly into XSOM by assuming that there's no external annotations.
When an external annotation is found, a | |
| fixNull | back to summary |
|---|---|
| private String fixNull(String s) | |
| load | back to summary |
|---|---|
| public static Model load(Options opt, JCodeModel codeModel, ErrorReceiver er) A convenience method to load schemas into a | |
| load | back to summary |
|---|---|
| private Model load() | |
| loadDTD | back to summary |
|---|---|
| private Model loadDTD(InputSource source, InputSource bindFile) Parses a DTD file into an annotated grammar.
| |
| loadRELAXNG | back to summary |
|---|---|
| private Model loadRELAXNG() throws SAXException Parses a RELAX NG grammar into an annotated grammar. | |
| loadRELAXNG | back to summary |
|---|---|
| private Model loadRELAXNG(Parseable p) Common part between the XML syntax and the compact syntax. | |
| loadRELAXNGCompact | back to summary |
|---|---|
| private Model loadRELAXNGCompact() Loads RELAX NG compact syntax | |
| loadWSDL | back to summary |
|---|---|
| private XSSchemaSet loadWSDL() throws SAXException Parses a set of schemas inside a WSDL file.
A WSDL file may contain multiple | |
| loadXMLSchema | back to summary |
|---|---|
| public XSSchemaSet loadXMLSchema() throws SAXException Parses a set of XML Schema files into an annotated grammar. | |
| sanityCheck | back to summary |
|---|---|
| private boolean sanityCheck() Do some extra checking and return false if the compilation should abort. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | startElement(String uri, String localName, String qName, Attributes attributes)
Overrides org. Implements org. Filter a start element event. |
| SpeculationChecker | back to summary |
|---|---|
| private SpeculationChecker() | |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Overrides org. Implements org. Doc from org. Filter a start element event.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SpeculationFailure | back to summary |
|---|---|
| private SpeculationFailure() | |
XMLParser implementation that adds additional processors into the chain.
This parser will parse a DOM forest as: DOMForestParser --> ExtensionBindingChecker --> ProhibitedFeatureFilter --> XSOMParser
| Modifier and Type | Field and Description |
|---|---|
| private final XMLParser |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | parse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver)
Implements com. Parses the document identified by the given input source and sends SAX events to the given content handler. |
| private ContentHandler | wrapBy(XMLFilterImpl filter, ContentHandler handler)
Wraps the specified content handler by a filter. |
| baseParser | back to summary |
|---|---|
| private final XMLParser baseParser | |
| XMLSchemaParser | back to summary |
|---|---|
| private XMLSchemaParser(XMLParser baseParser) | |
| parse | back to summary |
|---|---|
| public void parse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver) throws SAXException, IOException Implements com. Doc from com. Parses the document identified by the given input source and sends SAX events to the given content handler. This method must be re-entrant.
| |
| wrapBy | back to summary |
|---|---|
| private ContentHandler wrapBy(XMLFilterImpl filter, ContentHandler handler) Wraps the specified content handler by a filter. It is little awkward to use a helper implementation class like XMLFilterImpl as the method parameter, but this simplifies the code. | |