Public Member Functions

org.exolab.castor.xml.schema.Resolver Interface Reference

Inheritance diagram for org.exolab.castor.xml.schema.Resolver:
org.exolab.castor.xml.schema.ScopableResolver

List of all members.

Public Member Functions

Referable resolve (String id)
void addResolvable (String id, Referable referent)
void removeResolvable (String id)

Detailed Description

Defines an object resolver but does not specify any implementation.

A lazy resolver would resolve an object given its identifier. The reference to the object will be created with a ResolvableReference object using the resolved and the identifier. When the object is requested, the resolve method will be called to obtain it.

Some implementation will add and remove resolvable objects, e.g. a collection of objects that also acts as a resolver. These methods should implement addResolvable and removeResolvable. Resolvers that do not implement these methods are still considered valid resolvers. For example, a database based resolver will operate consistently without implementing add/remove not through the database interface.

Author:
Assaf Arkin
See also:
ResolvableReference

Member Function Documentation

void org.exolab.castor.xml.schema.Resolver.addResolvable ( String  id,
Referable  referent 
)

Adds a resolvable object to this resolver identified by id. Subsequent calls to resolve with the same id will return referent.

Parameters:
id The referent's identifier
referent The referent object

Implemented in org.exolab.castor.xml.schema.ScopableResolver.

Referenced by org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.endElement(), and org.exolab.castor.xml.schema.reader.RedefineUnmarshaller.endElement().

void org.exolab.castor.xml.schema.Resolver.removeResolvable ( String  id  ) 

Removes a resolvable object from this resolver. Subsequent calls to resolve with the same id will return null.

Parameters:
id The referent's identifier

Implemented in org.exolab.castor.xml.schema.ScopableResolver.

Referable org.exolab.castor.xml.schema.Resolver.resolve ( String  id  ) 

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.

Parameters:
id The identifier to resolve
Returns:
The resolved object

Implemented in org.exolab.castor.xml.schema.ScopableResolver.

Referenced by org.exolab.castor.xml.schema.ResolvableReference.get(), org.exolab.castor.xml.schema.ResolvableReference.resolvable(), and org.exolab.castor.xml.schema.ScopableResolver.resolve().


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties