org.exolab.castor.xml
Class XMLMappingLoader
java.lang.Object
org.exolab.castor.mapping.loader.MappingLoader
org.exolab.castor.xml.XMLMappingLoader
- All Implemented Interfaces:
- MappingResolver
public class XMLMappingLoader
- extends MappingLoader
An XML implementation of mapping helper. Creates XML class
descriptors from the mapping file.
- Version:
- $Revision: 1.5 $ $Date: 2003/04/23 08:44:42 $
- Author:
- Keith Visco, Assaf Arkin
Constructor Summary |
XMLMappingLoader(java.lang.ClassLoader loader,
java.io.PrintWriter logWriter)
Creates a new XMLMappingLoader |
Methods inherited from class org.exolab.castor.mapping.loader.MappingLoader |
addDescriptor, createFieldDescs, createFieldHandler, findAccessor, getClassLoader, getDescriptor, getLogWriter, listDescriptors, listJavaClasses, loadClassDescriptor, loadMapping, resolveType, setAllowRedefinitions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLMappingLoader
public XMLMappingLoader(java.lang.ClassLoader loader,
java.io.PrintWriter logWriter)
throws MappingException
- Creates a new XMLMappingLoader
- Throws:
MappingException
resolveRelations
protected void resolveRelations(ClassDescriptor clsDesc)
throws MappingException
- Overrides:
resolveRelations
in class MappingLoader
- Throws:
MappingException
createDescriptor
protected ClassDescriptor createDescriptor(ClassMapping clsMap)
throws MappingException
- Description copied from class:
MappingLoader
- Creates a new descriptor. The class mapping information is used
to create a new stock
ClassDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
- Overrides:
createDescriptor
in class MappingLoader
- Parameters:
clsMap
- The class mapping information
- Throws:
MappingException
- An exception indicating why mapping for
the class cannot be created
createFieldDesc
protected FieldDescriptor createFieldDesc(java.lang.Class javaClass,
FieldMapping fieldMap)
throws MappingException
- Description copied from class:
MappingLoader
- Creates a single field descriptor. The field mapping is used to
create a new stock
FieldDescriptor
. Implementations may
extend this class to create a more suitable descriptor.
- Overrides:
createFieldDesc
in class MappingLoader
- Parameters:
javaClass
- The class to which the field belongsfieldMap
- The field mapping information
- Returns:
- The field descriptor
- Throws:
MappingException
- The field or its accessor methods are not
found, not accessible, not of the specified type, etc
getTypeInfo
protected TypeInfo getTypeInfo(java.lang.Class fieldType,
CollectionHandler colHandler,
FieldMapping fieldMap)
throws MappingException
- Overrides:
getTypeInfo
in class MappingLoader
- Throws:
MappingException
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com