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
DefaultIDResolver
for 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) 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.
-
-
-
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 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:
resolve
in 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.
-
-