org.exolab.castor.xml

Class IDResolverImpl

Implemented Interfaces:
IDResolver

(package private) class IDResolverImpl
extends java.lang.Object
implements IDResolver

Default IDResolver for Castor XML during (un)marshaling.
See Also:
IDResolver

Method Summary

(package private) void
bind(String id, Object object, boolean isValidating)
Binds a mapping from an ID to the referenced target object.
Object
resolve(String idref)
Returns the Object whose id matches the given IDREF, or 'null' if no object was found.
(package private) void
setResolver(IDResolver idResolver)
Sets a custom IDResolver instance to be used for IDRef resolution.

Method Details

bind

(package private)  void bind(String id,
                             Object object,
                             boolean isValidating)
            throws ValidationException
Binds a mapping from an ID to the referenced target object.
Parameters:
id - Object identifier
object - Object being identified by ID
Throws:
ValidationException - If an ID is used more than once.

resolve

public Object resolve(String idref)
Returns the Object whose id matches the given IDREF, or 'null' if no object was found.
Specified by:
resolve in interface IDResolver
Parameters:
idref - the IDREF to resolve.
Returns:
the Object whose id matches the given IDREF.

setResolver

(package private)  void setResolver(IDResolver idResolver)
Sets a custom IDResolver instance to be used for IDRef resolution.
Parameters:
idResolver - a custom IDResolver instance to be used.

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