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 protectedAbstractXmlFactoryModule(String namespace, String rootElementName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultNamespace(XmlDocumentInfo documentInfo)Returns the default namespace for a document with the characteristics given in the XmlDocumentInfo.intgetDocumentSupport(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:
getDocumentSupportin 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:
getDefaultNamespacein interfaceXmlFactoryModule- Parameters:
documentInfo- the document information.- Returns:
- the default namespace uri for the document.
-
-