public abstract class AbstractReadHandlerFactory<T extends XmlReadHandler> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractReadHandlerFactory()
A default-constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration conf,
String prefix)
Configures this factory from the given configuration using the specified prefix as filter.
|
void |
configureGlobal(Configuration config,
String prefix) |
String |
getDefaultNamespace() |
T |
getHandler(String namespace,
String tagname)
The returned handler can be null, in case no handler is registered.
|
protected abstract Class<T> |
getTargetClass()
Returns the implementation class for this read-handler factory.
|
void |
setDefaultNamespace(String defaultNamespace) |
void |
setElementHandler(String tagName,
Class<? extends T> hasCData)
Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.
|
void |
setElementHandler(String namespaceUri,
String tagName,
Class<? extends T> hasCData)
Adds a configuration entry for the given namespace and tag-name to the tag-descriptions.
|
void |
setNamespaceHandler(String namespaceUri,
Class<? extends T> hasCData)
Adds a configuration default for the given namespace to the tag-descriptions.
|
protected AbstractReadHandlerFactory()
public void configureGlobal(Configuration config, String prefix)
public void configure(Configuration conf, String prefix)
conf
- the configuration.prefix
- the key-prefix.public void setNamespaceHandler(String namespaceUri, Class<? extends T> hasCData)
namespaceUri
- the namespace URI for which a default should be configured.hasCData
- the default value.public void setElementHandler(String namespaceUri, String tagName, Class<? extends T> hasCData)
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.public void setElementHandler(String tagName, Class<? extends T> hasCData)
tagName
- the tagname for which the entry should be added.hasCData
- the default value.public void setDefaultNamespace(String defaultNamespace)
public String getDefaultNamespace()
protected abstract Class<T> getTargetClass()
public T getHandler(String namespace, String tagname)
namespace
- the namespace of the xml-tag for which a handler should be returned.tagname
- the tagname of the xml-tag.Copyright © 2019 Hitachi Vantara. All rights reserved.