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 ContentHandler
public 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)
NGCCEventSource
replace
in interface NGCCEventSource
public void processList(String str) throws SAXException
SAXException
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public 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.
SAXException
public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException
SAXException
public void endElement(String uri, String localname, String qname) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void consumeAttribute(int index) throws SAXException
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startDocument()
startDocument
in interface ContentHandler
public void sendEnterAttribute(int threadId, String uri, String local, String qname) throws SAXException
sendEnterAttribute
in interface NGCCEventSource
SAXException
public void sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts) throws SAXException
NGCCEventSource
sendEnterElement
in interface NGCCEventSource
SAXException
public void sendLeaveAttribute(int threadId, String uri, String local, String qname) throws SAXException
sendLeaveAttribute
in interface NGCCEventSource
SAXException
public void sendLeaveElement(int threadId, String uri, String local, String qname) throws SAXException
sendLeaveElement
in interface NGCCEventSource
SAXException
public void sendText(int threadId, String value) throws SAXException
sendText
in interface NGCCEventSource
SAXException
public 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.SAXException
protected void unexpectedX(String token) throws SAXException
SAXException
public void trace(String s)
public void traceln(String s)
Copyright © 2019 JBoss by Red Hat. All rights reserved.