org.apache.xmlgraphics.util.uri

## Class CommonURIResolver

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

- All Implemented Interfaces:
    URIResolver

      public class CommonURIResolver
      extends Object
      implements 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(URIResolver uriResolver)` Register a given `URIResolver` while the software is running.
    `Source` | `resolve(String href, String base)`
    `void` | `unregister(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 Source resolve(String href,
                       String base)

      Specified by:
        `resolve` in interface `URIResolver`

    - #### register

          public void register(URIResolver uriResolver)

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

    - #### unregister

          public void unregister(URIResolver uriResolver)

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

Copyright 1999-2014 The Apache Software Foundation. All Rights Reserved.