Examples of SpreadsheetCompiler


Examples of org.drools.decisiontable.SpreadsheetCompiler

        builder.addRuleFlow(instream);
      } else if (fileName.endsWith(DroolsCompilerAntTask.XMLFILEEXTENSION)) {
        builder.addPackageFromXml(instream);
            } else if (fileName.equals(DroolsCompilerAntTask.XLSFILEEXTENSION)) {

                final SpreadsheetCompiler converter = new SpreadsheetCompiler();
                final String drl = converter.compile( new FileInputStream(file),
                                                      InputType.XLS );


                System.out.println(drl);
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

   * @param file
   * @return
   * @throws FileNotFoundException
   */
  public static String compileDTabletoDRL(File file, InputType type) throws FileNotFoundException{
    SpreadsheetCompiler compiler=new SpreadsheetCompiler();
    return compiler.compile(new FileInputStream(file), type);
  }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

          .endsWith(DroolsCompilerAntTask.XMLFILEEXTENSION)) {
        builder.addPackageFromXml(instream);
      } else if (fileName
          .endsWith(DroolsCompilerAntTask.XLSFILEEXTENSION)) {

        final SpreadsheetCompiler converter = new SpreadsheetCompiler();
        final String drl = converter.compile(new FileInputStream(file),
            InputType.XLS);

        System.out.println(drl);

        builder.addPackageFromDrl(new StringReader(drl));
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

    private List<DroolsBuildMarker> parseXLSFile(final IFile file) {
        return parseResource( new ResourceParser() {
            public DRLInfo parseResource() throws DroolsParserException,
                                          DecisionTableParseException,
                                          CoreException {
                SpreadsheetCompiler converter = new SpreadsheetCompiler();
                String drl = converter.compile( file.getContents(), InputType.XLS );
                return DroolsEclipsePlugin.getDefault().parseXLSResource( drl, file );
            }
        } );
    }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

    private List<DroolsBuildMarker> parseCSVFile(final IFile file) {
        return parseResource( new ResourceParser() {
            public DRLInfo parseResource() throws DroolsParserException,
                                          CoreException {
                SpreadsheetCompiler converter = new SpreadsheetCompiler();
                String drl = converter.compile( file.getContents(), InputType.CSV );
                return DroolsEclipsePlugin.getDefault().parseXLSResource( drl, file );
            }
        } );
    }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

    public String getRawDRL(AssetItem asset) {
        return getDRL(asset.getBinaryContentAttachment());
    }

    private String getDRL(InputStream stream) {
        SpreadsheetCompiler comp = new SpreadsheetCompiler();
        String drl = comp.compile(false,
                stream,
                InputType.XLS);
        return drl;
    }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

    public String getRawDRL(AssetItem asset) {
        return getDRL( asset.getBinaryContentAttachment() );
    }

    private String getDRL(InputStream stream) {
        SpreadsheetCompiler comp = new SpreadsheetCompiler();
        String drl = comp.compile( false,
                                   stream,
                                   InputType.XLS );
        return drl;
    }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

            if ( source == null ) {
                // support legacy name
                source = ( String ) properties.get( "source" );
            }
            if ( source != null && source.equals( Constants.RES_SOURCE_TYPE_DECISION_TABLE ) ) {
                final SpreadsheetCompiler converter = new SpreadsheetCompiler();
                final String drl = converter.compile( ruleExecutionSetStream,
                                                      InputType.XLS );
                return createRuleExecutionSet( new StringReader( drl ), properties );
            } else {
                return createRuleExecutionSet( new InputStreamReader( ruleExecutionSetStream ), properties);
            }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

    public String getRawDRL(AssetItem asset) {
        return getDRL(asset.getBinaryContentAttachment());
    }

    private String getDRL(InputStream stream) {
        SpreadsheetCompiler comp = new SpreadsheetCompiler();
        return comp.compile(false,
                stream,
                InputType.XLS);
    }
View Full Code Here

Examples of org.drools.decisiontable.SpreadsheetCompiler

            if ( source == null ) {
                // support legacy name
                source = ( String ) properties.get( "source" );
            }
            if ( source != null && source.equals( Constants.RES_SOURCE_TYPE_DECISION_TABLE ) ) {
                final SpreadsheetCompiler converter = new SpreadsheetCompiler();
                final String drl = converter.compile( ruleExecutionSetStream,
                                                      InputType.XLS );
                return createRuleExecutionSet( new StringReader( drl ), properties );
            } else {
                return createRuleExecutionSet( new InputStreamReader( ruleExecutionSetStream ), properties);               
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.