net.sf.jasperreports.engine.xml
Class BaseSaxParserFactory
java.lang.Object
net.sf.jasperreports.engine.xml.BaseSaxParserFactory
- All Implemented Interfaces:
- JRSaxParserFactory
- Direct Known Subclasses:
- JRReportSaxParserFactory, PrintSaxParserFactory
public abstract class BaseSaxParserFactory
- extends java.lang.Object
- implements JRSaxParserFactory
Base SAX parser factory.
This factory creates a parser via the default SAX parser factory
(javax.xml.parsers.SAXParserFactory.newInstance()
).
To improve performance, XML schemas can be cached when using a Xerces
SAX parser. See PROPERTY_CACHE_SCHEMAS
.
- Version:
- $Id: BaseSaxParserFactory.java 4617 2011-09-26 11:25:43Z lucianc $
- Author:
- Lucian Chirita ([email protected])
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_CACHE_SCHEMAS
public static final java.lang.String PROPERTY_CACHE_SCHEMAS
- A property that determines whether XML schemas/grammars are to be cached
so that they are not read/initialized each time a report is compiled.
Currently, setting this property is only effective when a Xerces XML
parser is used (either a stock one from Apache or one embedded into a
SUN JDK).
- See Also:
- Constant Field Values
PACKAGE_PREFIX_XERCES
protected static final java.lang.String PACKAGE_PREFIX_XERCES
- See Also:
- Constant Field Values
POOL_CLASS_XERCES
protected static final java.lang.String POOL_CLASS_XERCES
- See Also:
- Constant Field Values
PACKAGE_PREFIX_SUN_XERCES
protected static final java.lang.String PACKAGE_PREFIX_SUN_XERCES
- See Also:
- Constant Field Values
POOL_CLASS_SUN_XERCES
protected static final java.lang.String POOL_CLASS_SUN_XERCES
- See Also:
- Constant Field Values
XERCES_PARSER_PROPERTY_GRAMMAR_POOL
protected static final java.lang.String XERCES_PARSER_PROPERTY_GRAMMAR_POOL
- See Also:
- Constant Field Values
BaseSaxParserFactory
public BaseSaxParserFactory()
createParser
public javax.xml.parsers.SAXParser createParser()
- Description copied from interface:
JRSaxParserFactory
- Creates a SAX parser.
- Specified by:
createParser
in interface JRSaxParserFactory
- Returns:
- the created parser
createSAXParserFactory
protected javax.xml.parsers.SAXParserFactory createSAXParserFactory()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
isValidating
protected abstract boolean isValidating()
configureParser
protected void configureParser(javax.xml.parsers.SAXParser parser)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
getSchemaLocations
protected abstract java.util.List<java.lang.String> getSchemaLocations()
getResourceURI
protected java.lang.String getResourceURI(java.lang.String resource)
enableSchemaCaching
protected void enableSchemaCaching(javax.xml.parsers.SAXParser parser)
setGrammarPoolProperty
protected void setGrammarPoolProperty(javax.xml.parsers.SAXParser parser,
java.lang.String poolClassName)
getGrammarPoolCacheKey
protected java.lang.Object getGrammarPoolCacheKey()
Copyright © 2012. All Rights Reserved.