Class AbstractXmlFactoryModule
- java.lang.Object
-
- org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlFactoryModule
-
- All Implemented Interfaces:
XmlFactoryModule
public abstract class AbstractXmlFactoryModule extends Object implements 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
Constructors Modifier Constructor Description protected
AbstractXmlFactoryModule(String namespace, String rootElementName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultNamespace(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
-
-
-
-
Method Detail
-
getDocumentSupport
public 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.- 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
public String getDefaultNamespace(XmlDocumentInfo documentInfo)
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.
-
-