for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();) {
EPackage currentEPackage = (EPackage)iter.next();
String currentBasePackage = extractBasePackageName(currentEPackage, xsdJavaPackage);
String currentPrefix = CodeGenUtil.capName(currentEPackage.getName());
GenPackage currentGenPackage = createGenPackage(currentEPackage, currentBasePackage,
currentPrefix, genOptions, resourceSet);
genPackages.add(currentGenPackage);
for (GenClass genClass : (List<GenClass>)currentGenPackage.getGenClasses()) {
genClasses.put(genClass.getEcoreClass(), genClass);
}
}
// Process all the SDO packages
// Populate the QName -> interfaceName typeMapping table
for (GenPackage currentGenPackage : genPackages) {
EPackage currentEPackage = currentGenPackage.getEcorePackage();
// Populate the type mappings for all the complex types
for (GenClass genClass : (List<GenClass>)currentGenPackage.getGenClasses()) {
QName qname = new QName(extendedMetaData.getNamespace(currentEPackage),
extendedMetaData.getName(genClass.getEcoreClass()));
String interfaceName = (DYNAMIC_SDO & genOptions) == DYNAMIC_SDO ? "commonj.sdo.DataObject" : currentGenPackage
.getInterfacePackageName()
+ '.' + genClass.getInterfaceName();
SDODataBindingTypeMappingEntry typeMappingEntry =
new SDODataBindingTypeMappingEntry(interfaceName, false, null);
typeMapping.put(qname, typeMappingEntry);