Browse files

Partial Upgrade to 5.3 and towards conforming with Drools pom structure

  • Loading branch information...
1 parent de8e443 commit 13d22345d0bc3d4a375445e0cd12afd3f6d2ab73 @sotty sotty committed Jun 25, 2011
View
13 drools-pmml/.gitignore
@@ -0,0 +1,13 @@
+/target
+/local
+
+# Eclipse, Netbeans and IntelliJ files
+/.*
+!.gitignore
+/nbproject
+/*.ipr
+/*.iws
+/*.iml
+
+# Repository wide ignore mac DS_Store files
+.DS_Store
View
13 drools-pmml/drools-pmml-compiler/.gitignore
@@ -0,0 +1,13 @@
+/target
+/local
+
+# Eclipse, Netbeans and IntelliJ files
+/.*
+!.gitignore
+/nbproject
+/*.ipr
+/*.iws
+/*.iml
+
+# Repository wide ignore mac DS_Store files
+.DS_Store
View
63 drools-pmml/drools-pmml-compiler/pom.xml
@@ -18,41 +18,38 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.drools</groupId>
- <artifactId>drools-pmml</artifactId>
- <version>5.2.0-SNAPSHOT</version>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
<groupId>org.drools</groupId>
- <artifactId>drools-pmml-compiler</artifactId>
- <version>5.2.0-SNAPSHOT</version>
+ <artifactId>drools-pmml</artifactId>
+ <version>5.3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>drools-pmml-compiler</artifactId>
- <name>Drools :: PMML - Compiler </name>
+ <name>Drools :: PMML - Compiler </name>
- <dependencies>
- <!-- Internal dependencies -->
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-informer-core</artifactId>
- <version>5.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>knowledge-api</artifactId>
- <version>5.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- <version>5.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>com.springsource.org.apache.commons.beanutils</artifactId>
- <version>1.8.0</version>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>knowledge-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-compiler</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-informer-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+ </dependencies>
</project>
View
2 drools-pmml/drools-pmml-compiler/src/main/java/org/drools/pmml_4_0/PMML4Compiler.java
@@ -48,7 +48,7 @@
public static final String[] PMML_VISIT_RULES = new String[] {
(BASE_PACK+"/pmml_visitor.drl"),
(BASE_PACK+"/pmml_compiler.drl"),
- (BASE_PACK+"/pmml_informer.drl")
+// (BASE_PACK+"/pmml_informer.drl")
};
View
42 drools-pmml/drools-pmml-compiler/src/main/resources/org/drools/pmml_4_0/pmml_compiler.drl
@@ -16,51 +16,51 @@ global PMML4Wrapper utils;
function void applyTemplate(String templateName, Object context, TemplateRegistry registry, Map vars, StringBuilder builder) {
CompiledTemplate template = (CompiledTemplate) registry.getNamedTemplate(templateName);
builder.append(TemplateRuntime.execute(template, context, vars));
- //builder.append(TemplateRuntime.execute(template, context, new org.mvel2.integration.impl.DefaultLocalVariableResolverFactory()));
}
// the function is repeated here because of rule processDerivedField_MapValues
function String format(String type, String val) {
- if (type == null)
+ if (type == null) {
return val;
- if ("Integer".equalsIgnoreCase(type))
+ } else if ("Integer".equalsIgnoreCase(type)) {
return val;
- else if ("Float".equalsIgnoreCase(type))
+ } else if ("Float".equalsIgnoreCase(type)) {
return val;
- else if ("Double".equalsIgnoreCase(type))
+ } else if ("Double".equalsIgnoreCase(type)) {
return val;
- else if ("Boolean".equalsIgnoreCase(type))
+ } else if ("Boolean".equalsIgnoreCase(type)) {
return val;
- else if ("String".equalsIgnoreCase(type))
+ } else if ("String".equalsIgnoreCase(type)) {
return "\""+val+"\"";
- else if ("Date".equalsIgnoreCase(type))
+ } else if ("Date".equalsIgnoreCase(type)) {
return "\""+val+"\"";
- else if ("Time".equalsIgnoreCase(type))
+ } else if ("Time".equalsIgnoreCase(type)) {
return "\""+val+"\"";
- else if ("DateTime".equalsIgnoreCase(type))
+ } else if ("DateTime".equalsIgnoreCase(type)) {
return "\""+val+"\"";
- else if ("DateDaysSince[0]".equalsIgnoreCase(type))
+ } else if ("DateDaysSince[0]".equalsIgnoreCase(type)) {
return val;
- else if ("DateDaysSince[1960]".equalsIgnoreCase(type))
+ } else if ("DateDaysSince[1960]".equalsIgnoreCase(type)) {
return val;
- else if ("DateDaysSince[1970]".equalsIgnoreCase(type))
+ } else if ("DateDaysSince[1970]".equalsIgnoreCase(type)) {
return val;
- else if ("DateDaysSince[1980]".equalsIgnoreCase(type))
+ } else if ("DateDaysSince[1980]".equalsIgnoreCase(type)) {
return val;
- else if ("TimeSeconds".equalsIgnoreCase(type))
+ } else if ("TimeSeconds".equalsIgnoreCase(type)) {
return val;
- else if ("DateTimeSecondsSince[0]".equalsIgnoreCase(type))
+ } else if ("DateTimeSecondsSince[0]".equalsIgnoreCase(type)) {
return val;
- else if ("DateTimeSecondsSince[1960]".equalsIgnoreCase(type))
+ } else if ("DateTimeSecondsSince[1960]".equalsIgnoreCase(type)) {
return val;
- else if ("DateTimeSecondsSince[1970]".equalsIgnoreCase(type))
+ } else if ("DateTimeSecondsSince[1970]".equalsIgnoreCase(type)) {
return val;
- else if ("DateTimeSecondsSince[1980]".equalsIgnoreCase(type))
+ } else if ("DateTimeSecondsSince[1980]".equalsIgnoreCase(type)) {
return val;
- else
+ } else {
return val;
+ }
}
@@ -740,6 +740,8 @@ then
retract($map);
end
+
+
//******************************************************************************************************************
// Aggregations
//
View
21 drools-pmml/pom.xml
@@ -18,26 +18,27 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.drools</groupId>
- <artifactId>drools-multiproject</artifactId>
- <version>5.2.0-SNAPSHOT</version>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
<groupId>org.drools</groupId>
- <artifactId>drools-pmml</artifactId>
+ <artifactId>drools-chance</artifactId>
+ <version>5.3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>drools-pmml</artifactId>
<packaging>pom</packaging>
-
+
<name>Drools :: PMML</name>
+ <description> Predictive Model Evaluation </description>
<modules>
<module>drools-pmml-compiler</module>
<module>drools-pmml-test</module>
</modules>
-
+
+
</project>

0 comments on commit 13d2234

Please sign in to comment.