private Map<IResource, DRLInfo> collectDRLInfo( Map<Resource, ResourceDescr> resourceMap,
PackageBuilder packageBuilder) {
Map<IResource, DRLInfo> infoMap = new HashMap<IResource, DRLInfo>();
for (Map.Entry<Resource, PackageDescr> entry : groupPackageDescrByResource(packageBuilder).entrySet()) {
ResourceDescr resourceDescr = resourceMap.get(entry.getKey());
if (resourceDescr == null) {
continue;
}
PackageDescr packageDescr = entry.getValue();
DRLInfo info = new DRLInfo( resourceDescr.getSourcePathName(),
packageDescr,
new ArrayList<BaseKnowledgeBuilderResultImpl>(),
packageBuilder.getPackageRegistry(packageDescr.getNamespace()).getPackage(),
new DroolsError[0],
packageBuilder.getPackageRegistry( packageDescr.getNamespace() ).getDialectCompiletimeRegistry() );
info.setResource(resourceDescr.getResource());
infoMap.put(resourceDescr.getResource(), info);
}
return infoMap;
}