Package org.drools.workbench.models.commons.backend.rule.context

Examples of org.drools.workbench.models.commons.backend.rule.context.RHSGeneratorContextFactory


        fixActionInsertFactBindings( model.rhs );

        StringBuilder buf = new StringBuilder();
        StringBuilder header = new StringBuilder();
        LHSGeneratorContextFactory lhsGeneratorContextFactory = new LHSGeneratorContextFactory();
        RHSGeneratorContextFactory rhsGeneratorContextFactory = new RHSGeneratorContextFactory();

        //Build rule
        this.marshalRuleHeader( model,
                                header );
        super.marshalMetadata( buf,
                               model );
        super.marshalAttributes( buf,
                                 model );

        buf.append( "\twhen\n" );

        super.marshalLHS( buf,
                          model,
                          isDSLEnhanced,
                          lhsGeneratorContextFactory );
        buf.append( "\tthen\n" );
        super.marshalRHS( buf,
                          model,
                          isDSLEnhanced,
                          rhsGeneratorContextFactory );
        this.marshalFooter( buf );

        for ( LHSGeneratorContext gc : lhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasNonTemplateOutput" + gc.getDepth() + "_" + gc.getOffset() + " = " + gc.hasNonTemplateOutput() + "}" );
        }
        for ( RHSGeneratorContext gc : rhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasOutput" + gc.getOffset() + " = false}" );
        }

        return header.append( buf ).toString();
    }
View Full Code Here


                         new LHSGeneratorContextFactory() );
        buf.append( "\tthen\n" );
        this.marshalRHS( buf,
                         model,
                         isDSLEnhanced,
                         new RHSGeneratorContextFactory() );
        this.marshalFooter( buf );
        return buf.toString();
    }
View Full Code Here

                         new LHSGeneratorContextFactory() );
        buf.append( "\tthen\n" );
        this.marshalRHS( buf,
                         model,
                         isDSLEnhanced,
                         new RHSGeneratorContextFactory() );
        this.marshalFooter( buf );
        return buf.toString();
    }
View Full Code Here

        fixActionInsertFactBindings( model.rhs );

        StringBuilder buf = new StringBuilder();
        StringBuilder header = new StringBuilder();
        LHSGeneratorContextFactory lhsGeneratorContextFactory = new LHSGeneratorContextFactory();
        RHSGeneratorContextFactory rhsGeneratorContextFactory = new RHSGeneratorContextFactory();

        //Build rule
        this.marshalRuleHeader( model,
                                header );
        super.marshalMetadata( buf,
                               model );
        super.marshalAttributes( buf,
                                 model );

        buf.append( "\twhen\n" );

        super.marshalLHS( buf,
                          model,
                          isDSLEnhanced,
                          lhsGeneratorContextFactory );
        buf.append( "\tthen\n" );
        super.marshalRHS( buf,
                          model,
                          isDSLEnhanced,
                          rhsGeneratorContextFactory );
        this.marshalFooter( buf );

        for ( LHSGeneratorContext gc : lhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasNonTemplateOutput" + gc.getDepth() + "_" + gc.getOffset() + " = " + gc.hasNonTemplateOutput() + "}" );
        }
        for ( RHSGeneratorContext gc : rhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasOutput" + gc.getOffset() + " = false}" );
        }

        return header.append( buf ).toString();
    }
View Full Code Here

        fixActionInsertFactBindings( model.rhs );

        StringBuilder buf = new StringBuilder();
        StringBuilder header = new StringBuilder();
        LHSGeneratorContextFactory lhsGeneratorContextFactory = new LHSGeneratorContextFactory();
        RHSGeneratorContextFactory rhsGeneratorContextFactory = new RHSGeneratorContextFactory();

        //Build rule
        this.marshalRuleHeader( model,
                                header );
        super.marshalMetadata( buf,
                               model );
        super.marshalAttributes( buf,
                                 model );

        buf.append( "\twhen\n" );

        super.marshalLHS( buf,
                          model,
                          isDSLEnhanced,
                          lhsGeneratorContextFactory );
        buf.append( "\tthen\n" );
        super.marshalRHS( buf,
                          model,
                          isDSLEnhanced,
                          rhsGeneratorContextFactory );
        this.marshalFooter( buf );

        for ( LHSGeneratorContext gc : lhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasNonTemplateOutput" + gc.getDepth() + "_" + gc.getOffset() + " = " + gc.hasNonTemplateOutput() + "}" );
        }
        for ( RHSGeneratorContext gc : rhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasOutput" + gc.getOffset() + " = false}" );
        }

        return header.append( buf ).toString();
    }
View Full Code Here

                         new LHSGeneratorContextFactory() );
        buf.append( "\tthen\n" );
        this.marshalRHS( buf,
                         model,
                         isDSLEnhanced,
                         new RHSGeneratorContextFactory() );
        this.marshalFooter( buf );
        return buf.toString();
    }
View Full Code Here

                         new LHSGeneratorContextFactory() );
        buf.append( "\tthen\n" );
        this.marshalRHS( buf,
                         model,
                         isDSLEnhanced,
                         new RHSGeneratorContextFactory() );
        this.marshalFooter( buf );
        return buf.toString();
    }
View Full Code Here

        fixActionInsertFactBindings( model.rhs );

        StringBuilder buf = new StringBuilder();
        StringBuilder header = new StringBuilder();
        LHSGeneratorContextFactory lhsGeneratorContextFactory = new LHSGeneratorContextFactory();
        RHSGeneratorContextFactory rhsGeneratorContextFactory = new RHSGeneratorContextFactory();

        //Build rule
        this.marshalRuleHeader( model,
                                header );
        super.marshalMetadata( buf,
                               model );
        super.marshalAttributes( buf,
                                 model );

        buf.append( "\twhen\n" );

        super.marshalLHS( buf,
                          model,
                          isDSLEnhanced,
                          lhsGeneratorContextFactory );
        buf.append( "\tthen\n" );
        super.marshalRHS( buf,
                          model,
                          isDSLEnhanced,
                          rhsGeneratorContextFactory );
        this.marshalFooter( buf );

        for ( LHSGeneratorContext gc : lhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasLHSOutput" + gc.getDepth() + "_" + gc.getOffset() + " = false}" );
            header.append( "@code{hasLHSNonTemplateOutput" + gc.getDepth() + "_" + gc.getOffset() + " = " + gc.hasNonTemplateOutput() + "}" );
        }
        for ( RHSGeneratorContext gc : rhsGeneratorContextFactory.getGeneratorContexts() ) {
            header.append( "@code{hasRHSOutput" + gc.getDepth() + "_" + gc.getOffset() + " = false}" );
            header.append( "@code{hasRHSNonTemplateOutput" + gc.getDepth() + "_" + gc.getOffset() + " = " + gc.hasNonTemplateOutput() + "}" );
        }

        header.append( "@code{\n" +
View Full Code Here

                         new LHSGeneratorContextFactory() );
        buf.append( "\tthen\n" );
        this.marshalRHS( buf,
                         model,
                         isDSLEnhanced,
                         new RHSGeneratorContextFactory() );
        this.marshalFooter( buf );
        return buf.toString();
    }
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.commons.backend.rule.context.RHSGeneratorContextFactory

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.