Package org.exolab.castor.xml
Class IDResolverImpl
java.lang.Object
org.exolab.castor.xml.IDResolverImpl
- All Implemented Interfaces:
IDResolver
Default
IDResolver
for Castor XML during (un)marshaling.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
Binds a mapping from an ID to the referenced target object.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.
-
Constructor Details
-
IDResolverImpl
IDResolverImpl()
-
-
Method Details
-
bind
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
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
Sets a custom IDResolver instance to be used for IDRef resolution.- Parameters:
idResolver
- a custom IDResolver instance to be used.
-