Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org.jfree.report.modules.parser » simple » [javadoc | source]
org.jfree.report.modules.parser.simple
public class: ElementFactory [javadoc | source]
java.lang.Object
   org.jfree.report.modules.parser.simple.AbstractReportDefinitionHandler
      org.jfree.report.modules.parser.simple.ElementFactory

All Implemented Interfaces:
    ReportDefinitionTags, org.jfree.xml.ElementDefinitionHandler

The ElementFactory is responsible for creating ReportElements and is called by the ReportDefinitionContentHandler. For details on the format of the parser have a look at the DTD supplied in the distribution or on http://jfreereport.sourceforge.net/

This factory uses the deprecated element classes. These classes will get not extension for new features and as soon as the discrepancy between implemented and possible features gets too huge, this parser will be discontinued.

Field Summary
public static final  String DYNAMIC_ATT    A constant defining the name of the dynamic attribute. 
public static final  String RESERVED_LITERAL_ATT    A constant defining the name of the reserved-literal attribute. 
public static final  String TRIM_TEXT_CONTENT_ATT    A constant defining the name of the trim-text-content attribute. 
Constructor:
 public ElementFactory(ReportParser parser,
    String finishTag,
    Band band) 
    Creates a new ElementFactory. The factory queries the current Band of the ReportFactory and will add created element to this band. If unknown end-Tags are encountered, the parsing for elements will stop and the previous handler will be activated.
    Parameters:
    parser - the used parser to coordinate the parsing process.
    finishTag - the finish tag, that should trigger the deactivation of this parser.
    band - the band that should be defined.
    Throws:
    NullPointerException - if the finishTag or the parser are null.
Method from org.jfree.report.modules.parser.simple.ElementFactory Summary:
characters,   endElement,   getCurrentBand,   getCurrentText,   startElement
Methods from org.jfree.report.modules.parser.simple.AbstractReportDefinitionHandler:
characters,   getContentBase,   getFinishTag,   getLocator,   getNameGenerator,   getParser,   getReport,   getReportParser,   init
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.modules.parser.simple.ElementFactory Detail:
 public  void characters(char[] ch,
    int start,
    int length) 
    Receives some (or all) of the text in the current element.
 public  void endElement(String qName) throws SAXException 
    SAX handler function that is forwarded from the ReportDefinitionContentHandler. If an unknown element is encountered, the previous handler gets activated.
 protected Band getCurrentBand() 
    Returns the current band, which receives the parsed elements.
 protected String getCurrentText() 
    Returns the current text of the textbuffer.
 public  void startElement(String qName,
    Attributes atts) throws SAXException 
    SAX-Handler function that is forwarded from the ReportDefinitionContentHandler. StartTag-occurences of element definitions get handled by this factory. If an unknown element is encountered, a SAXException is thrown.

    The elements parsed in this factory denote base usecases. Element creation is delegated to the element factories in the package org.jfree.repor.elementfactory