|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.softwareag.tamino.db.api.objectModel.stream.TStreamRootElementHandler
public class TStreamRootElementHandler
TStreamRootElementHandler is a DefaultHandler that simply handles all events until the startElement event for the root element has been processed. It analyzes the entire content of the root element and keeps it accessible. After processing the root elements start tag event a TSAXRootElementEnded exception is thrown so that the associated SAX parser is stopped in a controlled way. However an ino:id and ino:docname attribute can be set on the underlying root element tag.
Constructor Summary | |
---|---|
TStreamRootElementHandler()
Initialzes the handler. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TStreamRootElementHandler()
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |