private Map<IResource, DRLInfo> collectDRLInfo( Map<Resource, ResourceDescr> resourceMap,
KnowledgeBuilderImpl kBuilder) {
Map<IResource, DRLInfo> infoMap = new HashMap<IResource, DRLInfo>();
for (Map.Entry<Resource, PackageDescr> entry : groupPackageDescrByResource(kBuilder).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>(),
kBuilder.getPackageRegistry(packageDescr.getNamespace()).getPackage(),
new DroolsError[0],
kBuilder.getPackageRegistry( packageDescr.getNamespace() ).getDialectCompiletimeRegistry() );
info.setResource(resourceDescr.getResource());
infoMap.put(resourceDescr.getResource(), info);
}
return infoMap;
}