Package org.drools.workbench.models.guided.dtree.shared.model.nodes

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


            }
        }

        //Combine Paths into a single tree.
        for ( GuidedDecisionTreeParserExtendedError ruleParserContent : rulesParserContent ) {
            Node activeModelNode = null;
            boolean error = !ruleParserContent.getMessages().isEmpty();
            for ( int index = 0; !error && index < ruleParserContent.getNodes().size(); index++ ) {
                final Node node = ruleParserContent.getNodes().get( index );
                switch ( index ) {
                    case 0:
                        if ( !( node instanceof TypeNode ) ) {
                            ruleParserContent.getMessages().add( new InvalidRootParserMessage() );
                            error = true;
View Full Code Here


            generateRuleDRL( path );
        }

        //Process children. Each child creates a new path through the tree
        while ( itr.hasNext() ) {
            final Node child = itr.next();
            final List<Node> subPath = new ArrayList<Node>( path );
            visit( subPath,
                   child );
        }
    }
View Full Code Here

                   child );
        }
    }

    protected void generateRuleDRL( final List<Node> path ) {
        Node context = null;
        final StringBuilder drl = new StringBuilder();
        final boolean hasDateFieldValue = hasDateFieldValue( path );
        this.varCounter = 0;

        drl.append( generateRuleHeaderDRL() );
View Full Code Here

                   child );
        }
    }

    protected void generateRuleDRL( final List<Node> path ) {
        Node context = null;
        final StringBuilder drl = new StringBuilder();
        drl.append( generateRuleHeaderDRL() );
        drl.append( "when\n" );
        for ( Node node : path ) {
            if ( node instanceof TypeNode ) {
View Full Code Here

    private void processChildren( final Coordinate c,
                                  final Node node ) {
        final int childCount = node.getChildren().size();
        for ( int childIndex = 0; childIndex < childCount; childIndex++ ) {
            final Node child = node.getChildren().get( childIndex );
            final Coordinate cc = new Coordinate( c.getX() - ( ( ( childCount - 1 ) * 100 ) / 2 ) + childIndex * 100,
                                                  c.getY() + 100 );
            if ( child instanceof TypeNode ) {
                uiModel.add( new TypeNodeElement( cc,
                                                  (TypeNode) child ) );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtree.shared.model.nodes.Node

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.