org.jfree.report.modules.parser.ext
Class DataSourceHandler

java.lang.Object
  extended byorg.jfree.report.modules.parser.ext.AbstractExtReportParserHandler
      extended byorg.jfree.report.modules.parser.ext.BasicObjectHandler
          extended byorg.jfree.report.modules.parser.ext.CompoundObjectHandler
              extended byorg.jfree.report.modules.parser.ext.DataSourceHandler
All Implemented Interfaces:
org.jfree.xml.ElementDefinitionHandler

public class DataSourceHandler
extends CompoundObjectHandler

A datasource handler. Handles the creation of a DataSource or DataFilter. This allows a fine grained element content processing. Templates can be used to create predefined DataSource compositions.

Author:
Thomas Morgner.
See Also:
DataSource, DataFilter, TemplateHandler

Field Summary
static java.lang.String DATASOURCE_TAG
          The datasource tag name.
 
Fields inherited from class org.jfree.report.modules.parser.ext.CompoundObjectHandler
BASIC_OBJECT_TAG, COMPOUND_OBJECT_TAG
 
Constructor Summary
DataSourceHandler(ReportParser parser, java.lang.String finishTag, java.lang.String type, CommentHintPath commentKey)
          Creates a new handler.
 
Method Summary
 void endElement(java.lang.String tagName)
          Callback to indicate that an XML element end tag has been read by the parser.
 void startElement(java.lang.String tagName, org.xml.sax.Attributes attrs)
          Callback to indicate that an XML element start tag has been read by the parser.
 
Methods inherited from class org.jfree.report.modules.parser.ext.CompoundObjectHandler
characters
 
Methods inherited from class org.jfree.report.modules.parser.ext.BasicObjectHandler
createCommentKey, getCommentKey, getTargetObjectDescription, getValue
 
Methods inherited from class org.jfree.report.modules.parser.ext.AbstractExtReportParserHandler
addComment, getFinishTag, getParser, getParserHints, getReport, getReportParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATASOURCE_TAG

public static final java.lang.String DATASOURCE_TAG
The datasource tag name.

See Also:
Constant Field Values
Constructor Detail

DataSourceHandler

public DataSourceHandler(ReportParser parser,
                         java.lang.String finishTag,
                         java.lang.String type,
                         CommentHintPath commentKey)
                  throws org.xml.sax.SAXException
Creates a new handler.

Parameters:
parser - the parser.
finishTag - the finish tag.
type - the datasource type.
commentKey - the path on where to search for ext-parser comments in the report builder hints.
Throws:
org.xml.sax.SAXException - if a parser error occurs or the validation failed.
Method Detail

startElement

public void startElement(java.lang.String tagName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Callback to indicate that an XML element start tag has been read by the parser.

Specified by:
startElement in interface org.jfree.xml.ElementDefinitionHandler
Overrides:
startElement in class CompoundObjectHandler
Parameters:
tagName - the tag name.
attrs - the attributes.
Throws:
org.xml.sax.SAXException - if a parser error occurs or the validation failed.

endElement

public void endElement(java.lang.String tagName)
                throws org.xml.sax.SAXException
Callback to indicate that an XML element end tag has been read by the parser.

Specified by:
endElement in interface org.jfree.xml.ElementDefinitionHandler
Overrides:
endElement in class CompoundObjectHandler
Parameters:
tagName - the tag name.
Throws:
org.xml.sax.SAXException - if a parser error occurs or the validation failed.