Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.InterpolationVariable


    }

    private void visitActionFieldList( final ActionSetField afl ) {
        String factType = model.getLHSBindingType( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            InterpolationVariable var = new InterpolationVariable( afv.getValue(),
                                                                   afv.getType(),
                                                                   factType,
                                                                   afv.getField() );
            if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.contains( var ) ) {
                vars.add( var );
View Full Code Here


    }

    private void visitActionFieldList( final ActionUpdateField afl ) {
        String factType = model.getLHSBindingType( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            InterpolationVariable var = new InterpolationVariable( afv.getValue(),
                                                                   afv.getType(),
                                                                   factType,
                                                                   afv.getField() );
            if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.contains( var ) ) {
                vars.add( var );
View Full Code Here

            }
        }
    }

    private void visitSingleFieldConstraint( final SingleFieldConstraint sfc ) {
        final InterpolationVariable var = new InterpolationVariable( sfc.getValue(),
                                                                     sfc.getFieldType(),
                                                                     ( factPattern == null ? "" : factPattern.getFactType() ),
                                                                     sfc.getFieldName() );
        if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == sfc.getConstraintValueType() && !vars.contains( var ) ) {
            vars.add( var );
        } else {
            hasNonTemplateOutput = true;
        }

        //Visit Connection constraints
        if ( sfc.getConnectives() != null ) {
            for ( int i = 0; i < sfc.getConnectives().length; i++ ) {
                final ConnectiveConstraint cc = sfc.getConnectives()[ i ];
                InterpolationVariable ccVar = new InterpolationVariable( cc.getValue(),
                                                                         cc.getFieldType(),
                                                                         ( factPattern == null ? "" : factPattern.getFactType() ),
                                                                         cc.getFieldName() );
                if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.contains( ccVar ) ) {
                    vars.add( ccVar );
View Full Code Here

        final String genericType = sfexp.getExpressionLeftSide().getGenericType();
        String factType = sfexp.getExpressionLeftSide().getPreviousClassType();
        if ( factType == null ) {
            factType = sfexp.getExpressionLeftSide().getClassType();
        }
        final InterpolationVariable var = new InterpolationVariable( sfexp.getValue(),
                                                                     genericType,
                                                                     factType,
                                                                     sfexp.getFieldName() );
        if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == sfexp.getConstraintValueType() && !vars.contains( var ) ) {
            vars.add( var );
        } else {
            hasNonTemplateOutput = true;
        }

        //Visit Connection constraints
        if ( sfexp.getConnectives() != null ) {
            for ( int i = 0; i < sfexp.getConnectives().length; i++ ) {
                final ConnectiveConstraint cc = sfexp.getConnectives()[ i ];
                InterpolationVariable ccVar = new InterpolationVariable( cc.getValue(),
                                                                         genericType,
                                                                         factType,
                                                                         cc.getFieldName() );
                if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.contains( ccVar ) ) {
                    vars.add( ccVar );
View Full Code Here

                int targetRowIndex = originRowIndex + iRow;
                for ( int iCol = 0; iCol < rowData.size(); iCol++ ) {
                    int targetColumnIndex = originColumnIndex + iCol;
                    CellValue<? extends Comparable<?>> changedCell = rowData.get( iCol );

                    InterpolationVariable var = vars[ targetColumnIndex ];
                    TemplateDataColumn col = new TemplateDataColumn( var.getVarName(),
                                                                     var.getDataType(),
                                                                     var.getFactType(),
                                                                     var.getFactField() );

                    String dcv = cellValueFactory.convertToModelCell( col,
                                                                      changedCell );

                    List<String> columnData = model.getTable().get( var.getVarName() );
                    columnData.set( targetRowIndex,
                                    dcv );
                }
            }
        }
View Full Code Here

                                    pos + 2 );
            if ( end != -1 ) {
                String varName = text.substring( pos + 2,
                                                 end );
                pos = end + 1;
                InterpolationVariable var = new InterpolationVariable( varName,
                                                                       DataType.TYPE_OBJECT );
                if ( !vars.containsKey( var ) ) {
                    vars.put( var,
                              vars.size() );
                }
View Full Code Here

    //ActionInsertFact, ActionSetField, ActionpdateField
    private void visitActionFieldList( ActionInsertFact afl ) {
        String factType = afl.getFactType();
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            InterpolationVariable var = new InterpolationVariable( afv.getValue(),
                                                                   afv.getType(),
                                                                   factType,
                                                                   afv.getField() );
            if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey( var ) ) {
                vars.put( var,
View Full Code Here

    }

    private void visitActionFieldList( ActionSetField afl ) {
        String factType = model.getLHSBindingType( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            InterpolationVariable var = new InterpolationVariable( afv.getValue(),
                                                                   afv.getType(),
                                                                   factType,
                                                                   afv.getField() );
            if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey( var ) ) {
                vars.put( var,
View Full Code Here

    }

    private void visitActionFieldList( ActionUpdateField afl ) {
        String factType = model.getLHSBindingType( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            InterpolationVariable var = new InterpolationVariable( afv.getValue(),
                                                                   afv.getType(),
                                                                   factType,
                                                                   afv.getField() );
            if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey( var ) ) {
                vars.put( var,
View Full Code Here

            }
        }
    }

    private void visitSingleFieldConstraint( SingleFieldConstraint sfc ) {
        InterpolationVariable var = new InterpolationVariable( sfc.getValue(),
                                                               sfc.getFieldType(),
                                                               ( factPattern == null ? "" : factPattern.getFactType() ),
                                                               sfc.getFieldName() );
        if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == sfc.getConstraintValueType() && !vars.containsKey( var ) ) {
            vars.put( var,
                      vars.size() );
        }

        //Visit Connection constraints
        if ( sfc.getConnectives() != null ) {
            for ( int i = 0; i < sfc.getConnectives().length; i++ ) {
                final ConnectiveConstraint cc = sfc.getConnectives()[ i ];
                InterpolationVariable ccVar = new InterpolationVariable( cc.getValue(),
                                                                         cc.getFieldType(),
                                                                         ( factPattern == null ? "" : factPattern.getFactType() ),
                                                                         cc.getFieldName() );
                if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.containsKey( ccVar ) ) {
                    vars.put( ccVar,
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.InterpolationVariable

Copyright © 2018 www.massapicom. 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.