ResourceSet resourceSet = DataObjectUtil.createResourceSet();
// 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,