org.drools.decisiontable
Class DecisionTableLoader

java.lang.Object
  extended by org.drools.decisiontable.DecisionTableLoader

public final class DecisionTableLoader
extends java.lang.Object


Method Summary
static RuleBase loadFromCSVInputStream(java.io.InputStream streamToCSV)
          Load a rulebase from a decision table spreadsheet in CSV format.
static RuleBase loadFromInputStream(java.io.InputStream streamToSpreadsheet)
          Load a rulebase from a decision table spreadsheet.
static RuleBase loadFromInputStream(java.io.InputStream streamToSpreadsheet, InputType inputType)
          Load a rulebase from a decision table spreadsheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadFromInputStream

public static RuleBase loadFromInputStream(java.io.InputStream streamToSpreadsheet)
                                    throws IntegrationException,
                                           org.xml.sax.SAXException,
                                           java.io.IOException
Load a rulebase from a decision table spreadsheet. This will use the first worksheet in the spreadsheet file as the source of all decision tables.

Parameters:
streamToSpreadsheet - Stream to a excel 97 compatable workbook (from Excel, or Open Office).
Returns:
A drools RuleBase, ready to go.
Throws:
java.io.IOException
org.xml.sax.SAXException
IntegrationException - This may also throw a DecisionTableParseException if there is some problem parsing the decision table (before building the rulebase).

loadFromCSVInputStream

public static RuleBase loadFromCSVInputStream(java.io.InputStream streamToCSV)
                                       throws IntegrationException,
                                              org.xml.sax.SAXException,
                                              java.io.IOException
Load a rulebase from a decision table spreadsheet in CSV format.

Parameters:
streamToCSV - Stream to CSV input.
Returns:
A drools RuleBase, ready to go.
Throws:
java.io.IOException
org.xml.sax.SAXException
IntegrationException - This may also throw a DecisionTableParseException if there is some problem parsing the decision table (before building the rulebase).

loadFromInputStream

public static RuleBase loadFromInputStream(java.io.InputStream streamToSpreadsheet,
                                           InputType inputType)
                                    throws IntegrationException,
                                           org.xml.sax.SAXException,
                                           java.io.IOException
Load a rulebase from a decision table spreadsheet.

Parameters:
streamToSpreadsheet - Format is as indicated (CSV or XLS 97 format).
Returns:
A drools RuleBase, ready to go.
Throws:
java.io.IOException
org.xml.sax.SAXException
IntegrationException - This may also throw a DecisionTableParseException if there is some problem parsing the decision table (before building the rulebase).