Package net.sf.jasperreports.engine.xml
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 ([email protected])
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_ENTITY_LOADING_ERROR
static String
EXCEPTION_MESSAGE_UNKOWN_ENTITY_NOT_LOADING
static String
PROPERTY_LOAD_UNKNOWN_ENTITIES
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 JRXmlDigester()
JRXmlDigester(SAXParser parser)
JRXmlDigester(XMLReader xmlReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInternalEntityResource(String systemId, String resource)
Adds a mapping of an entity system ID to an internal/classloader resource name.void
clearLastPopped()
Clears the last popped object.void
endElement(String namespaceURI, String localName, String qName)
String
getLastNamespacePrefix()
protected String
getNamespacePrefix(String qName)
Object
lastPopped()
Returns the previously popped object.Object
pop()
InputSource
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
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_ENTITY_LOADING_ERROR
public static final String EXCEPTION_MESSAGE_KEY_ENTITY_LOADING_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_UNKOWN_ENTITY_NOT_LOADING
public static final String EXCEPTION_MESSAGE_UNKOWN_ENTITY_NOT_LOADING
- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
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 IDresource
- the resource name
-
resolveEntity
public InputSource resolveEntity(String pubId, String systemId)
- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classorg.apache.commons.digester.Digester
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classorg.apache.commons.digester.Digester
- Throws:
SAXException
-
getLastNamespacePrefix
public String getLastNamespacePrefix()
-
pop
public Object pop()
- Overrides:
pop
in classorg.apache.commons.digester.Digester
-
clearLastPopped
public void clearLastPopped()
Clears the last popped object.- See Also:
lastPopped()
-
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
-
-