Class JRXmlDigester

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.commons.digester.Digester
net.sf.jasperreports.engine.xml.JRXmlDigester
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class JRXmlDigester extends org.apache.commons.digester.Digester
Author:
Teodor Danciu (teodord@users.sourceforge.net)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
    Property that determines whether loading entities that are not known to the engine is allowed.

    Fields inherited from class org.apache.commons.digester.Digester

    bodyText, bodyTexts, classLoader, configured, entityResolver, entityValidator, errorHandler, factory, inputSources, JAXP_SCHEMA_LANGUAGE, locator, match, matches, namespaceAware, namespaces, params, parser, publicId, reader, root, rules, saxLog, schema, schemaLanguage, schemaLocation, stack, substitutor, useContextClassLoader, validating, W3C_XML_SCHEMA, xincludeAware
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a mapping of an entity system ID to an internal/classloader resource name.
    void
    Clears the last popped object.
    void
    endElement(String namespaceURI, String localName, String qName)
     
     
    protected String
     
    Returns the previously popped object.
    pop()
     
    resolveEntity(String pubId, String systemId)
     

    Methods inherited from class org.apache.commons.digester.Digester

    addBeanPropertySetter, addBeanPropertySetter, addCallMethod, addCallMethod, addCallMethod, addCallMethod, addCallParam, addCallParam, addCallParam, addCallParam, addCallParamPath, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectParam, addRule, addRuleSet, addSetNestedProperties, addSetNestedProperties, addSetNestedProperties, addSetNext, addSetNext, addSetProperties, addSetProperties, addSetProperties, addSetProperty, addSetRoot, addSetRoot, addSetTop, addSetTop, characters, cleanup, clear, configure, createInputSourceFromURL, createInputSourceFromURL, createSAXException, createSAXException, createSAXException, endDocument, endPrefixMapping, error, fatalError, findNamespaceURI, getClassLoader, getCount, getCurrentElementName, getCurrentNamespaces, getCustomContentHandler, getDebug, getDocumentLocator, getEntityResolver, getErrorHandler, getFactory, getFeature, getLogger, getMatch, getNamespaceAware, getParser, getProperty, getPublicId, getReader, getRoot, getRuleNamespaceURI, getRules, getSAXLogger, getSchema, getSchemaLanguage, getStackAction, getSubstitutor, getUseContextClassLoader, getValidating, getXIncludeAware, getXMLReader, getXMLSchema, ignorableWhitespace, initialize, isEmpty, log, log, notationDecl, parse, parse, parse, parse, parse, parse, peek, peek, peek, peek, peekParams, peekParams, pop, popParams, processingInstruction, push, push, pushParams, register, register, resetRoot, setClassLoader, setCustomContentHandler, setDebug, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setLogger, setNamespaceAware, setProperty, setPublicId, setRuleNamespaceURI, setRules, setSAXLogger, setSchema, setSchemaLanguage, setStackAction, setSubstitutor, setUseContextClassLoader, setValidating, setXIncludeAware, setXMLSchema, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.xml.sax.ContentHandler

    declaration
  • Field Details

    • EXCEPTION_MESSAGE_KEY_ENTITY_LOADING_ERROR

      public static final String EXCEPTION_MESSAGE_KEY_ENTITY_LOADING_ERROR
      See Also:
    • EXCEPTION_MESSAGE_UNKOWN_ENTITY_NOT_LOADING

      public static final String EXCEPTION_MESSAGE_UNKOWN_ENTITY_NOT_LOADING
      See Also:
    • PROPERTY_LOAD_UNKNOWN_ENTITIES

      public static final String PROPERTY_LOAD_UNKNOWN_ENTITIES
      Property that determines whether loading entities that are not known to the engine is allowed.

      By default the property is set to false.

      See Also:
  • Constructor Details

    • JRXmlDigester

      public JRXmlDigester()
    • JRXmlDigester

      public JRXmlDigester(XMLReader xmlReader)
    • JRXmlDigester

      public JRXmlDigester(SAXParser parser)
  • Method Details

    • addInternalEntityResource

      public void addInternalEntityResource(String systemId, String resource)
      Adds a mapping of an entity system ID to an internal/classloader resource name.

      This mapping is used by resolveEntity(String, String) to resolve a system ID to a classloader resource.

      Parameters:
      systemId - the system ID
      resource - the resource name
    • resolveEntity

      public InputSource resolveEntity(String pubId, String systemId)
      Specified by:
      resolveEntity in interface EntityResolver
      Overrides:
      resolveEntity in class org.apache.commons.digester.Digester
    • endElement

      public void endElement(String namespaceURI, String localName, String qName) throws SAXException
      Specified by:
      endElement in interface ContentHandler
      Overrides:
      endElement in class org.apache.commons.digester.Digester
      Throws:
      SAXException
    • getNamespacePrefix

      protected String getNamespacePrefix(String qName)
    • getLastNamespacePrefix

      public String getLastNamespacePrefix()
    • pop

      public Object pop()
      Overrides:
      pop in class org.apache.commons.digester.Digester
    • clearLastPopped

      public void clearLastPopped()
      Clears the last popped object.
      See Also:
    • lastPopped

      public Object lastPopped()
      Returns the previously popped object. This method can be used by rules that need to know the object was added and popped to the stack by an inner element.
      Returns:
      the previously popped object