DelegatingEntityResolver (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.beans.factory.xml

## 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 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DTD_SUFFIX` Suffix for DTD files
    `static String` | `XSD_SUFFIX` Suffix for schema definition files

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputSource` | `resolveEntity(String publicId, String systemId)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`