}
public void addPackageFromPMML(Resource resource,
ResourceType type,
ResourceConfiguration configuration) throws Exception {
PMMLCompiler compiler = getPMMLCompiler();
if (compiler != null) {
if (compiler.getResults().isEmpty()) {
this.resource = resource;
PackageDescr descr = pmmlModelToPackageDescr(compiler, resource);
if (descr != null) {
addPackage(descr);
}
this.resource = null;
} else {
this.results.addAll(compiler.getResults());
}
compiler.clearResults();
} else {
addPackageForExternalType(resource, type, configuration);
}
}