public class RootXmlReadHandler extends DefaultHandler
Constructor and Description |
---|
RootXmlReadHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager,
org.pentaho.reporting.libraries.resourceloader.ResourceKey source,
long version)
Creates a new root-handler using the given versioning information and resource-manager.
|
RootXmlReadHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager,
org.pentaho.reporting.libraries.resourceloader.ResourceKey source,
org.pentaho.reporting.libraries.resourceloader.ResourceKey context,
long version)
Creates a new root-handler using the given versioning information and resource-manager.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Process character data.
|
void |
delegate(XmlReadHandler handler,
String uri,
String tagName,
Attributes attrs)
Delegate to another handler.
|
void |
endElement(String originalUri,
String localName,
String qName)
Finish processing an element.
|
CommentHandler |
getCommentHandler()
Returns the comment handler that is used to collect comments.
|
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getContext()
Returns the context key.
|
org.pentaho.reporting.libraries.resourceloader.DependencyCollector |
getDependencyCollector()
Returns the current dependency collector for this parse-operation.
|
Locator |
getDocumentLocator()
Returns the current documentLocator.
|
EntityResolver |
getEntityResolver() |
Object |
getHelperObject(String key)
Returns an object from the registry.
|
String[] |
getHelperObjectNames()
Returns the array of all currently registered helper-objects.
|
org.pentaho.reporting.libraries.base.config.DefaultConfiguration |
getParserConfiguration()
Returns the parser-configuration.
|
org.pentaho.reporting.libraries.resourceloader.ResourceManager |
getResourceManager()
Returns the resource-manager that is used to load external resources.
|
Object |
getResult()
Tries to return the parse-result of the selected root-handler.
|
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getSource()
Returns the source key.
|
boolean |
isFirstCall()
Checks, whether this is the first call to the handler.
|
boolean |
isXmlnsUrisNotAvailable()
Returns, whether the parser resolves namespace-URIs.
|
void |
recurse(XmlReadHandler handler,
String uri,
String tagName,
Attributes attrs)
Start a new handler stack and delegate to another handler.
|
void |
setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events.
|
void |
setHelperObject(String key,
Object value)
Adds an object to the registry.
|
void |
setXmlnsUrisNotAvailable(boolean xmlnsUrisNotAvailable)
Sets a hint that the parser will not be able to return URIs for XML-Namespaces.
|
void |
startDocument()
Starts processing a document.
|
void |
startElement(String originalUri,
String localName,
String qName,
Attributes attributes)
Starts processing an element.
|
void |
unwind(String uri,
String tagName)
Hand control back to the previous handler.
|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
public RootXmlReadHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey source, long version)
manager
- the resource manager that loaded this xml-file.source
- the source-key that identifies from where the file was loaded.version
- the versioning information for the root-file.public RootXmlReadHandler(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey source, org.pentaho.reporting.libraries.resourceloader.ResourceKey context, long version)
manager
- the resource manager that loaded this xml-file.source
- the source-key that identifies 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.public org.pentaho.reporting.libraries.resourceloader.ResourceKey getContext()
public org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
public boolean isFirstCall()
public org.pentaho.reporting.libraries.resourceloader.ResourceKey getSource()
public org.pentaho.reporting.libraries.resourceloader.DependencyCollector getDependencyCollector()
public CommentHandler getCommentHandler()
public org.pentaho.reporting.libraries.base.config.DefaultConfiguration getParserConfiguration()
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
locator
- the documentLocator.public Locator getDocumentLocator()
public void setHelperObject(String key, Object value)
key
- the key.value
- the object.public Object getHelperObject(String key)
key
- the key.public String[] getHelperObjectNames()
public void recurse(XmlReadHandler handler, String uri, String tagName, Attributes attrs) throws SAXException
handler
- the handler.uri
- the namespace uri of the current tag.tagName
- the tag name.attrs
- the attributes.SAXException
- if there is a problem with the parser.public void delegate(XmlReadHandler handler, String uri, String tagName, Attributes attrs) throws SAXException
handler
- the new handler.tagName
- the tag name.uri
- the namespace uri of the current tag.attrs
- the attributes.SAXException
- if there is a problem with the parser.public void unwind(String uri, String tagName) throws SAXException
tagName
- the tagname.uri
- the namespace uri of the current tag.SAXException
- if there is a problem with the parser.public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
- not in this implementation.public final void startElement(String originalUri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
originalUri
- the URI.localName
- the local name.qName
- the qName.attributes
- the attributes.SAXException
- if there is a parsing problem.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- the character buffer.start
- the start index.length
- the length of the character data.SAXException
- if there is a parsing error.public final void endElement(String originalUri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
originalUri
- the URI.localName
- the local name.qName
- the qName.SAXException
- if there is a parsing error.public Object getResult() throws SAXException
SAXException
- if an error occurs.public EntityResolver getEntityResolver()
public boolean isXmlnsUrisNotAvailable()
public void setXmlnsUrisNotAvailable(boolean xmlnsUrisNotAvailable)
xmlnsUrisNotAvailable
- a flag indicating that the XML parser has troubles resolving namespaces.