org.apache.xerces.util

## Class DOMEntityResolverWrapper

- java.lang.Object
- - org.apache.xerces.util.DOMEntityResolverWrapper

- All Implemented Interfaces:
    org.apache.xerces.xni.parser.XMLEntityResolver

      public class DOMEntityResolverWrapper
      extends java.lang.Object
      implements org.apache.xerces.xni.parser.XMLEntityResolver

  This class wraps DOM entity resolver to XNI entity resolver.
  Version:
    $Id: DOMEntityResolverWrapper.java 1368777 2012-08-03 02:17:53Z mrglavas $
  Author:
    Gopal Sharma, SUN MicroSystems Inc., Elena Litani, IBM, Ramesh Mandava, Sun Microsystems
  See Also:
    `LSResourceResolver`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.w3c.dom.ls.LSResourceResolver` | `fEntityResolver` The DOM entity resolver.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DOMEntityResolverWrapper()` Default constructor.
    `DOMEntityResolverWrapper(org.w3c.dom.ls.LSResourceResolver entityResolver)` Wraps the specified DOM entity resolver.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.w3c.dom.ls.LSResourceResolver` | `getEntityResolver()` Returns the DOM entity resolver.
    `org.apache.xerces.xni.parser.XMLInputSource` | `resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)` Resolves an external parsed entity.
    `void` | `setEntityResolver(org.w3c.dom.ls.LSResourceResolver entityResolver)` Sets the DOM entity resolver.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fEntityResolver

          protected org.w3c.dom.ls.LSResourceResolver fEntityResolver

      The DOM entity resolver.

  - ### Constructor Detail

    - #### DOMEntityResolverWrapper

          public DOMEntityResolverWrapper()

      Default constructor.

    - #### DOMEntityResolverWrapper

          public DOMEntityResolverWrapper(org.w3c.dom.ls.LSResourceResolver entityResolver)

      Wraps the specified DOM entity resolver.

  - ### Method Detail

    - #### setEntityResolver

          public void setEntityResolver(org.w3c.dom.ls.LSResourceResolver entityResolver)

      Sets the DOM entity resolver.

    - #### getEntityResolver

          public org.w3c.dom.ls.LSResourceResolver getEntityResolver()

      Returns the DOM entity resolver.

    - #### resolveEntity

          public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier)
                                                                    throws org.apache.xerces.xni.XNIException,
                                                                           java.io.IOException

      Resolves an external parsed entity. If the entity cannot be resolved, this method should return null.
      Specified by:
        `resolveEntity` in interface `org.apache.xerces.xni.parser.XMLEntityResolver`
      Parameters:
        `resourceIdentifier` - description of the resource to be resolved
      Throws:
        `org.apache.xerces.xni.XNIException` - Thrown on general error.
        `java.io.IOException` - Thrown if resolved entity stream cannot be opened or some other i/o error occurs.
      See Also:
        `XMLResourceIdentifier`

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.