Save This Page
Home » openjdk-7 » com.sun.xml.internal » xsom » impl » parser » [javadoc | source]
com.sun.xml.internal.xsom.impl.parser
public class: NGCCRuntimeEx [javadoc | source]
java.lang.Object
   com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime
      com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx

All Implemented Interfaces:
    PatcherManager, ContentHandler, NGCCEventSource

NGCCRuntime extended with various utility methods for parsing XML Schema.
Field Summary
public final  ParserContext parser    coordinator. 
public  SchemaImpl currentSchema    The schema currently being parsed. 
public  int finalDefault    The @finalDefault value of the current schema. 
public  int blockDefault    The @blockDefault value of the current schema. 
public  boolean elementFormDefault    The @elementFormDefault value of the current schema. True if local elements are qualified by default. 
public  boolean attributeFormDefault    The @attributeFormDefault value of the current schema. True if local attributes are qualified by default. 
public  boolean chameleonMode    True if the current schema is in a chameleon mode. This changes the way QNames are interpreted. Life is very miserable with XML Schema, as you see. 
public  SchemaDocumentImpl document    Points to the SchemaDocumentImpl that represents the schema document being parsed. 
public static final  String XMLSchemaNSURI     
Fields inherited from com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime:
IMPOSSIBLE
Constructor:
 NGCCRuntimeEx(ParserContext _parser) 
Method from com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx Summary:
addPatcher,   checkDoubleDefError,   copyLocator,   createAnnotationParser,   createValidationContext,   createXmlString,   endPrefixMapping,   getAnnotationContextElementName,   getErrorHandler,   hasAlreadyBeenRead,   importSchema,   includeSchema,   onEnterElementConsumed,   onLeaveElementConsumed,   parseBoolean,   parseEntity,   parseForeignAttributes,   parseUName,   reportError,   reportError,   startPrefixMapping,   unexpectedX
Methods from com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime:
characters,   consumeAttribute,   endDocument,   endElement,   endPrefixMapping,   getAttributeIndex,   getCurrentAttributes,   getLocator,   ignorableWhitespace,   onEnterElementConsumed,   onLeaveElementConsumed,   processList,   processingInstruction,   redirectSubtree,   replace,   reset,   resolveNamespacePrefix,   sendEnterAttribute,   sendEnterElement,   sendLeaveAttribute,   sendLeaveElement,   sendText,   setDocumentLocator,   setRootHandler,   skippedEntity,   startDocument,   startElement,   startPrefixMapping,   trace,   traceln,   unexpectedX
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx Detail:
 public  void addPatcher(Patch patcher) 
 public  void checkDoubleDefError(XSDeclaration c) throws SAXException 
 public Locator copyLocator() 
    Creates a copy of the current locator object.
 public AnnotationParser createAnnotationParser() 
    Creates a new instance of annotation parser.
 public ValidationContext createValidationContext() 
    Returns an immutable snapshot of the current context.
 public XmlString createXmlString(String value) 
 public  void endPrefixMapping(String prefix) throws SAXException 
 public String getAnnotationContextElementName() 
    Gets the element name that contains the annotation element. This method works correctly only when called by the annotation handler.
 public ErrorHandler getErrorHandler() 
 public boolean hasAlreadyBeenRead() 
    Called when a new document is being parsed and checks if the document has already been parsed before.

    Used to avoid recursive inclusion. Note that the same document will be parsed multiple times if they are for different target namespaces.

    Document Graph Model

    The challenge we are facing here is that you have a graph of documents that reference each other. Each document has an unique URI to identify themselves, and references are done by using those. The graph may contain cycles.

    Our goal here is to parse all the documents in the graph, without parsing the same document twice. This method implements this check.

    One complication is the chameleon schema; a document can be parsed multiple times if they are under different target namespaces.

    Also, note that when you resolve relative URIs in the @schemaLocation, their base URI is *NOT* the URI of the document.

 public  void importSchema(String ns,
    String schemaLocation) throws SAXException 
    Imports the specified schema.
 public  void includeSchema(String schemaLocation) throws SAXException 
    Includes the specified schema.
 public  void onEnterElementConsumed(String uri,
    String localName,
    String qname,
    Attributes atts) throws SAXException 
 public  void onLeaveElementConsumed(String uri,
    String localName,
    String qname) throws SAXException 
 public boolean parseBoolean(String v) 
 public  void parseEntity(InputSource source,
    boolean includeMode,
    String expectedNamespace,
    Locator importLocation) throws SAXException 
    Parses the specified entity.
 public ForeignAttributesImpl parseForeignAttributes(ForeignAttributesImpl next) 
 public UName parseUName(String qname) throws SAXException 
    Parses UName under the given context.
 public  void reportError(String msg) throws SAXException 
 public  void reportError(String msg,
    Locator loc) throws SAXException 
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
 protected  void unexpectedX(String token) throws SAXException