Package net.sf.jasperreports.engine.xml
Class JRXmlBaseWriter
java.lang.Object
net.sf.jasperreports.engine.xml.JRXmlBaseWriter
- Direct Known Subclasses:
JRXmlTemplateWriter,JRXmlWriter
Base XML writer.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty that specifies the JasperReports version associated with this report.protected Stringprotected VersionComparatorprotected JRXmlWriteHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisNewerVersionOrEqual(String oldVersion) protected booleanisOlderVersionThan(String version) protected abstract booleanDecides whether conditional styles are to be written.protected voiduseWriter(JRXmlWriteHelper writer, String version) Sets the XML write helper.voidvoidwriteBox(JRLineBox box, XmlNamespace namespace) protected voidWrites a conditional style.protected voidwriteExpression(String name, JRExpression expression, boolean writeClass) voidwriteParagraph(JRParagraph paragraph) voidwriteParagraph(JRParagraph paragraph, XmlNamespace namespace) protected voidprotected voidwriteStyle(JRStyle style) Writes a style.voidwriteStyleReferenceAttr(JRStyleContainer styleContainer) voidwriteTabStop(TabStop tabStop)
-
Field Details
-
PROPERTY_REPORT_VERSION
Property that specifies the JasperReports version associated with this report. Report elements/attributes newer than this version are neglected by the JRXML writers when a report template is generated. If not set, all elements/attributes will be printed out.- See Also:
-
writer
-
version
-
versionComparator
-
-
Constructor Details
-
JRXmlBaseWriter
public JRXmlBaseWriter()
-
-
Method Details
-
useWriter
Sets the XML write helper.- Parameters:
writer- the XML write helper
-
writeStyle
Writes a style.- Parameters:
style- the style to write.- Throws:
IOException
-
writeStyleReferenceAttr
-
toWriteConditionalStyles
protected abstract boolean toWriteConditionalStyles()Decides whether conditional styles are to be written.- Returns:
- whether conditional styles are to be written
-
writeConditionalStyle
Writes a conditional style.- Parameters:
style- the conditional style- Throws:
IOException
-
writePen
- Throws:
IOException
-
writeBox
- Throws:
IOException
-
writeBox
- Throws:
IOException
-
writeParagraph
- Throws:
IOException
-
writeParagraph
- Throws:
IOException
-
writeTabStop
- Throws:
IOException
-
isNewerVersionOrEqual
-
isOlderVersionThan
-
writeExpression
protected void writeExpression(String name, JRExpression expression, boolean writeClass) throws IOException - Throws:
IOException
-