Package 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,TemplateSaxParserFactory
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.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected final JasperReportsContextprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringstatic final StringA property that determines whether XML schemas/grammars are to be cached so that they are not read/initialized each time a report is compiled.protected static final StringFields inherited from interface net.sf.jasperreports.engine.xml.JRSaxParserFactory
PROPERTY_PRINT_PARSER_FACTORY, PROPERTY_REPORT_PARSER_FACTORY, PROPERTY_TEMPLATE_PARSER_FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureParser(SAXParser parser) Creates a SAX parser.protected SAXParserFactoryprotected voidenableSchemaCaching(SAXParser parser) static JRSaxParserFactorygetFactory(JasperReportsContext jasperReportsContext, String className) protected abstract ThreadLocal<org.apache.commons.collections4.map.ReferenceMap<Object,Object>> protected Objectprotected StringgetResourceURI(String resource) protected abstract booleanprotected voidsetGrammarPoolProperty(SAXParser parser, String poolClassName)
-
Field Details
-
EXCEPTION_MESSAGE_KEY_INCOMPATIBLE_CLASS
- See Also:
-
EXCEPTION_MESSAGE_KEY_PARSER_CREATION_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_RESOURCE_NOT_FOUND
- See Also:
-
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:
-
PACKAGE_PREFIX_XERCES
- See Also:
-
POOL_CLASS_XERCES
- See Also:
-
PACKAGE_PREFIX_SUN_XERCES
- See Also:
-
POOL_CLASS_SUN_XERCES
- See Also:
-
XERCES_PARSER_PROPERTY_GRAMMAR_POOL
- See Also:
-
jasperReportsContext
-
-
Constructor Details
-
BaseSaxParserFactory
-
-
Method Details
-
createParser
Description copied from interface:JRSaxParserFactoryCreates a SAX parser.- Specified by:
createParserin interfaceJRSaxParserFactory- Returns:
- the created parser
-
createSAXParserFactory
protected SAXParserFactory createSAXParserFactory() throws ParserConfigurationException, SAXException -
isValidating
protected abstract boolean isValidating() -
configureParser
- Throws:
SAXException
-
getSchemaLocations
-
getResourceURI
-
enableSchemaCaching
-
getGrammarPoolCache
protected abstract ThreadLocal<org.apache.commons.collections4.map.ReferenceMap<Object,Object>> getGrammarPoolCache() -
setGrammarPoolProperty
-
getGrammarPoolCacheKey
-
getFactory
public static JRSaxParserFactory getFactory(JasperReportsContext jasperReportsContext, String className)
-