org.eclipse.emf.cdo.client
Interface MappingProvider

All Known Implementing Classes:
AnnotationMappingProviderImpl, XMLMappingProviderImpl

public interface MappingProvider

Provides the CDO mapping specification for package and the contained classes and attributes.

An instance of MappingProvider is associated with a single package. It is used by the PackageManager to associate an EPackage instance with a PackageInfo instance and provide additional mapping information. The mapping information is used by the CDO server to initially create the tables needed for the classes and attributes in this package.

No matter where the mapping information actually comes from, the PackageManager will serialize it to an XML file in the current working directory. The name of this mapping file is the name of the underlying Ecore model, converted to lower case, appended with .xml.

This interface is expected to be implemented in order to specify different kinds of sources for package structure and mapping information.

TODO Make MappingProvider configurable (beanify).

See Also:
PackageManager, PackageMapping, ClassMapping, AttributeMapping

Method Summary
 AttributeMapping getAttributeMapping(java.lang.String className, java.lang.String attributeName)
          Returns the AttributeMapping for an attribute of this MappingProvider.
 ClassMapping getClassMapping(java.lang.String className)
          Returns the ClassMapping for a class of this MappingProvider.
 PackageMapping getPackageMapping()
          Returns the PackageMapping for the package of this MappingProvider.
 

Method Detail

getPackageMapping

PackageMapping getPackageMapping()
Returns the PackageMapping for the package of this MappingProvider.

Returns:
The PackageMapping for the package of this MappingProvider.


getClassMapping

ClassMapping getClassMapping(java.lang.String className)
Returns the ClassMapping for a class of this MappingProvider.

Parameters:
className - The name of the class to return the ClassMapping for.

Returns:
The ClassMapping (or null).


getAttributeMapping

AttributeMapping getAttributeMapping(java.lang.String className,
                                     java.lang.String attributeName)
Returns the AttributeMapping for an attribute of this MappingProvider.

Parameters:
className - The name of a class to search the attribute within.

attributeName - The name of the attribute to return the AttributeMapping for.

Returns:
The AttributeMapping (or null).


Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
All Rights Reserved.