org.exolab.castor.xml
Class IDResolverImpl

java.lang.Object
  extended by org.exolab.castor.xml.IDResolverImpl
All Implemented Interfaces:
IDResolver

 class IDResolverImpl
extends java.lang.Object
implements IDResolver

Default IDResolver for Castor XML during (un)marshaling.

See Also:
IDResolver

Constructor Summary
IDResolverImpl()
           
 
Method Summary
(package private)  void bind(java.lang.String id, java.lang.Object object, boolean isValidating)
          Binds a mapping from an ID to the referenced target object.
 java.lang.Object resolve(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDResolverImpl

IDResolverImpl()
Method Detail

bind

void bind(java.lang.String id,
          java.lang.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
_validate - True if validation is enabled.
Throws:
ValidationException - If an ID is used more than once.

resolve

public java.lang.Object resolve(java.lang.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

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-2007. All rights reserved http://www.intalio.com