Examples of TypeNode


Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree expected = new GuidedDecisionTree();
        expected.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        expected.setRoot( type );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree expected = new GuidedDecisionTree();
        expected.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        expected.setRoot( type );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end \n";

        final GuidedDecisionTree expected = new GuidedDecisionTree();
        expected.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        expected.setRoot( type );

        addModelField( "Person",
                       "this",
                       "Person",
                       DataType.TYPE_THIS );
        addModelField( "Cheese",
                       "this",
                       "Cheese",
                       DataType.TYPE_THIS );

        final GuidedDecisionTree model = GuidedDecisionTreeDRLPersistence.getInstance().unmarshal( drl1 + drl2,
                                                                                                   "test",
                                                                                                   dmo );

        assertNotNull( model );
        assertEquals( expected.getTreeName(),
                      model.getTreeName() );

        assertNotNull( model.getRoot() );
        assertEquals( type.getClassName(),
                      model.getRoot().getClassName() );
        assertFalse( model.getRoot().isBound() );

        assertEquals( 0,
                      model.getRoot().getChildren().size() );
View Full Code Here

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        model.setRoot( type );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

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

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "name" );
        model.setRoot( type );
        type.addChild( c1 );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "Person",
                                                          "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.addChild( c1 );
        c1.addChild( c2 );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "Person",
                                                          "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.addChild( c1 );
        type.addChild( c2 );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "Person",
                                                          "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        final ConstraintNode c3 = new ConstraintNodeImpl( "Person",
                                                          "gender",
                                                          "==",
                                                          new StringValue( "Male" ) );
        model.setRoot( type );
        type.addChild( c1 );
        type.addChild( c2 );
        type.addChild( c3 );

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

Examples of org.drools.workbench.models.guided.dtree.shared.model.nodes.TypeNode

                "end";

        final GuidedDecisionTree model = new GuidedDecisionTree();
        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "name",
                                                          "==",
                                                          new StringValue( "Michael" ) );
        final ConstraintNode c2 = new ConstraintNodeImpl( "Person",
                                                          "name",
                                                          "==",
                                                          new StringValue( "Fred" ) );
        final ConstraintNode c3 = new ConstraintNodeImpl( "Person",
                                                          "age",
                                                          "==",
                                                          new IntegerValue( 41 ) );
        model.setRoot( type );
        type.addChild( c1 );
        type.addChild( c2 );
        c2.addChild( c3 );

        final String drl = GuidedDecisionTreeDRLPersistence.getInstance().marshal( model );
        assertEqualsIgnoreWhitespace( expected,
                                      drl );
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.