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
EntityResolver
implementation that delegates to aBeansDtdResolver
and aPluggableSchemaResolver
for 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 String
DTD_SUFFIX
Suffix for DTD filesstatic String
XSD_SUFFIX
Suffix for schema definition files
Constructor Summary
Constructors Constructor Description DelegatingEntityResolver(ClassLoader classLoader)
Create a new DelegatingEntityResolver that delegates to a defaultBeansDtdResolver
and 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 InputSource
resolveEntity(String publicId, String systemId)
String
toString()
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 defaultBeansDtdResolver
and a defaultPluggableSchemaResolver
.Configures the
PluggableSchemaResolver
with 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:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException