Examples of TextConsequence


Examples of org.drools.verifier.components.TextConsequence

     * @return Verifier object that implements the Consequence interface.
     */
    private Consequence visitConsequence(VerifierComponent parent,
                                         Object o) {

        TextConsequence consequence = new TextConsequence( rule );

        String text = o.toString();

        /*
         * Strip all comments out of the code.
         */
        StringBuffer buffer = new StringBuffer( text );
        int commentIndex = buffer.indexOf( "//" );

        while ( commentIndex != -1 ) {
            buffer = buffer.delete( commentIndex,
                                    buffer.indexOf( "\n",
                                                    commentIndex ) );
            commentIndex = buffer.indexOf( "//" );
        }

        text = buffer.toString();

        /*
         * Strip all useless characters out of the code.
         */
        text = text.replaceAll( "\n",
                                "" );
        text = text.replaceAll( "\r",
                                "" );
        text = text.replaceAll( "\t",
                                "" );
        text = text.replaceAll( " ",
                                "" );

        consequence.setText( text );
        consequence.setParentPath( parent.getPath() );
        consequence.setParentType( parent.getVerifierComponentType() );

        data.add( consequence );

        return consequence;
    }
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

        saveVerifierComponentAndGet( new SubPattern( pattern,
                                                     0 ) );
        saveVerifierComponentAndGet( new ReturnValueFieldDescr( pattern ) );
        saveVerifierComponentAndGet( new SubRule( rule,
                                                  0 ) );
        saveVerifierComponentAndGet( new TextConsequence( rule ) );
        saveVerifierComponentAndGet( new PatternVariable( rule ) );
        saveVerifierComponentAndGet( new VerifierAccessorDescr( rule ) );
        saveVerifierComponentAndGet( new VerifierAccumulateDescr( pattern ) );
        saveVerifierComponentAndGet( new VerifierCollectDescr( pattern ) );
        saveVerifierComponentAndGet( new RuleEval( rule ) );
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

     * @return Verifier object that implements the Consequence interface.
     */
    private Consequence visitConsequence(VerifierComponent parent,
                                         Object o) {

        TextConsequence consequence = new TextConsequence( rule );

        String text = o.toString();

        /*
         * Strip all comments out of the code.
         */
        StringBuffer buffer = new StringBuffer( text );
        int commentIndex = buffer.indexOf( "//" );

        while ( commentIndex != -1 ) {
            buffer = buffer.delete( commentIndex,
                                    buffer.indexOf( "\n",
                                                    commentIndex ) );
            commentIndex = buffer.indexOf( "//" );
        }

        text = buffer.toString();

        /*
         * Strip all useless characters out of the code.
         */
        text = text.replaceAll( "\n",
                                "" );
        text = text.replaceAll( "\r",
                                "" );
        text = text.replaceAll( "\t",
                                "" );
        text = text.replaceAll( " ",
                                "" );

        consequence.setText( text );
        consequence.setParentPath( parent.getPath() );
        consequence.setParentType( parent.getVerifierComponentType() );

        data.add( consequence );

        return consequence;
    }
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

        saveVerifierComponentAndGet( new SubPattern( pattern,
                                                     0 ) );
        saveVerifierComponentAndGet( new ReturnValueFieldDescr( pattern ) );
        saveVerifierComponentAndGet( new SubRule( rule,
                                                  0 ) );
        saveVerifierComponentAndGet( new TextConsequence( rule ) );
        saveVerifierComponentAndGet( new PatternVariable( rule ) );
        saveVerifierComponentAndGet( new VerifierAccessorDescr( rule ) );
        saveVerifierComponentAndGet( new VerifierAccumulateDescr( pattern ) );
        saveVerifierComponentAndGet( new VerifierCollectDescr( pattern ) );
        saveVerifierComponentAndGet( new RuleEval( rule ) );
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

     * @return Verifier object that implements the Consequence interface.
     */
    private Consequence visitConsequence(VerifierComponent parent,
                                         Object o) {

        TextConsequence consequence = new TextConsequence( rule );

        String text = o.toString();

        /*
         * Strip all comments out of the code.
         */
        StringBuffer buffer = new StringBuffer( text );
        int commentIndex = buffer.indexOf( "//" );

        while ( commentIndex != -1 ) {
            buffer = buffer.delete( commentIndex,
                                    buffer.indexOf( "\n",
                                                    commentIndex ) );
            commentIndex = buffer.indexOf( "//" );
        }

        text = buffer.toString();

        /*
         * Strip all useless characters out of the code.
         */
        text = text.replaceAll( "\n",
                                "" );
        text = text.replaceAll( "\r",
                                "" );
        text = text.replaceAll( "\t",
                                "" );
        text = text.replaceAll( " ",
                                "" );

        consequence.setText( text );
        consequence.setParentPath( parent.getPath() );
        consequence.setParentType( parent.getVerifierComponentType() );

        data.add( consequence );

        return consequence;
    }
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

        saveVerifierComponentAndGet( new SubPattern( pattern,
                                                     0 ) );
        saveVerifierComponentAndGet( new ReturnValueFieldDescr( pattern ) );
        saveVerifierComponentAndGet( new SubRule( rule,
                                                  0 ) );
        saveVerifierComponentAndGet( new TextConsequence( rule ) );
        saveVerifierComponentAndGet( new PatternVariable( rule ) );
        saveVerifierComponentAndGet( new VerifierAccessorDescr( rule ) );
        saveVerifierComponentAndGet( new VerifierAccumulateDescr( pattern ) );
        saveVerifierComponentAndGet( new VerifierCollectDescr( pattern ) );
        saveVerifierComponentAndGet( new RuleEval( rule ) );
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

     * @return Verifier object that implements the Consequence interface.
     */
    private Consequence visitConsequence(VerifierComponent parent,
                                         Object o) {

        TextConsequence consequence = new TextConsequence( rule );

        String text = o.toString();

        /*
         * Strip all comments out of the code.
         */
        StringBuffer buffer = new StringBuffer( text );
        int commentIndex = buffer.indexOf( "//" );

        while ( commentIndex != -1 ) {
            buffer = buffer.delete( commentIndex,
                                    buffer.indexOf( "\n",
                                                    commentIndex ) );
            commentIndex = buffer.indexOf( "//" );
        }

        text = buffer.toString();

        /*
         * Strip all useless characters out of the code.
         */
        text = text.replaceAll( "\n",
                                "" );
        text = text.replaceAll( "\r",
                                "" );
        text = text.replaceAll( "\t",
                                "" );
        text = text.replaceAll( " ",
                                "" );

        consequence.setText( text );
        consequence.setParentPath( parent.getPath() );
        consequence.setParentType( parent.getVerifierComponentType() );

        data.add( consequence );

        return consequence;
    }
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

   *            Consequence object.
   * @return Verifier object that implements the Consequence interface.
   */
  private Consequence flattenConsequence(VerifierComponent parent, Object o) {

    TextConsequence consequence = new TextConsequence();

    String text = o.toString();

    /*
     * Strip all comments out of the code.
     */
    StringBuffer buffer = new StringBuffer(text);
    int commentIndex = buffer.indexOf("//");

    while (commentIndex != -1) {
      buffer = buffer.delete(commentIndex, buffer.indexOf("\n",
          commentIndex));
      commentIndex = buffer.indexOf("//");
    }

    text = buffer.toString();

    /*
     * Strip all useless characters out of the code.
     */
    text = text.replaceAll("\n", "");
    text = text.replaceAll("\r", "");
    text = text.replaceAll("\t", "");
    text = text.replaceAll(" ", "");

    consequence.setText(text);
    consequence.setRuleId(currentRule.getId());
    consequence.setRuleName(currentRule.getRuleName());
    consequence.setParent(parent);

    data.add(consequence);

    return consequence;
  }
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

        saveVerifierComponentAndGet( new SubPattern( pattern,
                                                     0 ) );
        saveVerifierComponentAndGet( new ReturnValueFieldDescr( pattern ) );
        saveVerifierComponentAndGet( new SubRule( rule,
                                                  0 ) );
        saveVerifierComponentAndGet( new TextConsequence( rule ) );
        saveVerifierComponentAndGet( new Variable( rule ) );
        saveVerifierComponentAndGet( new VerifierAccessorDescr( rule ) );
        saveVerifierComponentAndGet( new VerifierAccumulateDescr( pattern ) );
        saveVerifierComponentAndGet( new VerifierCollectDescr( pattern ) );
        saveVerifierComponentAndGet( new RuleEval( rule ) );
View Full Code Here

Examples of org.drools.verifier.components.TextConsequence

     * @return Verifier object that implements the Consequence interface.
     */
    private Consequence visitConsequence(VerifierComponent parent,
                                         Object o) {

        TextConsequence consequence = new TextConsequence( rule );

        String text = o.toString();

        /*
         * Strip all comments out of the code.
         */
        StringBuffer buffer = new StringBuffer( text );
        int commentIndex = buffer.indexOf( "//" );

        while ( commentIndex != -1 ) {
            buffer = buffer.delete( commentIndex,
                                    buffer.indexOf( "\n",
                                                    commentIndex ) );
            commentIndex = buffer.indexOf( "//" );
        }

        text = buffer.toString();

        /*
         * Strip all useless characters out of the code.
         */
        text = text.replaceAll( "\n",
                                "" );
        text = text.replaceAll( "\r",
                                "" );
        text = text.replaceAll( "\t",
                                "" );
        text = text.replaceAll( " ",
                                "" );

        consequence.setText( text );
        consequence.setParentPath( parent.getPath() );
        consequence.setParentType( parent.getVerifierComponentType() );

        data.add( consequence );

        return consequence;
    }
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.