org.apache.fop.apps.io

## Class ResourceResolverFactory

- java.lang.Object
- - org.apache.fop.apps.io.ResourceResolverFactory

-     public final class ResourceResolverFactory
      extends Object

  A factory class for `ResourceResolver`s.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ResourceResolverFactory.SchemeAwareResourceResolverBuilder` Implementations of this interface will be builders for `ResourceResolver`, they bind URI schemes to their respective resolver.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InternalResourceResolver` | `createDefaultInternalResourceResolver(URI baseURI)` A helper merthod that creates an internal resource resolver using the default resover: `createDefaultResourceResolver()`.
    `static org.apache.xmlgraphics.io.ResourceResolver` | `createDefaultResourceResolver()` Returns the default resource resolver, this is most basic resolver which can be used when no there are no I/O or file access restrictions.
    `static InternalResourceResolver` | `createInternalResourceResolver(URI baseURI, org.apache.xmlgraphics.io.ResourceResolver resolver)` Creates an interal resource resolver given a base URI and a resource resolver.
    `static ResourceResolverFactory.SchemeAwareResourceResolverBuilder` | `createSchemeAwareResourceResolverBuilder(org.apache.xmlgraphics.io.ResourceResolver defaultResolver)` This creates the builder class for binding URI schemes to implementations of `ResourceResolver`.
    `static org.apache.xmlgraphics.io.ResourceResolver` | `createTempAwareResourceResolver(org.apache.xmlgraphics.io.TempResourceResolver tempResourceResolver, org.apache.xmlgraphics.io.ResourceResolver defaultResourceResolver)` Creates a temporary-resource-scheme aware resource resolver.

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

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

- - ### Method Detail

    - #### createDefaultResourceResolver

          public static org.apache.xmlgraphics.io.ResourceResolver createDefaultResourceResolver()

      Returns the default resource resolver, this is most basic resolver which can be used when no there are no I/O or file access restrictions.
      Returns:
        the default resource resolver

    - #### createDefaultInternalResourceResolver

          public static InternalResourceResolver createDefaultInternalResourceResolver(URI baseURI)

      A helper merthod that creates an internal resource resolver using the default resover: `createDefaultResourceResolver()`.
      Parameters:
        `baseURI` - the base URI from which to resolve URIs
      Returns:
        the default internal resource resolver

    - #### createInternalResourceResolver

          public static InternalResourceResolver createInternalResourceResolver(URI baseURI,
                                                                                org.apache.xmlgraphics.io.ResourceResolver resolver)

      Creates an interal resource resolver given a base URI and a resource resolver.
      Parameters:
        `baseURI` - the base URI from which to resolve URIs
        `resolver` - the resource resolver
      Returns:
        the internal resource resolver

    - #### createTempAwareResourceResolver

          public static org.apache.xmlgraphics.io.ResourceResolver createTempAwareResourceResolver(org.apache.xmlgraphics.io.TempResourceResolver tempResourceResolver,
                                                                                                   org.apache.xmlgraphics.io.ResourceResolver defaultResourceResolver)

      Creates a temporary-resource-scheme aware resource resolver. Temporary resource URIs are created by `TempResourceURIGenerator`.
      Parameters:
        `tempResourceResolver` - the temporary-resource-scheme resolver to use
        `defaultResourceResolver` - the default resource resolver to use
      Returns:
        the ressource resolver

    - #### createSchemeAwareResourceResolverBuilder

          public static ResourceResolverFactory.SchemeAwareResourceResolverBuilder createSchemeAwareResourceResolverBuilder(org.apache.xmlgraphics.io.ResourceResolver defaultResolver)

      This creates the builder class for binding URI schemes to implementations of `ResourceResolver`. This allows users to define their own URI schemes such that they have finer control over the acquisition of resources.
      Parameters:
        `defaultResolver` - the default resource resolver that should be used in the event that none of the other registered resolvers match the scheme
      Returns:
        the scheme aware `ResourceResolver` builder

Copyright © 2025 Apache Software Foundation. All rights reserved.