Package org.drools.ide.common.client.modeldriven.brl

Examples of org.drools.ide.common.client.modeldriven.brl.ConnectiveConstraint


    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[0].fieldBinding = "qbc";
    cons[0].fieldType = "String";
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", "String", "&", "x");
    cons[0].connectives[0].constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    cons[1] = new SingleFieldConstraint("make");
    cons[1].fieldType = "Long";
    cons[1].connectives = new ConnectiveConstraint[1];
    cons[1].connectives[0] = new ConnectiveConstraint("make", "Long", "=", "2");
    cons[1].connectives[0].constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;


    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
View Full Code Here


    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[1] = new SingleFieldConstraint("make");
    cons[0].fieldBinding = "qbc";
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", null, "&", "x");
    cons[0].connectives[0].constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;

    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
    other.boundName = "q";
View Full Code Here

    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[0].fieldBinding = "qbc";
    cons[0].fieldType = "String";
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", "String", "&", "x");
    cons[0].connectives[0].constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    cons[1] = new SingleFieldConstraint("make");
    cons[1].fieldType = "Long";
    cons[1].connectives = new ConnectiveConstraint[1];
    cons[1].connectives[0] = new ConnectiveConstraint("make", "Long", "=", "2");
    cons[1].connectives[0].constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;

    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
    other.boundName = "q";
View Full Code Here

        cons[0] = new SingleFieldConstraint( "age" );
        cons[0].setFactType( "Car" );
        cons[0].setFieldType( "String" );
        cons[0].setFieldBinding( "qbc" );
        cons[0].connectives = new ConnectiveConstraint[1];
        cons[0].connectives[0] = new ConnectiveConstraint( "Car",
                                                           "age",
                                                           "String",
                                                           "&",
                                                           "x" );
        cons[0].connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cons[1] = new SingleFieldConstraint( "make" );
        cons[1].setFactType( "Car" );
        cons[1].setFieldType( "Long" );
        cons[1].connectives = new ConnectiveConstraint[1];
        cons[1].connectives[0] = new ConnectiveConstraint( "Car",
                                                           "make",
                                                           "Long",
                                                           "=",
                                                           "2" );
        cons[1].connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

        final SingleFieldConstraint con = new SingleFieldConstraint( "age" );
        con.setFactType( "Car" );
        con.setFieldType( "String" );
        con.setFieldBinding( "qbc" );
        con.connectives = new ConnectiveConstraint[1];
        con.connectives[0] = new ConnectiveConstraint( "Car",
                                                       "age",
                                                       "String",
                                                       "==",
                                                       "x" );
        con.connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

        cons[0] = new SingleFieldConstraint( "age" );
        cons[1] = new SingleFieldConstraint( "make" );
        cons[0].setFactType( "Car" );
        cons[0].setFieldBinding( "qbc" );
        cons[0].connectives = new ConnectiveConstraint[1];
        cons[0].connectives[0] = new ConnectiveConstraint( "Car",
                                                           "age",
                                                           null,
                                                           "&",
                                                           "x" );
        cons[0].connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

        cons[0] = new SingleFieldConstraint( "age" );
        cons[0].setFactType( "Car" );
        cons[0].setFieldType( "String" );
        cons[0].setFieldBinding( "qbc" );
        cons[0].connectives = new ConnectiveConstraint[1];
        cons[0].connectives[0] = new ConnectiveConstraint( "Car",
                                                           "age",
                                                           "String",
                                                           "&",
                                                           "x" );
        cons[0].connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cons[1] = new SingleFieldConstraint( "make" );
        cons[1].setFactType( "Car" );
        cons[1].setFieldType( "Long" );
        cons[1].connectives = new ConnectiveConstraint[1];
        cons[1].connectives[0] = new ConnectiveConstraint( "Car",
                                                           "make",
                                                           "Long",
                                                           "=",
                                                           "2" );
        cons[1].connectives[0].setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

        X.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        X.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        X.setValue( "foo" );
        X.setOperator( "==" );
        X.connectives = new ConnectiveConstraint[1];
        X.connectives[0] = new ConnectiveConstraint();
        X.connectives[0].setConstraintValueType( ConnectiveConstraint.TYPE_LITERAL );
        X.connectives[0].setFactType( "Goober" );
        X.connectives[0].setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        X.connectives[0].setOperator( "|| ==" );
        X.connectives[0].setValue( "bar" );
View Full Code Here

        con.setOperator( "==" );
        con.setValue( "goo" );
        con.setConstraintValueType( SingleFieldConstraint.TYPE_VARIABLE );
        p.addConstraint( con );

        ConnectiveConstraint connective = new ConnectiveConstraint();
        connective.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        connective.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        connective.setOperator( "|| ==" );
        connective.setValue( "blah" );

        con.connectives = new ConnectiveConstraint[1];
        con.connectives[0] = connective;

        m.addLhsItem( p );
View Full Code Here

            }

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

TOP

Related Classes of org.drools.ide.common.client.modeldriven.brl.ConnectiveConstraint

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.