|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.betwixt.io.AbstractBeanWriter
org.apache.commons.betwixt.io.SAXBeanWriter
The SAXBeanwriter will send events to a ContentHandler
| Field Summary | |
private AttributesImpl |
attributes
Current element's attributes. |
private ContentHandler |
contentHandler
Where the output goes |
private Stack |
elementStack
Place holder for elements that are started. |
private boolean |
elementWaiting
Is there a element currently waiting to be written out? |
private Log |
log
Log used for logging (Doh!) |
| Fields inherited from class org.apache.commons.betwixt.io.AbstractBeanWriter |
|
| Constructor Summary | |
SAXBeanWriter(ContentHandler contentHandler)
Constructor sets writer used for output. |
|
| Method Summary | |
void |
end()
This method will announce the end of the document to the contenthandler. |
protected void |
expressAttribute(String qualifiedName,
String value)
Express an attribute |
protected void |
expressBodyText(String text)
Express body text |
protected void |
expressElementEnd()
Express an empty element end |
protected void |
expressElementEnd(String qualifiedName)
Express an element end tag |
protected void |
expressElementStart(String qualifiedName)
Express an element tag start using given qualified name |
protected void |
expressTagClose()
Element end |
Log |
getLog()
Set the log implementation used. |
private void |
sendElementStart()
Send the start element event to the ContentHandler |
void |
setLog(Log log)
Set the log implementation used. |
void |
start()
This will announce the start of the document to the contenthandler. |
| Methods inherited from class org.apache.commons.betwixt.io.AbstractBeanWriter |
getAbstractBeanWriterLog, getIdGenerator, getIndentLevel, getWriteIDs, getXMLIntrospector, popBean, pushBean, setAbstractBeanWriterLog, setIdGenerator, setWriteIDs, setXMLIntrospector, write, write, write, write, writeAttribute, writeAttributes, writeContent, writeIDREFElement, writeIndent, writePrintln, writeRestOfElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private ContentHandler contentHandler
private Log log
private Stack elementStack
private AttributesImpl attributes
private boolean elementWaiting
| Constructor Detail |
public SAXBeanWriter(ContentHandler contentHandler)
Constructor sets writer used for output.
contentHandler - feed events to this content handler| Method Detail |
public Log getLog()
Set the log implementation used.
Log implementation that this class logs topublic void setLog(Log log)
Set the log implementation used.
log - Log implementation to use
protected void expressElementStart(String qualifiedName)
throws SAXException
expressElementStart in class AbstractBeanWriterqualifiedName - the fully qualified element name
SAXException - if the ContentHandler has a problemprotected void expressTagClose()
expressTagClose in class AbstractBeanWriter
protected void expressElementEnd(String qualifiedName)
throws SAXException
expressElementEnd in class AbstractBeanWriterqualifiedName - the fully qualified name of the element
SAXException - if the ContentHandler has a problem
protected void expressElementEnd()
throws SAXException
expressElementEnd in class AbstractBeanWriterSAXException - if the ContentHandler has a problem
protected void expressBodyText(String text)
throws SAXException
expressBodyText in class AbstractBeanWritertext - the element body text
SAXException - if the ContentHandler has a problem
protected void expressAttribute(String qualifiedName,
String value)
throws SAXException
expressAttribute in class AbstractBeanWriterqualifiedName - the fully qualified attribute namevalue - the attribute value
SAXException - if the ContentHandler has a problem
private void sendElementStart()
throws SAXException
ContentHandler
SAXException - if the ContentHandler has a problem
public void start()
throws SAXException
start in class AbstractBeanWriterSAXException - if an SAX problem occurs during writingAbstractBeanWriter.end()
public void end()
throws SAXException
end in class AbstractBeanWriterSAXException - if an SAX problem occurs during writingAbstractBeanWriter.start()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||