net.sf.jasperreports.engine.xml

## Class JRXmlBaseWriter

- java.lang.Object
- - net.sf.jasperreports.engine.xml.JRXmlBaseWriter

- Direct Known Subclasses:
    JRXmlTemplateWriter, JRXmlWriter

      public abstract class JRXmlBaseWriter
      extends java.lang.Object

  Base XML writer.
  Version:
    $Id: JRXmlBaseWriter.java 6935 2014-02-27 14:09:53Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROPERTY_REPORT_VERSION` Property that specifies the JasperReports version associated with this report.
    `protected java.lang.String` | `version`
    `protected VersionComparator` | `versionComparator`
    `protected JRXmlWriteHelper` | `writer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRXmlBaseWriter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `isNewerVersionOrEqual(java.lang.String oldVersion)`
    `protected boolean` | `isOlderVersionThan(java.lang.String version)`
    `protected abstract boolean` | `toWriteConditionalStyles()` Decides whether conditional styles are to be written.
    `protected void` | `useWriter(JRXmlWriteHelper writer, java.lang.String version)` Sets the XML write helper.
    `void` | `writeBox(JRLineBox box)`
    `void` | `writeBox(JRLineBox box, XmlNamespace namespace)`
    `protected void` | `writeConditionalStyle(JRConditionalStyle style)` Writes a conditional style.
    `protected void` | `writeExpression(java.lang.String name, JRExpression expression, boolean writeClass)`
    `void` | `writeParagraph(JRParagraph paragraph)`
    `void` | `writeParagraph(JRParagraph paragraph, XmlNamespace namespace)`
    `protected void` | `writePen(JRPen pen)`
    `protected void` | `writeStyle(JRStyle style)` Writes a style.
    `void` | `writeStyleReferenceAttr(JRStyleContainer styleContainer)`
    `void` | `writeTabStop(TabStop tabStop)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_REPORT_VERSION

          public static final java.lang.String 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:
        `JRXmlWriter`, Constant Field Values

    - #### writer

          protected JRXmlWriteHelper writer

    - #### version

          protected java.lang.String version

    - #### versionComparator

          protected VersionComparator versionComparator

  - ### Constructor Detail

    - #### JRXmlBaseWriter

          public JRXmlBaseWriter()

  - ### Method Detail

    - #### useWriter

          protected void useWriter(JRXmlWriteHelper writer,
                       java.lang.String version)

      Sets the XML write helper.
      Parameters:
        `writer` - the XML write helper

    - #### writeStyle

          protected void writeStyle(JRStyle style)
                             throws java.io.IOException

      Writes a style.
      Parameters:
        `style` - the style to write.
      Throws:
        `java.io.IOException`

    - #### writeStyleReferenceAttr

          public void writeStyleReferenceAttr(JRStyleContainer styleContainer)

    - #### toWriteConditionalStyles

          protected abstract boolean toWriteConditionalStyles()

      Decides whether conditional styles are to be written.
      Returns:
        whether conditional styles are to be written

    - #### writeConditionalStyle

          protected void writeConditionalStyle(JRConditionalStyle style)
                                        throws java.io.IOException

      Writes a conditional style.
      Parameters:
        `style` - the conditional style
      Throws:
        `java.io.IOException`

    - #### writePen

          protected void writePen(JRPen pen)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeBox

          public void writeBox(JRLineBox box)
                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeBox

          public void writeBox(JRLineBox box,
                      XmlNamespace namespace)
                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeParagraph

          public void writeParagraph(JRParagraph paragraph)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeParagraph

          public void writeParagraph(JRParagraph paragraph,
                            XmlNamespace namespace)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeTabStop

          public void writeTabStop(TabStop tabStop)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### isNewerVersionOrEqual

          protected boolean isNewerVersionOrEqual(java.lang.String oldVersion)

    - #### isOlderVersionThan

          protected boolean isOlderVersionThan(java.lang.String version)

    - #### writeExpression

          protected void writeExpression(java.lang.String name,
                             JRExpression expression,
                             boolean writeClass)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com