Package org.exolab.castor.xml
Class IDResolverImpl
- java.lang.Object
-
- org.exolab.castor.xml.IDResolverImpl
-
- All Implemented Interfaces:
IDResolver
class IDResolverImpl extends java.lang.Object implements IDResolver
DefaultIDResolverfor Castor XML during (un)marshaling.- See Also:
IDResolver
-
-
Constructor Summary
Constructors Constructor Description IDResolverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidbind(java.lang.String id, java.lang.Object object, boolean isValidating)Binds a mapping from an ID to the referenced target object.java.lang.Objectresolve(java.lang.String idref)Returns the Object whose id matches the given IDREF, or 'null' if no object was found.(package private) voidsetResolver(IDResolver idResolver)Sets a custom IDResolver instance to be used for IDRef resolution.
-
-
-
Method Detail
-
bind
void bind(java.lang.String id, java.lang.Object object, boolean isValidating) throws ValidationExceptionBinds a mapping from an ID to the referenced target object.- Parameters:
id- Object identifierobject- Object being identified by IDisValidating- 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:
resolvein interfaceIDResolver- 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.
-
-