Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PMML : Initial separation of informer from main PMML module

  • Loading branch information...
commit 94341bdbceeaab5da7c5a6c5eca63ce74307ec0c 1 parent 159d47b
@sotty sotty authored
View
23 drools-pmml/src/main/java/org/drools/pmml/pmml_4_1/PMML4Compiler.java
@@ -399,6 +399,9 @@ private static void checkBuildingResources( PMML pmml ) throws IOException {
}
if ( ! informerLoaded && needsInformerExtension( pmml ) ) {
+ if ( ! informerRules ) {
+ resetVisitor( pmml );
+ }
for ( String ntempl : INFORMER_TEMPLATES ) {
prepareTemplate( ntempl );
}
@@ -407,6 +410,26 @@ private static void checkBuildingResources( PMML pmml ) throws IOException {
}
+ private static void resetVisitor( PMML pmml ) throws IOException {
+ visitor = null;
+ visitorRules = false;
+ compilerRules = false;
+ informerRules = false;
+
+ clusteringLoaded = false;
+ globalLoaded = false;
+ informerLoaded = false;
+ miningLoaded = false;
+ neuralLoaded = false;
+ scorecardLoaded = false;
+ simpleRegLoaded = false;
+ svmLoaded = false;
+ transformationLoaded = false;
+ treeLoaded = false;
+
+ checkBuildingResources( pmml );
+ }
+
protected static boolean needsInformerExtension( PMML pmml ) {
for ( Object o : pmml.getAssociationModelsAndBaselineModelsAndClusteringModels() ) {
Please sign in to comment.
Something went wrong with that request. Please try again.