public class RootXmlReadHandler
extends org.xml.sax.helpers.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,
java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes attrs)
Delegate to another handler.
|
void |
endElement(java.lang.String originalUri,
java.lang.String localName,
java.lang.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.
|
org.xml.sax.Locator |
getDocumentLocator()
Returns the current documentLocator.
|
java.lang.Object |
getHelperObject(java.lang.String key)
Returns an object from the registry.
|
java.lang.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.
|
java.lang.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.
|
void |
recurse(XmlReadHandler handler,
java.lang.String uri,
java.lang.String tagName,
org.xml.sax.Attributes attrs)
Start a new handler stack and delegate to another handler.
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
Receive an object for locating the origin of SAX document events.
|
void |
setHelperObject(java.lang.String key,
java.lang.Object value)
Adds an object to the registry.
|
void |
startDocument()
Starts processing a document.
|
void |
startElement(java.lang.String originalUri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Starts processing an element.
|
void |
unwind(java.lang.String uri,
java.lang.String tagName)
Hand control back to the previous handler.
|
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 idenfies 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 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.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(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerlocator - the documentLocator.public org.xml.sax.Locator getDocumentLocator()
public void setHelperObject(java.lang.String key,
java.lang.Object value)
key - the key.value - the object.public java.lang.Object getHelperObject(java.lang.String key)
key - the key.public java.lang.String[] getHelperObjectNames()
public void recurse(XmlReadHandler handler, java.lang.String uri, java.lang.String tagName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
handler - the handler.uri - the namespace uri of the current tag.tagName - the tag name.attrs - the attributes.org.xml.sax.SAXException - if there is a problem with the parser.public void delegate(XmlReadHandler handler, java.lang.String uri, java.lang.String tagName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
handler - the new handler.tagName - the tag name.uri - the namespace uri of the current tag.attrs - the attributes.org.xml.sax.SAXException - if there is a problem with the parser.public void unwind(java.lang.String uri,
java.lang.String tagName)
throws org.xml.sax.SAXException
tagName - the tagname.uri - the namespace uri of the current tag.org.xml.sax.SAXException - if there is a problem with the parser.public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - not in this implementation.public final void startElement(java.lang.String originalUri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleroriginalUri - the URI.localName - the local name.qName - the qName.attributes - the attributes.org.xml.sax.SAXException - if there is a parsing problem.public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - the character buffer.start - the start index.length - the length of the character data.org.xml.sax.SAXException - if there is a parsing error.public final void endElement(java.lang.String originalUri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleroriginalUri - the URI.localName - the local name.qName - the qName.org.xml.sax.SAXException - if there is a parsing error.public java.lang.Object getResult()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - if an error occurs.