[jboss-svn-commits] JBL Code SVN: r24272 - in labs/jbossrules/trunk: drools-api/src/main/java/org/drools/builder and 12 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Dec 7 00:12:09 EST 2008
Author: mark.proctor at jboss.com
Date: 2008-12-07 00:12:08 -0500 (Sun, 07 Dec 2008)
New Revision: 24272
Modified:
labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/DecisionTableConfiguration.java
labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java
labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java
labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatefulKnowledgeSession.java
labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatelessKnowledgeSession.java
labs/jbossrules/trunk/drools-api/src/main/java/overview.html
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/FibonacciExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/GolfingExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HelloWorldExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HonestPoliticianExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/NumberGuessExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PetStore.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PricingRuleDTExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ShoppingExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/cdss/CDSSExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/process/order/OrderExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ruleflow/WorkItemExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExample.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExampleWithDSL.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketWithDT.java
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/tutorials/banking/RuleRunner.java
Log:
JBRULES-1874 Create Resource Framework
-Rename KnowledgeType to ResourceTye
Modified: labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/DecisionTableConfiguration.java
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/DecisionTableConfiguration.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/DecisionTableConfiguration.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -14,7 +14,7 @@
* dtconf.setInputType( DecisionTableInputType.XLS );
* dtconf.setWorksheetName( "Tables_2" );
* kbuilder.add( ResourceFactory.newUrlResource( "file://IntegrationExampleTest.xls" ),
- * KnowledgeType.DTABLE,
+ * ResourceType.DTABLE,
* dtconf );
* assertFalse( kbuilder.hasErrors() );
* KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
Modified: labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -11,7 +11,7 @@
* <p>
* The KnowledgeBuilder is responsible for taking source files, such as a .drl file or an xls file,
* and turning them into a KnowledgePackage of rule and process definitions which a KnowledgeBase
- * can consume. It uses the KnowledgeType enum to tell it the type of the resource it is being asked to build.
+ * can consume. It uses the ResourceType enum to tell it the type of the resource it is being asked to build.
* </p>
*
* <p>
@@ -32,7 +32,7 @@
* <pre>
* KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
* kbuilder.add( ResourceFactory.newUrlResource( "file://myrules.drl" ),
- * KnowledgeType.DRL);
+ * ResourceType.DRL);
* assertFalse( kbuilder.hasErrors() );
* KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
* </pre>
@@ -46,7 +46,7 @@
* dtconf.setInputType( DecisionTableInputType.XLS );
* dtconf.setWorksheetName( "Tables_2" );
* kbuilder.add( ResourceFactory.newUrlResource( "file://IntegrationExampleTest.xls" ),
- * KnowledgeType.DTABLE,
+ * ResourceType.DTABLE,
dtconf );
* assertFalse( kbuilder.hasErrors() );
* KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
@@ -58,7 +58,7 @@
* <pre>
* KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
* kbuilder.add( ResourceFactory.newUrlResource( "file://myflow.rf" ),
- * KnowledgeType.DRF);
+ * ResourceType.DRF);
* assertFalse( kbuilder.hasErrors() );
* KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
* </pre>
@@ -78,7 +78,7 @@
ProcessBuilder {
/**
- * A a resource of the KnowledgeType from a given URL.
+ * A a resource of the ResourceType from a given URL.
*
* @param url
* @param type
@@ -87,7 +87,7 @@
ResourceType type);
/**
- * A a resource of the KnowledgeType from a given URL, using the provided ResourceConfiguration.
+ * A a resource of the ResourceType from a given URL, using the provided ResourceConfiguration.
* Currently only only decision tables use this, via the DecisionTableResourceConfiguration class.
*/
void add(Resource resource,
Modified: labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -77,7 +77,7 @@
* dtconf.setInputType( DecisionTableInputType.XLS );
* dtconf.setWorksheetName( "Tables_2" );
* kbuilder.add( new URL( "file://IntegrationExampleTest.xls" ),
- * KnowledgeType.DTABLE,
+ * ResourceType.DTABLE,
* dtconf );
* assertFalse( kbuilder.hasErrors() );
* KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
Modified: labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatefulKnowledgeSession.java
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatefulKnowledgeSession.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatefulKnowledgeSession.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -15,7 +15,7 @@
* </p>
* <pre>
* KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- * kbuilder.add( ResourceFactory.newFileSystemResource( fileName ), KnowledgeType.DRL );
+ * kbuilder.add( ResourceFactory.newFileSystemResource( fileName ), ResourceType.DRL );
* assertFalse( kbuilder.hasErrors() );
* if (kbuilder.hasErrors() ) {
* System.out.println( kbuilder.getErrors() );
Modified: labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatelessKnowledgeSession.java
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatelessKnowledgeSession.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/org/drools/runtime/StatelessKnowledgeSession.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -16,7 +16,7 @@
* </p>
* <pre>
* KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- * kbuilder.add( ResourceFactory.newFileSystemResource( fileName ), KnowledgeType.DRL );
+ * kbuilder.add( ResourceFactory.newFileSystemResource( fileName ), ResourceType.DRL );
* assertFalse( kbuilder.hasErrors() );
* if (kbuilder.hasErrors() ) {
* System.out.println( kbuilder.getErrors() );
Modified: labs/jbossrules/trunk/drools-api/src/main/java/overview.html
===================================================================
--- labs/jbossrules/trunk/drools-api/src/main/java/overview.html 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-api/src/main/java/overview.html 2008-12-07 05:12:08 UTC (rev 24272)
@@ -31,7 +31,7 @@
<pre>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.addResource( ResourceFactory.newUrlResource( url ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
if ( kbuilder.hasErrors() ) {
System.err.println( builder.getErrors().toString() );
}
@@ -48,11 +48,11 @@
</p>
<p>
-A Typical example to load a process resource. Notice the KnowledgeType is changed, in accordance with the Resource type.
+A Typical example to load a process resource. Notice the ResourceType is changed, in accordance with the Resource type.
<pre>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.addResource( ResourceFactory.newUrlResource( url ),
- KnowledgeType.DRF );
+ ResourceType.DRF );
if ( kbuilder.hasErrors() ) {
System.err.println( builder.getErrors().toString() );
}
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -18,7 +18,7 @@
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderConfiguration;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -43,7 +43,7 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder( kbuilderConfig );
kbuilder.add( ResourceFactory.newClassPathResource( "manners.drl",
MannersBenchmark.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
// add the package to a rulebase
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltz/WaltzBenchmark.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -27,7 +27,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -42,7 +42,7 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "waltz.drl",
WaltzBenchmark.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
//add the package to a kbase
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -14,7 +14,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -28,7 +28,7 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "waltzdb.drl",
WaltzDbBenchmark.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
KnowledgeBaseConfiguration kbaseConfiguration = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/FibonacciExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/FibonacciExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/FibonacciExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -17,7 +17,7 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "Fibonacci.drl",
FibonacciExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/GolfingExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/GolfingExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/GolfingExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -18,7 +18,7 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "golf.drl",
GolfingExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HelloWorldExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HelloWorldExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HelloWorldExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -8,7 +8,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
@@ -26,7 +26,7 @@
//this will parse and compile in one step
kbuilder.add( ResourceFactory.newClassPathResource( "HelloWorld.drl",
HelloWorldExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
// Check the builder for errors
if ( kbuilder.hasErrors() ) {
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HonestPoliticianExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HonestPoliticianExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/HonestPoliticianExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -5,7 +5,7 @@
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderConfiguration;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -25,7 +25,7 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "HonestPolitician.drl",
HonestPoliticianExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/NumberGuessExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/NumberGuessExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/NumberGuessExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -6,7 +6,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -18,10 +18,10 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "NumberGuess.drl",
ShoppingExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
kbuilder.add( ResourceFactory.newClassPathResource( "NumberGuess.rf",
ShoppingExample.class ),
- KnowledgeType.DRF );
+ ResourceType.DRF );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PetStore.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PetStore.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PetStore.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -31,7 +31,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -43,7 +43,7 @@
kbuilder.add( ResourceFactory.newClassPathResource( "PetStore.drl",
PetStore.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PricingRuleDTExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PricingRuleDTExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/PricingRuleDTExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -8,7 +8,7 @@
import org.drools.builder.DecisionTableInputType;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.examples.decisiontable.Driver;
import org.drools.examples.decisiontable.Policy;
import org.drools.io.ResourceFactory;
@@ -32,7 +32,7 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "ExamplePolicyPricing.xls", getClass() ),
- KnowledgeType.DTABLE,
+ ResourceType.DTABLE,
dtableconfiguration );
if ( kbuilder.hasErrors() ) {
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ShoppingExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ShoppingExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ShoppingExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.FactHandle;
@@ -14,7 +14,7 @@
public static final void main(String[] args) throws Exception {
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "Shopping.drl", ShoppingExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/cdss/CDSSExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/cdss/CDSSExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/cdss/CDSSExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -6,7 +6,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.examples.cdss.data.Diagnose;
import org.drools.examples.cdss.data.Patient;
import org.drools.examples.cdss.data.Recommendation;
@@ -81,19 +81,19 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "/org/drools/examples/cdss/GenericRules.drl", CDSSExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
kbuilder.add( ResourceFactory.newClassPathResource( "/org/drools/examples/cdss/GenericRules.drl", CDSSExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
kbuilder.add( ResourceFactory.newClassPathResource( "/org/drools/examples/cdss/ClinicalPathwayX.rf", CDSSExample.class ),
- KnowledgeType.DRF );
+ ResourceType.DRF );
kbuilder.add( ResourceFactory.newClassPathResource( "/org/drools/examples/cdss/TreatmentX.rf", CDSSExample.class ),
- KnowledgeType.DRF );
+ ResourceType.DRF );
kbuilder.add( ResourceFactory.newClassPathResource( "/org/drools/examples/cdss/TreatmentY.rf", CDSSExample.class ) ,
- KnowledgeType.DRF );
+ ResourceType.DRF );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -18,7 +18,7 @@
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "conway-agendagroup.drl",
getClass() ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -14,10 +14,10 @@
public RuleFlowDelegate() {
try {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- kbuilder.add( ResourceFactory.newClassPathResource( "conway-ruleflow.drl",getClass()), KnowledgeType.DRL );
- kbuilder.add( ResourceFactory.newClassPathResource( "generation.rf",getClass()), KnowledgeType.DRF );
- kbuilder.add( ResourceFactory.newClassPathResource( "killAll.rf",getClass()), KnowledgeType.DRF );
- kbuilder.add( ResourceFactory.newClassPathResource( "registerNeighbor.rf",getClass()), KnowledgeType.DRF );
+ kbuilder.add( ResourceFactory.newClassPathResource( "conway-ruleflow.drl",getClass()), ResourceType.DRL );
+ kbuilder.add( ResourceFactory.newClassPathResource( "generation.rf",getClass()), ResourceType.DRF );
+ kbuilder.add( ResourceFactory.newClassPathResource( "killAll.rf",getClass()), ResourceType.DRF );
+ kbuilder.add( ResourceFactory.newClassPathResource( "registerNeighbor.rf",getClass()), ResourceType.DRF );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/process/order/OrderExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/process/order/OrderExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/process/order/OrderExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -24,7 +24,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -215,7 +215,7 @@
try {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(
- "logging.drl", OrderExample.class), KnowledgeType.DRL );
+ "logging.drl", OrderExample.class), ResourceType.DRL );
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
} catch (Throwable t) {
t.printStackTrace();
@@ -249,17 +249,17 @@
private static KnowledgeBase createKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(
- "RuleSetExample.rf", OrderExample.class), KnowledgeType.DRF );
+ "RuleSetExample.rf", OrderExample.class), ResourceType.DRF );
kbuilder.add(ResourceFactory.newClassPathResource(
- "workflow_rules.drl", OrderExample.class), KnowledgeType.DRL );
+ "workflow_rules.drl", OrderExample.class), ResourceType.DRL );
kbuilder.add(ResourceFactory.newClassPathResource(
- "validation.drl", OrderExample.class), KnowledgeType.DRL );
+ "validation.drl", OrderExample.class), ResourceType.DRL );
kbuilder.add(ResourceFactory.newClassPathResource(
- "assignment.dsl", OrderExample.class), KnowledgeType.DSL );
+ "assignment.dsl", OrderExample.class), ResourceType.DSL );
kbuilder.add(ResourceFactory.newClassPathResource(
- "assignment.dslr", OrderExample.class), KnowledgeType.DSLR );
+ "assignment.dslr", OrderExample.class), ResourceType.DSLR );
kbuilder.add(ResourceFactory.newClassPathResource(
- "discount.drl", OrderExample.class), KnowledgeType.DRL );
+ "discount.drl", OrderExample.class), ResourceType.DRL );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
return kbase;
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ruleflow/WorkItemExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ruleflow/WorkItemExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/ruleflow/WorkItemExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.WorkItem;
@@ -42,7 +42,7 @@
private static KnowledgeBase readRule() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "workitems.rf", WorkItemExample.class ),
- KnowledgeType.DRF );
+ ResourceType.DRF );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -11,7 +11,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
public class DroolsUtil {
@@ -40,7 +40,7 @@
//this will parse and compile in one step
kbuilder.add( ResourceFactory.newClassPathResource( drlFileName,DroolsSudokuGridModel.class),
- KnowledgeType.DRL );
+ ResourceType.DRL );
//Use the following instead of above if you are using a DSL:
//builder.addPackageFromDrl( source, dsl );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExample.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExample.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExample.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -21,7 +21,7 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "TroubleTicket.drl",
TroubleTicketExample.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExampleWithDSL.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExampleWithDSL.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketExampleWithDSL.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -4,7 +4,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -22,10 +22,10 @@
kbuilder.add( ResourceFactory.newClassPathResource( "ticketing.dsl",
TroubleTicketExampleWithDSL.class ),
- KnowledgeType.DSL );
+ ResourceType.DSL );
kbuilder.add( ResourceFactory.newClassPathResource( "TroubleTicketWithDSL.dslr",
TroubleTicketExampleWithDSL.class ),
- KnowledgeType.DSLR );
+ ResourceType.DSLR );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketWithDT.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketWithDT.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/troubleticket/TroubleTicketWithDT.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -6,7 +6,7 @@
import org.drools.builder.DecisionTableInputType;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
@@ -30,7 +30,7 @@
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "TroubleTicket.xls", TroubleTicketWithDT.class ),
- KnowledgeType.DTABLE,
+ ResourceType.DTABLE,
dtableconfiguration );
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/tutorials/banking/RuleRunner.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/tutorials/banking/RuleRunner.java 2008-12-07 05:07:05 UTC (rev 24271)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/tutorials/banking/RuleRunner.java 2008-12-07 05:12:08 UTC (rev 24272)
@@ -6,7 +6,7 @@
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
-import org.drools.builder.KnowledgeType;
+import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -27,7 +27,7 @@
System.out.println( "Loading file: " + ruleFile );
kbuilder.add( ResourceFactory.newClassPathResource( ruleFile,
RuleRunner.class ),
- KnowledgeType.DRL );
+ ResourceType.DRL );
}
Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();
More information about the jboss-svn-commits
mailing list