Class IDResolverImpl

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

class IDResolverImpl extends Object implements IDResolver
Default IDResolver for Castor XML during (un)marshaling.
See Also:
  • Constructor Details

    • IDResolverImpl

      IDResolverImpl()
  • Method Details

    • bind

      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
      isValidating - True if validation is enabled.
      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

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