Class AbstractXmlFactoryModule
java.lang.Object
org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlFactoryModule
- All Implemented Interfaces:
XmlFactoryModule
A common base class for all XmlFactoryModules. Almost all XmlFactoryModules follow the same pattern and this class
provides a sensible default implementation for a module checking for a well-known namespace and root-element.
- Author:
- Thomas Morgner.
-
Field Summary
Fields inherited from interface org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule
NOT_RECOGNIZED, RECOGNIZED_BY_DTD, RECOGNIZED_BY_NAMESPACE, RECOGNIZED_BY_TAGNAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractXmlFactoryModule
(String namespace, String rootElementName) -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultNamespace
(XmlDocumentInfo documentInfo) Returns the default namespace for a document with the characteristics given in the XmlDocumentInfo.int
getDocumentSupport
(XmlDocumentInfo documentInfo) Checks the given document data to compute the propability of whether this factory module would be able to handle the given data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule
createReadHandler
-
Constructor Details
-
AbstractXmlFactoryModule
-
-
Method Details
-
getDocumentSupport
Checks the given document data to compute the propability of whether this factory module would be able to handle the given data.- Specified by:
getDocumentSupport
in interfaceXmlFactoryModule
- Parameters:
documentInfo
- the document information collection.- Returns:
- an integer value indicating how good the document matches the factories requirements.
-
getDefaultNamespace
Returns the default namespace for a document with the characteristics given in the XmlDocumentInfo.- Specified by:
getDefaultNamespace
in interfaceXmlFactoryModule
- Parameters:
documentInfo
- the document information.- Returns:
- the default namespace uri for the document.
-