Package org.drools.workbench.models.guided.dtree.shared.model.values.impl

Examples of org.drools.workbench.models.guided.dtree.shared.model.values.impl.StringValue


        final TypeNode type1 = new TypeNodeImpl( "Person" );
        final ConstraintNode c1a = new ConstraintNodeImpl( "Person",
                                                           "name",
                                                           "==",
                                                           new StringValue( "Michael" ) );
        final ConstraintNode c1b = new ConstraintNodeImpl( "Person",
                                                           "name",
                                                           "==",
                                                           new StringValue( "Fred" ) );
        final TypeNode type2 = new TypeNodeImpl( "Address" );
        final ConstraintNode c2a = new ConstraintNodeImpl( "Address",
                                                           "country",
                                                           "==",
                                                           new StringValue( "England" ) );
        final ConstraintNode c2b = new ConstraintNodeImpl( "Address",
                                                           "country",
                                                           "==",
                                                           new StringValue( "Norway" ) );
        expected.setRoot( type1 );
        type1.addChild( c1a );
        type1.addChild( c1b );
        c1a.addChild( type2 );
        type2.addChild( c2a );
View Full Code Here


        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "stringField",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        expected.setRoot( type );
        type.addChild( c1 );

        addModelField( "Person",
                       "this",
View Full Code Here

        final ActionUpdateNode action = new ActionUpdateNodeImpl( type );
        action.setModify( true );
        action.getFieldValues().add( new ActionFieldValueImpl( "age",
                                                               new IntegerValue( 25 ) ) );
        action.getFieldValues().add( new ActionFieldValueImpl( "name",
                                                               new StringValue( "Michael" ) ) );
        type.addChild( action );

        addModelField( "Person",
                       "this",
                       "Person",
View Full Code Here

        final ActionUpdateNode action = new ActionUpdateNodeImpl( type );
        action.setModify( false );
        action.getFieldValues().add( new ActionFieldValueImpl( "age",
                                                               new IntegerValue( 25 ) ) );
        action.getFieldValues().add( new ActionFieldValueImpl( "name",
                                                               new StringValue( "Michael" ) ) );
        type.addChild( action );

        addModelField( "Person",
                       "this",
                       "Person",
View Full Code Here

    }

    protected StringBuilder generateValueDRL( final Value value ) {
        final StringBuilder sb = new StringBuilder();
        if ( value instanceof StringValue ) {
            final StringValue sv = (StringValue) value;
            return sb.append( "\"" ).append( sv.getValue() ).append( "\"" );
        } else if ( value instanceof DateValue ) {
            final DateValue dv = (DateValue) value;
            return sb.append( "\"" ).append( DATE_FORMAT.format( dv.getValue() ) ).append( "\"" );
        }
        return sb.append( value.getValue() );
View Full Code Here

            //Mock code testing marshalling
            final GuidedDecisionTree model = GuidedDecisionTreeXMLPersistence.getInstance().unmarshal( content );
            final TypeNode type = new TypeNodeImpl( "Person" );
            final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                              "==",
                                                              new StringValue( "Michael" ) );
            final ConstraintNode c2 = new ConstraintNodeImpl( "age",
                                                              "==",
                                                              new IntegerValue( 41 ) );
            model.setRoot( type );
            type.getChildren().add( c1 );
View Full Code Here

            //Mock code testing marshalling
            final GuidedDecisionTree model = GuidedDecisionTreeXMLPersistence.getInstance().unmarshal( content );
            final TypeNode type = new TypeNodeImpl( "Person" );
            final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                              "==",
                                                              new StringValue( "Michael" ) );
            final ConstraintNode c2 = new ConstraintNodeImpl( "name",
                                                              "==",
                                                              new StringValue( "Fred" ) );
            final ConstraintNode c3 = new ConstraintNodeImpl( "age",
                                                              "==",
                                                              new IntegerValue( 20 ) );
            final ConstraintNode c4 = new ConstraintNodeImpl( "age",
                                                              "==",
View Full Code Here

        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        model.setRoot( type );
        type.getChildren().add( c1 );

        final String drl = GuidedDecisionTreeDRLPersistence.getInstance().marshal( model );
        assertEqualsIgnoreWhitespace( expected,
View Full Code Here

        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.getChildren().add( c1 );
View Full Code Here

        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.getChildren().add( c1 );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtree.shared.model.values.impl.StringValue

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.