jdbreport.model.io.xml
Class ReportBookParser
java.lang.Object
and.util.xml.AbstractXMLParser
jdbreport.model.io.xml.DefaultReportParser
jdbreport.model.io.xml.ReportBookWriterParser
jdbreport.model.io.xml.ReportBookParser
- All Implemented Interfaces:
- and.util.xml.XMLParser, ReportWriter, ResourceWriter
- Direct Known Subclasses:
- TemplateBookParser
public class ReportBookParser
- extends ReportBookWriterParser
- implements ReportWriter
- Version:
- 2.0 20.04.2010
- Author:
- Andrey Kholmanskih
Methods inherited from class and.util.xml.AbstractXMLParser |
characters, getHandler, popHandler, pushHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceReader
protected ResourceReader resourceReader
ReportBookParser
public ReportBookParser(ResourceWriter rw)
ReportBookParser
public ReportBookParser(JReportHandler reportHandler,
ResourceReader rr)
createReportWriter
public static ReportWriter createReportWriter(ResourceWriter rw)
startElement
public boolean startElement(String name,
Attributes attributes)
- Specified by:
startElement
in interface and.util.xml.XMLParser
- Overrides:
startElement
in class DefaultReportParser
createSheetHandler
protected and.util.xml.XMLParser createSheetHandler()
- Returns:
- handler for the parsing sheets
save
public void save(OutputStream out,
ReportBook reportBook)
throws SaveReportException
- Specified by:
save
in interface ReportWriter
- Throws:
SaveReportException
getRootName
protected String getRootName()
save
public void save(Writer writer,
ReportBook reportBook)
throws SaveReportException
- Specified by:
save
in interface ReportWriter
- Throws:
SaveReportException
writeSheets
protected void writeSheets(ReportBook reportBook,
PrintWriter writer)
throws SaveReportException
- Throws:
SaveReportException
getSheetName
protected String getSheetName()
- Specified by:
getSheetName
in class ReportBookWriterParser
writeStyles
protected void writeStyles(ReportBook reportBook,
PrintWriter fw)
createCellHandler
protected CellParser createCellHandler()
- Specified by:
createCellHandler
in class ReportBookWriterParser
save
public void save(File file,
ReportBook reportBook)
throws SaveReportException
- Specified by:
save
in interface ReportWriter
- Throws:
SaveReportException
getExtensions
public String[] getExtensions()
getDescription
public String getDescription()
write
public String write(String fileName,
Object resource)
throws SaveReportException
- Description copied from interface:
ResourceWriter
- Write of resources
- Specified by:
write
in interface ResourceWriter
- Returns:
- the filename
- Throws:
SaveReportException