}
@Override
public void merge(KieBase kieBase, KiePackage kiePkg, BayesPackage bayesPkg) {
Map<ResourceType, ResourceTypePackage> map = ((InternalKnowledgePackage)kiePkg).getResourceTypePackages();
BayesPackage existing = (BayesPackage) map.get( ResourceType.BAYES );
if ( existing == null ) {
existing = new BayesPackage();
map.put(ResourceType.BAYES, existing);
}
for ( String name : bayesPkg.listJunctionTrees() ) {
existing.addJunctionTree( name, bayesPkg.getJunctionTree( name ) );
}
}