Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.apps.io
Interface ResourceResolverFactory.SchemeAwareResourceResolverBuilder

Enclosing class:
  ResourceResolverFactory

    public static interface ResourceResolverFactory.SchemeAwareResourceResolverBuilder

Implementations of this interface will be builders for `ResourceResolver`, they bind URI schemes to their respective resolver. This gives users more control over the mechanisms by which URIs are resolved.

Here is an example of how this could be used:

`SchemeAwareResourceResolverBuilder builder = ResourceResolverFactory.createSchemeAwareResourceResolverBuilder(defaultResolver); builder.registerResourceResolverForScheme("test", testResolver); builder.registerResourceResolverForScheme("anotherTest", test2Resolver); ResourceResolver resolver = builder.build();`

This will result in all URIs for the form "test:///..." will be resolved using the `testResolver` object; URIs of the form "anotherTest:///..." will be resolved using `test2Resolver`; all other URIs will be resolved from the defaultResolver.

Method Summary
`org.apache.xmlgraphics.io.ResourceResolver` | `build()` Builds a `ResourceResolver` that will delegate to the respective resource resolver when a registered URI scheme is given
`void` | `registerResourceResolverForScheme(java.lang.String scheme, org.apache.xmlgraphics.io.ResourceResolver resourceResolver)` Register a scheme with its respective `ResourceResolver`.

Method Detail

### registerResourceResolverForScheme

    void registerResourceResolverForScheme(java.lang.String scheme,
                                           org.apache.xmlgraphics.io.ResourceResolver resourceResolver)

  Register a scheme with its respective `ResourceResolver`. This resolver will be used as the only resolver for the specified scheme.

  Parameters:
    `scheme` - the scheme to be used with the given resolver
    `resourceResolver` - the resource resolver

### build

    org.apache.xmlgraphics.io.ResourceResolver build()

  Builds a `ResourceResolver` that will delegate to the respective resource resolver when a registered URI scheme is given

  Returns:
    a resolver that delegates to the appropriate scheme resolver

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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