Utility class for loading mapping files and providing them to the XML marshaller, JDO engine etc. The mapping file can be loaded from a URL, input stream or SAX
InputSource.
Multiple mapping files can be loaded with the same Mapping object. When loading master mapping files that include other mapping files it might be convenient to use {@link #setBaseURL} or {@link #setEntityResolver}.
If the desired class loader is different than the one used by Castor (e.g. if Castor is installed as a Java extension), the Mapping object can be constructed with the proper class loader.
The following example loads two mapping files:
Mapping mapping; mapping = new Mapping( getClass().getClassLoader() ); mapping.loadMapping( "mapping.xml" ); mapping.loadMapping( url );
@author
Assaf Arkin
@author
Ralf Joachim
@version $Revision: 7951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $