org.pentaho.reporting.libraries.xmlns.parser

Class AbstractReadHandlerFactory

public abstract class AbstractReadHandlerFactory extends Object

The AbstractReadHandlerFactory provides a base implementation for all read-handler factories. A read-handler factory decouples the tag-handlers of a SAX parser and allows to configure alternate parser configuations at runtime, resulting in a more flexible parsing process.

Author: Thomas Morgner

Constructor Summary
protected AbstractReadHandlerFactory()
A default-constructor.
Method Summary
voidconfigure(Configuration conf, String prefix)
Configures this factory from the given configuration using the speoified prefix as filter.
XmlReadHandlergetHandler(String namespace, String tagname)
The returned handler can be null, in case no handler is registered.
protected abstract ClassgetTargetClass()
Returns the implementation class for this read-handler factory.

Constructor Detail

AbstractReadHandlerFactory

protected AbstractReadHandlerFactory()
A default-constructor.

Method Detail

configure

public void configure(Configuration conf, String prefix)
Configures this factory from the given configuration using the speoified prefix as filter.

Parameters: conf the configuration. prefix the key-prefix.

UNKNOWN: ObjectAllocationInLoop as this method configures the factory.

getHandler

public XmlReadHandler getHandler(String namespace, String tagname)
The returned handler can be null, in case no handler is registered.

Parameters: namespace the namespace of the xml-tag for which a handler should be returned. tagname the tagname of the xml-tag.

Returns: the instantiated read handler, or null if there is no handler registered.

getTargetClass

protected abstract Class getTargetClass()
Returns the implementation class for this read-handler factory.

Returns: the implementation class.