Examples of GroupElement


Examples of org.drools.rule.GroupElement

                                      builder,
                                      "update(stilton);" );
        assertLength( 0,
                      builder.getErrors().getErrors() );

        final GroupElement lhs = rule.getLhs();
        assertLength( 1,
                      lhs.getChildren() );

        final GroupElement or = (GroupElement) lhs.getChildren().get( 0 );
        assertLength( 1,
                      or.getChildren() );
        final Pattern pattern = (Pattern) or.getChildren().get( 0 );

        final LiteralConstraint literalConstarint = (LiteralConstraint) pattern.getConstraints().get( 0 );
    }
View Full Code Here

Examples of org.drools.rule.GroupElement

                                      builder,
                                      "update(stilton);" );
        assertLength( 0,
                      builder.getErrors().getErrors() );

        final GroupElement lhs = rule.getLhs();
        assertLength( 1,
                      lhs.getChildren() );

        final GroupElement and = (GroupElement) lhs.getChildren().get( 0 );
        assertLength( 1,
                      and.getChildren() );
        final Pattern pattern = (Pattern) and.getChildren().get( 0 );

        final LiteralConstraint literalConstraint = (LiteralConstraint) pattern.getConstraints().get( 0 );
    }
View Full Code Here

Examples of org.drools.rule.GroupElement

                           builder,
                           "" );
        assertEquals( 0,
                      builder.getErrors().getErrors().length );

        final GroupElement lhs = rule.getLhs();
        assertLength( 1,
                      lhs.getChildren() );

        final GroupElement not = (GroupElement) lhs.getChildren().get( 0 );
        assertLength( 1,
                      not.getChildren() );
        final Pattern pattern = (Pattern) not.getChildren().get( 0 );

        final LiteralConstraint literalConstarint = (LiteralConstraint) pattern.getConstraints().get( 0 );
    }
View Full Code Here

Examples of org.drools.rule.GroupElement

                           builder,
                           "" );
        assertEquals( 0,
                      builder.getErrors().getErrors().length );

        final GroupElement lhs = rule.getLhs();
        assertLength( 1,
                      lhs.getChildren() );

        final GroupElement exists = (GroupElement) lhs.getChildren().get( 0 );
        assertLength( 1,
                      exists.getChildren() );
        final Pattern pattern = (Pattern) exists.getChildren().get( 0 );

        final LiteralConstraint literalConstarint = (LiteralConstraint) pattern.getConstraints().get( 0 );
    }
View Full Code Here

Examples of org.drools.rule.GroupElement

        String ruleName = stream.readUTF();
        Package pkg = ruleBase.getPackage( pkgName );
        Rule rule = pkg.getRule( ruleName );

        RuleTerminalNode ruleTerminalNode = (RuleTerminalNode) leftTuple.getLeftTupleSink();
        GroupElement subRule = ruleTerminalNode.getSubRule();

        PropagationContext pc = context.propagationContexts.get( stream.readLong() );

        AgendaItem activation = new AgendaItem( activationNumber,
                                                leftTuple,
View Full Code Here

Examples of org.drools.rule.GroupElement

        // forall can be translated into
        // not( basePattern and not( <remaining_patterns>+ ) )
        // so we just do that:

        final GroupElement and = GroupElementFactory.newAndInstance();
        and.addChild( forall.getBasePattern() );

        final GroupElement not2 = GroupElementFactory.newNotInstance();
        if ( forall.getRemainingPatterns().size() == 1 ) {
            not2.addChild( (Pattern) forall.getRemainingPatterns().get( 0 ) );
            and.addChild( not2 );
        } else if ( forall.getRemainingPatterns().size() > 1 ) {
            final GroupElement and2 = GroupElementFactory.newAndInstance();
            for ( final Iterator it = forall.getRemainingPatterns().iterator(); it.hasNext(); ) {
                and2.addChild( (Pattern) it.next() );
            }
            not2.addChild( and2 );
            and.addChild( not2 );
        }

        final GroupElement not = GroupElementFactory.newNotInstance();
        not.addChild( and );

        // get builder for the CEs
        final ReteooComponentBuilder builder = utils.getBuilderFor( not );

        // builds the CEs
View Full Code Here

Examples of org.drools.rule.GroupElement

     * @inheritDoc
     */
    public void build(final BuildContext context,
                      final BuildUtils utils,
                      final RuleConditionElement rce) {
        final GroupElement ge = (GroupElement) rce;

        final ReteooComponentBuilder builder = (ReteooComponentBuilder) this.geBuilders.get( ge.getType() );
       
        context.push( ge );

        builder.build( context,
                       utils,
View Full Code Here

Examples of org.drools.rule.GroupElement

    /**
     * @inheritDoc
     */
    public boolean requiresLeftActivation(final BuildUtils utils,
                                          final RuleConditionElement rce) {
        final GroupElement ge = (GroupElement) rce;

        final ReteooComponentBuilder builder = (ReteooComponentBuilder) this.geBuilders.get( ge.getType() );

        return builder.requiresLeftActivation( utils,
                                               rce );
    }
View Full Code Here

Examples of org.drools.rule.GroupElement

         */
        public void build(final BuildContext context,
                          final BuildUtils utils,
                          final RuleConditionElement rce) {

            final GroupElement ge = (GroupElement) rce;

            // iterate over each child and build it
            for ( final Iterator it = ge.getChildren().iterator(); it.hasNext(); ) {

                final RuleConditionElement child = (RuleConditionElement) it.next();

                final ReteooComponentBuilder builder = utils.getBuilderFor( child );

View Full Code Here

Examples of org.jacoco.ant.ReportTask.GroupElement

    Union executiondata = task.createExecutiondata();
    Path jacocodata = new Path(mxtest.getProject());
    jacocodata.setPath(mxtest.getJaCoCoData().getAbsolutePath());
    executiondata.add(jacocodata);
   
    GroupElement structure = task.createStructure();
    structure.setName(mxtest.getProjectTitle());
   
    // classfiles
    Union classfiles = structure.createClassfiles();
    Path outputpath = new Path(mxtest.getProject());
    outputpath.setPath(mxtest.getClassesDir().getAbsolutePath());
    classfiles.add(outputpath);
   
    MaxmlMap attributes = mxtest.getBuild().getConfig().getTaskAttributes(mxtest.getTaskName());
    if (attributes == null) {
      attributes = new MaxmlMap();
    }

    // source files
    SourceFilesElement sourcefiles = structure.createSourcefiles();
    sourcefiles.setEncoding(attributes.getString("encoding", null));
    Path sourcepath = new Path(mxtest.getProject());
    sourcepath.setRefid(new Reference(mxtest.getProject(), Key.compileSourcePath.referenceId()));
    sourcefiles.add(sourcepath);
   
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.