Search in sources :

Example 6 with PMMLPackage

use of org.kie.pmml.evaluator.api.container.PMMLPackage in project drools by kiegroup.

the class PMMLRuntimeFactoryInternal method getNestedKiePackages.

protected static List<KiePackage> getNestedKiePackages(final InternalKnowledgePackage kiePackage, final KieBase kieBase) {
    PMMLPackage pmmlPackage = (PMMLPackage) kiePackage.getResourceTypePackages().get(ResourceType.PMML);
    final Map<String, KiePMMLModel> kiePmmlModels = pmmlPackage.getAllModels();
    final List<KiePackage> toReturn = new ArrayList<>();
    populateNestedKiePackageList(kiePmmlModels.values(), toReturn, kieBase);
    return toReturn;
}
Also used : PMMLPackage(org.kie.pmml.evaluator.api.container.PMMLPackage) KiePackage(org.kie.api.definition.KiePackage) KiePMMLModel(org.kie.pmml.commons.model.KiePMMLModel) ArrayList(java.util.ArrayList)

Aggregations

PMMLPackage (org.kie.pmml.evaluator.api.container.PMMLPackage)6 InternalKnowledgePackage (org.drools.core.definitions.InternalKnowledgePackage)5 KiePMMLModel (org.kie.pmml.commons.model.KiePMMLModel)4 ArrayList (java.util.ArrayList)3 PMMLPackageImpl (org.kie.pmml.evaluator.assembler.container.PMMLPackageImpl)3 KnowledgeBuilderImpl (org.drools.compiler.builder.impl.KnowledgeBuilderImpl)2 PackageDescr (org.drools.drl.ast.descr.PackageDescr)2 KieBase (org.kie.api.KieBase)2 KiePackage (org.kie.api.definition.KiePackage)2 HasNestedModels (org.kie.pmml.commons.model.HasNestedModels)2 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 InputStream (java.io.InputStream)1 Collection (java.util.Collection)1 List (java.util.List)1 Map (java.util.Map)1 UUID (java.util.UUID)1 FileUtils.getFile (org.apache.commons.io.FileUtils.getFile)1 PackageRegistry (org.drools.compiler.compiler.PackageRegistry)1 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)1