| java.lang.Object org.drools.decisiontable.SpreadsheetCompiler
SpreadsheetCompiler | public class SpreadsheetCompiler (Code) | | author: Michael Neale author: This class handles the input XLS and CSV and extracts the rule DRL, ready for author: pumping into drools. |
compile | public String compile(org.drools.rule.Package pkg, InputStream xlsStream, InputType type)(Code) | | Generates DRL from the input stream containing the spreadsheet.
Parameters: pkg - Uses this package definition as the default definitions for the spreadsheet Parameters: xlsStream - The stream to the spreadsheet. Uses the first worksheet foundfor the decision tables, ignores others. DRL xml, ready for use in drools. |
compile | public String compile(InputStream xlsStream, InputType type)(Code) | | Generates DRL from the input stream containing the spreadsheet.
Parameters: xlsStream - The stream to the spreadsheet. Uses the first worksheet foundfor the decision tables, ignores others. DRL xml, ready for use in drools. |
compile | public String compile(InputStream xlsStream, InputType type, RuleSheetListener listener)(Code) | | Generates DRL from the input stream containing the spreadsheet.
Parameters: xlsStream - The stream to the spreadsheet. Uses the first worksheet foundfor the decision tables, ignores others. Parameters: type - The type of the file - InputType.CSV or InputType.XLS Parameters: listener - DRL xml, ready for use in drools. |
compile | public String compile(String classPathResource, InputType inputType)(Code) | | Convenience implementation, taking rules from the classpath. It is
recommended to use the stream version, as you can then change rules
dynamically. (that is a lot of the benefit of rule engines !).
Parameters: classPathResource - full class path to the spreadsheet you wish to convert to DRL.Uses the first worksheet for the decision tables. DRL. |
compile | public String compile(InputStream stream, String worksheetName)(Code) | | Looks for a named worksheet to find the decision tables on. Only works
with XLS format spreadsheets (as they have multiple worksheets).
Parameters: stream - The stream of the decision tables (spreadsheet) IN XLS format !! Parameters: worksheetName - The name of the worksheet that the decision tables live on. DRL, ready to go. |
|
|