Class DelegatingEntityResolver
- java.lang.Object
- org.springframework.beans.factory.xml.DelegatingEntityResolver
- All Implemented Interfaces:
EntityResolver
- Direct Known Subclasses:
ResourceEntityResolver
public class DelegatingEntityResolver extends Object implements EntityResolver
EntityResolverimplementation that delegates to aBeansDtdResolverand aPluggableSchemaResolverfor DTDs and XML schemas, respectively.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
- See Also:
BeansDtdResolver,PluggableSchemaResolver
Field Summary
Fields Modifier and Type Field Description static StringDTD_SUFFIXSuffix for DTD filesstatic StringXSD_SUFFIXSuffix for schema definition files
Constructor Summary
Constructors Constructor Description DelegatingEntityResolver(ClassLoader classLoader)Create a new DelegatingEntityResolver that delegates to a defaultBeansDtdResolverand a defaultPluggableSchemaResolver.DelegatingEntityResolver(EntityResolver dtdResolver, EntityResolver schemaResolver)Create a new DelegatingEntityResolver that delegates to the givenEntityResolvers.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSourceresolveEntity(String publicId, String systemId)StringtoString()
Field Detail
DTD_SUFFIX
public static final String DTD_SUFFIX
Suffix for DTD files- See Also:
- Constant Field Values
XSD_SUFFIX
public static final String XSD_SUFFIX
Suffix for schema definition files- See Also:
- Constant Field Values
Constructor Detail
DelegatingEntityResolver
public DelegatingEntityResolver(ClassLoader classLoader)
Create a new DelegatingEntityResolver that delegates to a defaultBeansDtdResolverand a defaultPluggableSchemaResolver.Configures the
PluggableSchemaResolverwith the suppliedClassLoader.- Parameters:
classLoader- the ClassLoader to use for loading (can benull) to use the default ClassLoader)
DelegatingEntityResolver
public DelegatingEntityResolver(EntityResolver dtdResolver, EntityResolver schemaResolver)
Create a new DelegatingEntityResolver that delegates to the givenEntityResolvers.- Parameters:
dtdResolver- the EntityResolver to resolve DTDs withschemaResolver- the EntityResolver to resolve XML schemas with
Method Detail
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException