public abstract class XMLSaxToJUnitHandler extends XMLSaxAbstractHandler
Modifier and Type | Field and Description |
---|---|
protected Orderable |
orderable
It contains the Orderable object parsed from the LogMessage of type
MessageTypeInfo.ORDERABLE_XML_PREFIX . |
protected StatusReport |
statusReport
The current status report for a certain 'test level'.
It will be reset to null at the begin of a certain 'test level'. It could be null if a 'test level' doesn't contain a 'status report'. |
protected java.util.Stack<Tag> |
tagStack
The stack contains the tag currently being processed.
The tag will be pushed into the stack at the end of startElement(String, String, String, Attributes) , and it
will be popped out at the begin of endElement(String, String, String) .The pushed/popped Tag can very probable be null if we don't map a XML tag into Java class. |
protected java.util.List<TestLevel> |
testLevelList
It will contains the whole JUnit report generated from the SAFS XML Log.
It will be used in method XMLSaxAbstractHandler.getResult() of the sub class. |
protected java.lang.StringBuilder |
value
It will contain the string value of each Element.
|
Constructor and Description |
---|
XMLSaxToJUnitHandler() |
XMLSaxToJUnitHandler(java.lang.String counterUnit) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName) |
void |
startDocument() |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes) |
getResult
protected java.lang.StringBuilder value
protected java.util.Stack<Tag> tagStack
startElement(String, String, String, Attributes)
, and it
will be popped out at the begin of endElement(String, String, String)
.protected StatusReport statusReport
protected java.util.List<TestLevel> testLevelList
XMLSaxAbstractHandler.getResult()
of the sub class.protected Orderable orderable
MessageTypeInfo.ORDERABLE_XML_PREFIX
.endElement(String, String, String)
public XMLSaxToJUnitHandler()
public XMLSaxToJUnitHandler(java.lang.String counterUnit)
counterUnit
- String, the counter unit. It can be one of Constants.VALID_COUTNER_UNITS
.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 uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) 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 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 endElement(java.lang.String uri, 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
Copyright © SAS Institute. All Rights Reserved.