Class AbstractReadHandlerFactory<T extends XmlReadHandler>
java.lang.Object
org.pentaho.reporting.libraries.xmlns.parser.AbstractReadHandlerFactory<T>
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures this factory from the given configuration using the specified prefix as filter.voidconfigureGlobal(org.pentaho.reporting.libraries.base.config.Configuration config, String prefix) getHandler(String namespace, String tagname) The returned handler can be null, in case no handler is registered.Returns the implementation class for this read-handler factory.voidsetDefaultNamespace(String defaultNamespace) voidsetElementHandler(String tagName, Class<? extends T> hasCData) Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.voidsetElementHandler(String namespaceUri, String tagName, Class<? extends T> hasCData) Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.voidsetNamespaceHandler(String namespaceUri, Class<? extends T> hasCData) Adds a configuration default for the given namespace to the tag-descriptions.
-
Constructor Details
-
AbstractReadHandlerFactory
protected AbstractReadHandlerFactory()A default-constructor.
-
-
Method Details
-
configureGlobal
public void configureGlobal(org.pentaho.reporting.libraries.base.config.Configuration config, String prefix) -
configure
public void configure(org.pentaho.reporting.libraries.base.config.Configuration conf, String prefix) Configures this factory from the given configuration using the specified prefix as filter.- Parameters:
conf- the configuration.prefix- the key-prefix.
-
setNamespaceHandler
Adds a configuration default for the given namespace to the tag-descriptions. If the namespace URI given here is null, this defines the global default for all namespaces.- Parameters:
namespaceUri- the namespace URI for which a default should be configured.hasCData- the default value.
-
setElementHandler
Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.- Parameters:
namespaceUri- the namespace URI for which a default should be configured.tagName- the tagname for which the entry should be added.hasCData- the default value.
-
setElementHandler
Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.- Parameters:
tagName- the tagname for which the entry should be added.hasCData- the default value.
-
setDefaultNamespace
-
getDefaultNamespace
-
getTargetClass
Returns the implementation class for this read-handler factory.- Returns:
- the implementation class.
-
getHandler
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.
-