// Populate list of GenPackages and a map of GenClasses keyed by EClass
List<GenPackage> genPackages = new ArrayList<GenPackage>();
Map<EClass, GenClass> genClasses = new HashMap<EClass, GenClass>();
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()));