Class MultiplexRootElementHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.pentaho.reporting.libraries.xmlns.parser.RootXmlReadHandler
-
- org.pentaho.reporting.libraries.xmlns.parser.MultiplexRootElementHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
public class MultiplexRootElementHandler extends RootXmlReadHandler
A root-handler that intercepts the first call to startElement to select a XmlReadHandler based on the XmlDocumentInfo provided by the parser.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description MultiplexRootElementHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey source, org.pentaho.reporting.libraries.resourceloader.ResourceKey context, long version, XmlFactoryModule[] rootHandlers)Creates a new MultiplexRootElementHandler for the given root handler selection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.EntityResolvergetEntityResolver()Returns the entity resolver used in this handler.ParserEntityResolvergetParserEntityResolver()Returns the parent entity resolver used in the element handler.XmlFactoryModulegetSelectedRootHandler()booleanisXmlnsUrisNotAvailable()Returns, whether the parser resolves namespace-URIs.voidsetXmlnsUrisNotAvailable(boolean xmlnsUrisNotAvailable)Sets a hint that the parser will not be able to return URIs for XML-Namespaces.-
Methods inherited from class org.pentaho.reporting.libraries.xmlns.parser.RootXmlReadHandler
characters, delegate, endElement, getCommentHandler, getContext, getDependencyCollector, getDocumentLocator, getHelperObject, getHelperObjectNames, getParserConfiguration, getResourceManager, getResult, getSource, isFirstCall, recurse, setDocumentLocator, setHelperObject, startDocument, startElement, unwind
-
-
-
-
Constructor Detail
-
MultiplexRootElementHandler
public MultiplexRootElementHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey source, org.pentaho.reporting.libraries.resourceloader.ResourceKey context, long version, XmlFactoryModule[] rootHandlers)Creates a new MultiplexRootElementHandler for the given root handler selection.- Parameters:
manager- the resource manager that loaded this xml-file.source- the source-key that idenfies from where the file was loaded.context- the key that should be used to resolve relative paths.version- the versioning information for the root-file.rootHandlers- the roothandlers, never null.
-
-
Method Detail
-
isXmlnsUrisNotAvailable
public boolean isXmlnsUrisNotAvailable()
Returns, whether the parser resolves namespace-URIs.- Returns:
- true, if the parser will *NOT* resolve namespaces, false otherwise.
-
setXmlnsUrisNotAvailable
public void setXmlnsUrisNotAvailable(boolean xmlnsUrisNotAvailable)
Sets a hint that the parser will not be able to return URIs for XML-Namespaces. You should not see this nowadays, as all the common JAXP-parser implementations seem to work fine with namespaces.- Parameters:
xmlnsUrisNotAvailable- a flag indicating that the XML parser has troubles resolving namespaces.
-
getEntityResolver
public org.xml.sax.EntityResolver getEntityResolver()
Returns the entity resolver used in this handler.- Returns:
- the entity resolver.
-
getParserEntityResolver
public ParserEntityResolver getParserEntityResolver()
Returns the parent entity resolver used in the element handler. This returns the modifiable entity-resolver backend.- Returns:
- the entity resolver.
-
getSelectedRootHandler
public XmlFactoryModule getSelectedRootHandler()
-
-