Example #1
0
 public void Load(Stream stream)
 {
     //FileInputStream stream = new FileInputStream(filePath);
     java.io.InputStream _javaStream = DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream);
     java.io.ObjectInput objInp      = new java.io.ObjectInputStream(_javaStream);
     ((ReteooRuleBase)this._javaRuleBase).readExternal(objInp);
     _javaStream.close();
 }
Example #2
0
        public void Load(Stream stream)
        {
            //FileInputStream stream = new FileInputStream(filePath);
            java.io.InputStream _javaStream = DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream);
            ObjectInput         objInp      = new ObjectInputStream(_javaStream);

            this._javaPackage.readExternal(objInp);
            _javaStream.close();
        }
Example #3
0
        public string Compile(System.IO.Stream stream, int inType)
        {
            switch (inType)
            {
            case InputType.CSV:
                return(_javaSpreadsheetCompiler.compile(DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream), org.drools.decisiontable.InputType.CSV));

            case InputType.XLS:
                return(_javaSpreadsheetCompiler.compile(DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream), org.drools.decisiontable.InputType.XLS));

            default:
                return(null);
            }
        }
Example #4
0
 public void AddPackageFromXml(System.IO.Stream xmlStream)
 {
     _javaPackageBuilder.addPackageFromXml(DroolsDotnetUtil.getJavaStringReaderFromSystemStream(xmlStream));
 }
Example #5
0
 public void AddPackageFromDrl(System.IO.Stream drlStream, System.IO.Stream dslStream)
 {
     _javaPackageBuilder.addPackageFromDrl(DroolsDotnetUtil.getJavaStringReaderFromSystemStream(drlStream), DroolsDotnetUtil.getJavaStringReaderFromSystemStream(dslStream));
 }
Example #6
0
 public void AddPackageFromDrl(string fileName, System.IO.Stream drlStream)
 {
     _javaPackageBuilder.addPackageFromDrl(fileName, DroolsDotnetUtil.getJavaStringReaderFromSystemStream(drlStream));
 }
Example #7
0
 public string Compile(System.IO.Stream stream, string sheetName)
 {
     return(_javaSpreadsheetCompiler.compile(DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream), sheetName));
 }
Example #8
0
 /**
  * Create a new RuleBase from the drl and dsl source.
  * Uses the current default engine type.
  */
 public RuleBase loadFromStream(Stream drl,
                                Stream dsl)
 {
     return(new RuleBase(_javaRuleBaseLoader.loadFromReader(
                             DroolsDotnetUtil.getJavaStringReaderFromSystemStream(drl), DroolsDotnetUtil.getJavaStringReaderFromSystemStream(dsl))));
 }