org.exolab.castor.xml.schema
Class ScopableResolver

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

public class ScopableResolver
extends java.lang.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: 1.1.1.1 $ $Date: 2003/03/03 07:09:34 $
Author:
Keith Visco

Constructor Summary
ScopableResolver()
           
ScopableResolver(Resolver resolver)
           
 
Method Summary
 void addResolvable(java.lang.String id, Referable referent)
          Adds a resolvable object to this resolver identified by id.
 void removeResolvable(java.lang.String id)
          Removes a resolvable object from this resolver.
 Referable resolve(java.lang.String id)
          Called to resolve a reference give the reference's identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopableResolver

public ScopableResolver()

ScopableResolver

public ScopableResolver(Resolver resolver)
Method Detail

addResolvable

public void addResolvable(java.lang.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(java.lang.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(java.lang.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


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com