com.jrefinery.report.io.simple
Class GroupFactory

java.lang.Object
  extended bycom.jrefinery.report.io.simple.AbstractReportDefinitionHandler
      extended bycom.jrefinery.report.io.simple.GroupFactory
All Implemented Interfaces:
org.jfree.xml.ElementDefinitionHandler, ReportDefinitionTags

public class GroupFactory
extends AbstractReportDefinitionHandler
implements ReportDefinitionTags

This class is a SAX handler for reading groups from a report template file.

Author:
Thomas Morgner

Field Summary
 
Fields inherited from interface com.jrefinery.report.io.simple.ReportDefinitionTags
ALIGNMENT_ATT, BOTTOMMARGIN_ATT, COLOR_ATT, CONFIGURATION_TAG, DATAREF_TAG, DATE_FIELD_TAG, DATE_FUNCTION_TAG, DEPENCY_LEVEL_ATT, DRAWABLE_FIELD_TAG, EXPRESSION_TAG, FIELD_TAG, FIELDNAME_ATT, FIELDS_TAG, FONT_NAME_ATT, FONT_SIZE_ATT, FONT_STYLE_ATT, FORMAT_ATT, FS_BOLD, FS_EMBEDDED, FS_ENCODING, FS_ITALIC, FS_STRIKETHR, FS_UNDERLINE, FUNCTION_TAG, FUNCTIONNAME_ATT, FUNCTIONS_TAG, GENERAL_FIELD_TAG, GENERAL_FUNCTION_TAG, GROUP_FOOTER_TAG, GROUP_HEADER_TAG, GROUP_TAG, GROUPS_TAG, HEIGHT_ATT, IMAGEFIELD_TAG, IMAGEFUNCTION_TAG, IMAGEREF_TAG, IMAGEURLFIELD_TAG, IMAGEURLFUNCTION_TAG, ITEMS_TAG, LABEL_TAG, LEFTMARGIN_ATT, LINE_TAG, LINEHEIGHT, MULTILINE_FIELD_TAG, MULTILINE_FUNCTION_TAG, NAME_ATT, NULLSTRING_ATT, NUMBER_FIELD_TAG, NUMBER_FUNCTION_TAG, ORIENTATION_ATT, ORIENTATION_LANDSCAPE_VAL, ORIENTATION_PORTRAIT_VAL, ORIENTATION_REVERSE_LANDSCAPE_VAL, PAGE_FOOTER_TAG, PAGE_HEADER_TAG, PAGEFORMAT_ATT, PROPERTIES_TAG, PROPERTY_ENCODING_ATT, PROPERTY_ENCODING_TEXT, PROPERTY_REFERENCE_TAG, PROPERTY_TAG, RECTANGLE_TAG, REPEAT_HEADER, REPORT_FOOTER_TAG, REPORT_HEADER_TAG, REPORT_TAG, RESOURCEBASE_ATTR, RESOURCEFIELD_TAG, RESOURCELABEL_TAG, RIGHTMARGIN_ATT, SHAPE_FIELD_TAG, STRING_FIELD_TAG, STRING_FUNCTION_TAG, TOPMARGIN_ATT, VALIGNMENT_ATT, WIDTH_ATT
 
Constructor Summary
GroupFactory(org.jfree.xml.Parser parser, java.lang.String finishTag)
          Creates a new handler.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receives some (or all) of the text in the current element.
 void endElement(java.lang.String qName)
          Ends an element.
protected  void endField()
          Ends the field element.
protected  void endFields()
          Ends the fields element.
protected  void endGroup()
          Ends the group element.
protected  void endGroupFooter()
          Ends the group footer element.
protected  void endGroupHeader()
          Ends the group header element.
protected  void endGroups()
          Ends the groups element.
 void setCurrentGroup(Group currentGroup)
          Sets the current group.
 void startElement(java.lang.String qName, org.xml.sax.Attributes atts)
          Starts an element.
protected  void startField(org.xml.sax.Attributes atts)
          Starts the field element.
protected  void startFields(org.xml.sax.Attributes atts)
          Starts the fields element.
protected  void startGroup(org.xml.sax.Attributes atts)
          Starts the group element.
protected  void startGroupFooter(org.xml.sax.Attributes atts)
          Starts the group footer element.
protected  void startGroupHeader(org.xml.sax.Attributes atts)
          Starts the group header element.
 
Methods inherited from class com.jrefinery.report.io.simple.AbstractReportDefinitionHandler
getContentBase, getFinishTag, getLocator, getNameGenerator, getParser, getReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupFactory

public GroupFactory(org.jfree.xml.Parser parser,
                    java.lang.String finishTag)
Creates a new handler.

Parameters:
parser - the used parser to coordinate the parsing process.
finishTag - the finish tag, that should trigger the deactivation of this parser.
Throws:
java.lang.NullPointerException - if the finishTag or the parser are null.
Method Detail

startElement

public void startElement(java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Starts an element.

Specified by:
startElement in interface org.jfree.xml.ElementDefinitionHandler
Parameters:
qName - the element name.
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the XML.

startFields

protected void startFields(org.xml.sax.Attributes atts)
                    throws org.xml.sax.SAXException
Starts the fields element.

Parameters:
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

startField

protected void startField(org.xml.sax.Attributes atts)
                   throws org.xml.sax.SAXException
Starts the field element.

Parameters:
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

startGroup

protected void startGroup(org.xml.sax.Attributes atts)
                   throws org.xml.sax.SAXException
Starts the group element.

Parameters:
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

startGroupHeader

protected void startGroupHeader(org.xml.sax.Attributes atts)
                         throws org.xml.sax.SAXException
Starts the group header element.

Parameters:
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

startGroupFooter

protected void startGroupFooter(org.xml.sax.Attributes atts)
                         throws org.xml.sax.SAXException
Starts the group footer element.

Parameters:
atts - the element attributes.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

characters

public void characters(char[] ch,
                       int start,
                       int length)
Receives some (or all) of the text in the current element.

Specified by:
characters in interface org.jfree.xml.ElementDefinitionHandler
Overrides:
characters in class AbstractReportDefinitionHandler
Parameters:
ch - storage space for the characters.
start - the first valid character in the array.
length - the length of the valid data in the array.

endElement

public void endElement(java.lang.String qName)
                throws org.xml.sax.SAXException
Ends an element.

Specified by:
endElement in interface org.jfree.xml.ElementDefinitionHandler
Parameters:
qName - the element name.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the XML.

endGroups

protected void endGroups()
                  throws org.xml.sax.SAXException
Ends the groups element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

endGroup

protected void endGroup()
                 throws org.xml.sax.SAXException
Ends the group element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

endField

protected void endField()
                 throws org.xml.sax.SAXException
Ends the field element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

endFields

protected void endFields()
                  throws org.xml.sax.SAXException
Ends the fields element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

endGroupFooter

protected void endGroupFooter()
                       throws org.xml.sax.SAXException
Ends the group footer element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

endGroupHeader

protected void endGroupHeader()
                       throws org.xml.sax.SAXException
Ends the group header element.

Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.

setCurrentGroup

public void setCurrentGroup(Group currentGroup)
                     throws org.xml.sax.SAXException
Sets the current group.

Parameters:
currentGroup - the current group.
Throws:
org.xml.sax.SAXException - if there is a problem parsing the report template.