public class NGCCRuntime extends Object implements ContentHandler, NGCCEventSource
Auto-generated, do not edit.
| Constructor and Description | 
|---|
NGCCRuntime()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
characters(char[] ch,
          int start,
          int length)  | 
void | 
consumeAttribute(int index)  | 
void | 
endDocument()  | 
void | 
endElement(String uri,
          String localname,
          String qname)  | 
void | 
endPrefixMapping(String prefix)  | 
int | 
getAttributeIndex(String uri,
                 String localname)  | 
Attributes | 
getCurrentAttributes()
Attributes that belong to the current element. 
 | 
Locator | 
getLocator()
Gets the source location of the current event. 
 | 
void | 
ignorableWhitespace(char[] ch,
                   int start,
                   int length)  | 
void | 
onEnterElementConsumed(String uri,
                      String localName,
                      String qname,
                      Attributes atts)
Called by the generated handler code when an enter element
 event is consumed. 
 | 
void | 
onLeaveElementConsumed(String uri,
                      String localName,
                      String qname)  | 
void | 
processingInstruction(String target,
                     String data)  | 
void | 
processList(String str)  | 
void | 
redirectSubtree(ContentHandler child,
               String uri,
               String local,
               String qname)
This method can be called only from the enterElement handler. 
 | 
int | 
replace(NGCCEventReceiver o,
       NGCCEventReceiver n)
Replaces an old handler with a new handler, and returns
 ID of the EventReceiver thread. 
 | 
void | 
reset()
Cleans up all the data structure so that the object can be reused later. 
 | 
String | 
resolveNamespacePrefix(String prefix)  | 
void | 
sendEnterAttribute(int threadId,
                  String uri,
                  String local,
                  String qname)  | 
void | 
sendEnterElement(int threadId,
                String uri,
                String local,
                String qname,
                Attributes atts)
Sends an enter element event to the specified EventReceiver thread. 
 | 
void | 
sendLeaveAttribute(int threadId,
                  String uri,
                  String local,
                  String qname)  | 
void | 
sendLeaveElement(int threadId,
                String uri,
                String local,
                String qname)  | 
void | 
sendText(int threadId,
        String value)  | 
void | 
setDocumentLocator(Locator _loc)  | 
void | 
setRootHandler(NGCCHandler rootHandler)
Sets the root handler, which will be used to parse the
 root element. 
 | 
void | 
skippedEntity(String name)  | 
void | 
startDocument()  | 
void | 
startElement(String uri,
            String localname,
            String qname,
            Attributes atts)  | 
void | 
startPrefixMapping(String prefix,
                  String uri)  | 
void | 
trace(String s)  | 
void | 
traceln(String s)  | 
protected void | 
unexpectedX(String token)  | 
public void setRootHandler(NGCCHandler rootHandler)
This method can be called right after the object is created or the reset method is called. You can't replace the root handler while parsing is in progress.
Usually a generated class that corresponds to the <start> pattern will be used as the root handler, but any NGCCHandler can be a root handler.
IllegalStateException - If this method is called but it doesn't satisfy the
      pre-condition stated above.public void reset()
public void setDocumentLocator(Locator _loc)
setDocumentLocator in interface ContentHandlerpublic Locator getLocator()
One can call this method from RelaxNGCC handlers to access the line number information. Note that to
public Attributes getCurrentAttributes()
It's generally not recommended for applications to use this method. RelaxNGCC internally removes processed attributes, so this doesn't correctly reflect all the attributes an element carries.
public int replace(NGCCEventReceiver o, NGCCEventReceiver n)
NGCCEventSourcereplace in interface NGCCEventSourcepublic void processList(String str) throws SAXException
SAXExceptionpublic void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic void onEnterElementConsumed(String uri, String localName, String qname, Attributes atts) throws SAXException
Pushes a new attribute set.
Note that attributes are NOT pushed at the startElement method, because the processing of the enterElement event can trigger other attribute events and etc.
This method will be called from one of handlers when it truely consumes the enterElement event.
SAXExceptionpublic void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException
SAXExceptionpublic void endElement(String uri, String localname, String qname) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void consumeAttribute(int index)
                      throws SAXException
SAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void endDocument()
                 throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startDocument()
startDocument in interface ContentHandlerpublic void sendEnterAttribute(int threadId,
                               String uri,
                               String local,
                               String qname)
                        throws SAXException
sendEnterAttribute in interface NGCCEventSourceSAXExceptionpublic void sendEnterElement(int threadId,
                             String uri,
                             String local,
                             String qname,
                             Attributes atts)
                      throws SAXException
NGCCEventSourcesendEnterElement in interface NGCCEventSourceSAXExceptionpublic void sendLeaveAttribute(int threadId,
                               String uri,
                               String local,
                               String qname)
                        throws SAXException
sendLeaveAttribute in interface NGCCEventSourceSAXExceptionpublic void sendLeaveElement(int threadId,
                             String uri,
                             String local,
                             String qname)
                      throws SAXException
sendLeaveElement in interface NGCCEventSourceSAXExceptionpublic void sendText(int threadId,
                     String value)
              throws SAXException
sendText in interface NGCCEventSourceSAXExceptionpublic void redirectSubtree(ContentHandler child, String uri, String local, String qname) throws SAXException
Currently active NGCCHandler will only receive the leaveElement event of the newly started element.
uri,local,qname - Parameters passed to the enter element event. Used to
      simulate the startElement event for the new ContentHandler.SAXExceptionprotected void unexpectedX(String token) throws SAXException
SAXExceptionpublic void trace(String s)
public void traceln(String s)
Copyright © 2017 JBoss by Red Hat. All rights reserved.