CommonURIResolver
Date: 2016-04-28

org.apache.xmlgraphics.util.uri

## Class CommonURIResolver

- java.lang.Object
- - org.apache.xmlgraphics.util.uri.CommonURIResolver

- All Implemented Interfaces:
    javax.xml.transform.URIResolver

      public class CommonURIResolver
      extends java.lang.Object
      implements javax.xml.transform.URIResolver

  A URI Resolver which supports pluggable entities via the `Service` mechanism.

  This resolver will try all resolvers registered as an `URIResolver` class. For proper operation, the registers URIResolvers must return null if they cannot handle the given URI and fail fast.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommonURIResolver()` Creates a new CommonURIResolver.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CommonURIResolver` | `getDefaultURIResolver()` Retrieve the default resolver instance.
    `void` | `register(javax.xml.transform.URIResolver uriResolver)` Register a given `URIResolver` while the software is running.
    `javax.xml.transform.Source` | `resolve(java.lang.String href, java.lang.String base)`
    `void` | `unregister(javax.xml.transform.URIResolver uriResolver)` Unregister a given `URIResolver` while the software is running.

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

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

- - ### Constructor Detail

    - #### CommonURIResolver

          public CommonURIResolver()

      Creates a new CommonURIResolver. Use this if you need support for resolvers in the current context.
      See Also:
        `getDefaultURIResolver()`

  - ### Method Detail

    - #### getDefaultURIResolver

          public static CommonURIResolver getDefaultURIResolver()

      Retrieve the default resolver instance.
      Returns:
        the default resolver instance.

    - #### resolve

          public javax.xml.transform.Source resolve(java.lang.String href,
                                           java.lang.String base)

      Specified by:
        `resolve` in interface `javax.xml.transform.URIResolver`

    - #### register

          public void register(javax.xml.transform.URIResolver uriResolver)

      Register a given `URIResolver` while the software is running.
      Parameters:
        `uriResolver` - the resolver to register.

    - #### unregister

          public void unregister(javax.xml.transform.URIResolver uriResolver)

      Unregister a given `URIResolver` while the software is running.
      Parameters:
        `uriResolver` - the resolver to unregister.