private void addPackage ( Resource resource ) throws DroolsParserException , IOException { if ( pmmlCompiler != null ) { if ( pmmlCompiler . getResults ( ) . isEmpty ( ) ) { addPMMLPojos ( pmmlCompiler , resource ) ; if ( pmmlCompiler . getResults ( ) . isEmpty ( ) ) { List < PackageDescr > packages = getPackageDescrs ( resource ) ; if ( packages != null && ! packages . isEmpty ( ) ) { for ( PackageDescr descr : packages ) { this . kbuilder . addPackage ( descr ) ; } } } } } }
This method does the work of calling the PMML compiler and then assembling the results into packages that are added to the KnowledgeBuilder