Package org.kie.pmml.models.drools.ast
Class KiePMMLDroolsRule
- java.lang.Object
-
- org.kie.pmml.models.drools.ast.KiePMMLDroolsRule
-
public class KiePMMLDroolsRule extends Object
Data-class used to store information needed to generate a Drools rule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKiePMMLDroolsRule.Builder
-
Method Summary
-
-
-
Method Detail
-
builder
public static KiePMMLDroolsRule.Builder builder(String name, String statusToSet, List<org.dmg.pmml.OutputField> outputFields)
- Parameters:
name- The rule namestatusToSet- The status to set in the rhs' defaultthen; e.g.:then$statusHolder.setStatus(statusToSet);update($statusHolder);If there is a break statement in the lhs, then the statusToSet will be applied differently if the node is a final/leaf or not.
If the node is a final/leaf, the statusToSet will be applied in the default
; e.g.:thendirective, while in the defaultthen[match]it will be set as "DONE"then$statusHolder.setStatus(statusToSet);update($statusHolder);then[match]$statusHolder.setStatus("DONE");update($statusHolder);If the node is a not final/leaf, the statusToSet will be set in the
; e.g.:then[match]directive, while in the defaultthenit will be set as "DONE"then$statusHolder.setStatus("DONE");update($statusHolder);then[match]$statusHolder.setStatus(statusToSet);update($statusHolder);- Returns:
-
getName
public String getName()
-
getStatusToSet
public String getStatusToSet()
The status to set in the rhs ($statusHolder.setStatus("DONE");update($statusHolder);)- Returns:
-
getOutputFields
public List<org.dmg.pmml.OutputField> getOutputFields()
-
getAgendaGroup
public String getAgendaGroup()
-
getActivationGroup
public String getActivationGroup()
-
getFocusedAgendaGroup
public String getFocusedAgendaGroup()
-
getStatusConstraint
public String getStatusConstraint()
-
getAndConstraints
public List<KiePMMLFieldOperatorValue> getAndConstraints()
-
getOrConstraints
public List<KiePMMLFieldOperatorValue> getOrConstraints()
-
getXorConstraints
public List<KiePMMLFieldOperatorValue> getXorConstraints()
-
getNotConstraints
public List<KiePMMLFieldOperatorValue> getNotConstraints()
-
getIfBreakField
public String getIfBreakField()
-
getIfBreakOperator
public String getIfBreakOperator()
-
getIfBreakValue
public Object getIfBreakValue()
-
getReasonCodeAndValue
public KiePMMLReasonCodeAndValue getReasonCodeAndValue()
-
getResultCode
public org.kie.pmml.api.enums.ResultCode getResultCode()
-
getResult
public Object getResult()
-
getToAccumulate
public Double getToAccumulate()
The accumulation to set in the rhs ($statusHolder.accumulate(_toAccumulate_);- Returns:
-
isAccumulationResult
public boolean isAccumulationResult()
Ittrue, set the overall accumulation as final result- Returns:
-
-