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

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


        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 ) );
        final ConstraintNode c3 = new ConstraintNodeImpl( "gender",
                                                          "==",
                                                          new StringValue( "Male" ) );
        model.setRoot( type );
        type.getChildren().add( c1 );
        type.getChildren().add( c2 );
        type.getChildren().add( c3 );
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( "name",
                                                          "==",
                                                          new StringValue( "Fred" ) );
        final ConstraintNode c3 = new ConstraintNodeImpl( "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.getChildren().add( c1 );
View Full Code Here

        model.setTreeName( "test" );

        final TypeNode type1 = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final TypeNode type2 = new TypeNodeImpl( "Address" );
        final ConstraintNode c2 = new ConstraintNodeImpl( "country",
                                                          "==",
                                                          new StringValue( "England" ) );
        model.setRoot( type1 );
        type1.getChildren().add( c1 );
        c1.getChildren().add( type2 );
        type2.getChildren().add( c2 );
View Full Code Here

        model.setTreeName( "test" );

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

        model.setTreeName( "test" );

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

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

    }

    private StringBuilder getConstraintNodeValueText( 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

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.