Class ScopableResolver

java.lang.Object
org.exolab.castor.xml.schema.ScopableResolver
All Implemented Interfaces:
Resolver

public class ScopableResolver extends Object implements Resolver
An implementation of Resolver that can be "scoped". Which means you can construct a ScopableResovler and give it another Resolver (which can also be Scopable). If this Resolver cannot "resolve" the id, then it will try to use the given Resolver to resolver it.
Version:
$Revision: 5951 $ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $
Author:
Keith Visco
  • Constructor Details

    • ScopableResolver

      public ScopableResolver()
    • ScopableResolver

      public ScopableResolver(Resolver resolver)
  • Method Details

    • addResolvable

      public void addResolvable(String id, Referable referent)
      Adds a resolvable object to this resolver identified by id. Subsequent calls to resolve(java.lang.String) with the same id will return referent.
      Specified by:
      addResolvable in interface Resolver
      Parameters:
      id - The referent's identifier
      referent - The referent object
    • removeResolvable

      public void removeResolvable(String id)
      Removes a resolvable object from this resolver. Subsequent calls to resolve(java.lang.String) with the same id will return null.
      Specified by:
      removeResolvable in interface Resolver
      Parameters:
      id - The referent's identifier
    • resolve

      public Referable resolve(String id)
      Description copied from interface: Resolver
      Called to resolve a reference give the reference's identifier. If the reference is known, this method should return the referenced object. If the reference is unknown, this method should return null.
      Specified by:
      resolve in interface Resolver
      Parameters:
      id - The identifier to resolve
      Returns:
      The resolved object