org.springframework.beans.factory.xml
Class DelegatingEntityResolver

java.lang.Object
  extended by 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 a BeansDtdResolver and a PluggableSchemaResolver for DTDs and XML schemas, respectively.

Since:
2.0
Author:
Rob Harrop, Juergen Hoeller, Rick Evans
See Also:
BeansDtdResolver, PluggableSchemaResolver

Field Summary
static String DTD_SUFFIX
          Suffix for DTD files
static String XSD_SUFFIX
          Suffix for schema definition files
 
Constructor Summary
DelegatingEntityResolver(ClassLoader classLoader)
          Create a new DelegatingEntityResolver that delegates to a default BeansDtdResolver and a default PluggableSchemaResolver.
DelegatingEntityResolver(EntityResolver dtdResolver, EntityResolver schemaResolver)
          Create a new DelegatingEntityResolver that delegates to the given EntityResolvers.
 
Method Summary
 InputSource resolveEntity(String publicId, String systemId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 default BeansDtdResolver and a default PluggableSchemaResolver.

Configures the PluggableSchemaResolver with the supplied ClassLoader.

Parameters:
classLoader - the ClassLoader to use for loading (can be null) to use the default ClassLoader)

DelegatingEntityResolver

public DelegatingEntityResolver(EntityResolver dtdResolver,
                                EntityResolver schemaResolver)
Create a new DelegatingEntityResolver that delegates to the given EntityResolvers.

Parameters:
dtdResolver - the EntityResolver to resolve DTDs with
schemaResolver - the EntityResolver to resolve XML schemas with
Method Detail

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
Specified by:
resolveEntity in interface EntityResolver
Throws:
SAXException
IOException


Copyright © 2002-2008 The Spring Framework.