Interface DaffodilEntityResolverProvider

All Superinterfaces:
org.apache.daffodil.lib.util.SimpleNamedLoadableService

public interface DaffodilEntityResolverProvider extends org.apache.daffodil.lib.util.SimpleNamedLoadableService
Implement this interface and register it with SPI, by listing the implementation in META-INF/services/org.apache.daffodil.api.DaffodilEntityResolverProvider, to replace the resolvers that Daffodil uses to resolve import/include schemaLocations.

Implementations must have a zero-argument constructor. At most one provider may be registered besides Daffodil's own default, which is used when there is none. Providers registered with the same name are ignored.

Daffodil never uses one resolver from more than one thread at a time, but it may use it from different threads one after another. A provider can return a new resolver from each method, which need not be thread safe. A provider that returns the same resolver to every caller must make it thread safe. The provider itself must be thread safe.

Daffodil resolves its own schemas, and anything the built-in catalog or catalogs configured with CatalogManager.properties map, before asking the provider. A provider therefore only needs to resolve the rest of a user's schemas.

Each method returns the kind of resolver Daffodil needs for one operation, and they need not return the same object. A provider that does not support a kind of resolver may throw an UnsupportedOperationException, in which case the operations that need it will fail.

  • Method Details

    • name

      String name()
      Unique name of this provider. Providers that share a name are all ignored with a warning, so the name must not clash with any other provider on the classpath. The name "default-entity-resolver" is used by Daffodil's own provider.
      Specified by:
      name in interface org.apache.daffodil.lib.util.SimpleNamedLoadableService
      Returns:
      name of the provider
    • getEntityResolver

      EntityResolver getEntityResolver()
      Returns:
      entity resolver
    • getXMLEntityResolver

      org.apache.xerces.xni.parser.XMLEntityResolver getXMLEntityResolver()
      Returns:
      xml entity resolver
    • getLSResourceResolver

      LSResourceResolver getLSResourceResolver()
      Returns:
      ls resource resolver
    • getURIResolver

      URIResolver getURIResolver()
      Returns:
      uri resolver