public class TStreamRootElementHandler
extends org.xml.sax.helpers.DefaultHandler
Constructor and Description |
---|
TStreamRootElementHandler()
Initialzes the handler.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character content for a specific element.
|
void |
endDocument()
Receive notification for the end of the document.
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Receive notification of the ending of an element.
|
java.lang.String |
getDocname()
Gets the ino:docname from the underlying root element.
|
java.lang.String |
getId()
Gets the ino:id from the underlying root element.
|
java.lang.String |
getRootElementAsString()
Gets the root element given by the previous event handling as a String.
|
static java.lang.Exception |
getRootElementEndedException()
Gets the static TSAXRootElementEnded exception instances which this handler always
throws to its associated parser once the processing of the root element ended.
|
java.lang.String |
getTagName()
Gets the name of the root element.
|
boolean |
hasRootElement()
Indicates if currently a root element is given defined by the event handling of the previous parsing.
|
void |
setDocname(java.lang.String docname)
Sets the ino:docname on the for the underlying root element.
|
void |
setId(java.lang.String id)
Sets the ino:id for the underlying root element.
|
void |
startDocument()
Receive notification for the start of a document.
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Receive notification of the beginning of an element.
|
void |
writeRootElementTo(java.io.Writer writer)
Writes the internal root element given by the previous event handling to the given
character output stream.
|
public TStreamRootElementHandler()
public static java.lang.Exception getRootElementEndedException()
public void setDocname(java.lang.String docname)
docname
- is the ino:docname attribute of the data object.public void setId(java.lang.String id)
id
- denotes the ino:id that has to be set on the underlying element.public java.lang.String getDocname()
public java.lang.String getId()
public java.lang.String getTagName()
public boolean hasRootElement()
public void writeRootElementTo(java.io.Writer writer) throws java.io.IOException
writer
- is the character output stream to which to root element is written.java.io.IOException
public java.lang.String getRootElementAsString()
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
Copyright (c) 2016 Software AG. All Rights Reserved.