Examples of Consequence


Examples of org.drools.template.model.Consequence

                externalClassName = ScorecardPMMLUtils.getExtension(outputField.getExtensions(), PMMLExtensionNames.SCORECARD_RESULTANT_SCORE_CLASS).getValue();
                break;
            }
        }
        if ( fieldName != null && externalClassName != null) {
            Consequence consequence = new Consequence();
            StringBuilder stringBuilder = new StringBuilder("$");
            stringBuilder.append(fieldName).append("Var").append(".set").append(Character.toUpperCase(fieldName.charAt(0))).append(fieldName.substring(1));
            if (scorecard.getInitialScore() > 0 ) {
                stringBuilder.append("($calculatedScore+$initialScore);");
            } else {
                stringBuilder.append("($calculatedScore);");
            }
            consequence.setSnippet(stringBuilder.toString());
            calcTotalRule.addConsequence(consequence);
        }

    }
View Full Code Here

Examples of org.drools.verifier.components.Consequence

        for ( AttributeDescr attribute : descr.getAttributes().values() ) {
            rule.getAttributes().put( attribute.getName(),
                                      attribute.getValue() );
        }

        Consequence consequence = visitConsequence( rule,
                                                    descr.getConsequence() );

        rule.getMetadata().putAll( descr.getMetaAttributes() );
        rule.setConsequencePath( consequence.getPath() );
        rule.setConsequenceType( consequence.getConsequenceType() );
        rule.setLineNumber( descr.getLine() );

        data.add( rule );

        rulePackage.getRules().add( rule );
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.Consequence

    assertEquals("tripId", affects.getTripId().getId());

    assertEquals(ServiceAlert.Cause.ACCIDENT, serviceAlert.getCause());

    assertEquals(1, serviceAlert.getConsequenceCount());
    Consequence consequence = serviceAlert.getConsequence(0);
    assertEquals(Effect.DETOUR, consequence.getEffect());

    ServiceAlerts.TranslatedString summaries = serviceAlert.getSummary();
    assertEquals(1, summaries.getTranslationCount());
    ServiceAlerts.TranslatedString.Translation summary = summaries.getTranslation(0);
    assertEquals("en", summary.getLanguage());
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.