class KiePMMLScorecardModelCharacteristicASTFactory {

    protected void declareRuleFromAttribute(final Attribute attribute, final String parentPath,
                                            final int attributeIndex,
                                            final List<KiePMMLDroolsRule> rules,
                                            final String statusToSet,
                                            final String characteristicReasonCode,
                                            final Number characteristicBaselineScore,
                                            final boolean isLastCharacteristic) {
        logger.trace("declareRuleFromAttribute {} {}", attribute, parentPath);
        final Predicate predicate = attribute.getPredicate();
        // This means the rule should not be created at all.
        // Different semantics has to be implemented if the "False"/"True" predicates are declared inside
        // an XOR compound predicate
        if (predicate instanceof False) {
            return;
        }
        String currentRule = String.format(PATH_PATTERN, parentPath, attributeIndex);
        KiePMMLReasonCodeAndValue reasonCodeAndValue = getKiePMMLReasonCodeAndValue(attribute, characteristicReasonCode, characteristicBaselineScore);
        PredicateASTFactoryData predicateASTFactoryData = new PredicateASTFactoryData(predicate, outputFields, rules, parentPath, currentRule, fieldTypeMap);
        KiePMMLPredicateASTFactory.factory(predicateASTFactoryData).declareRuleFromPredicate(attribute.getPartialScore(), statusToSet, reasonCodeAndValue, isLastCharacteristic);
    }

    private  KiePMMLScorecardModelCharacteristicASTFactory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLOutputField> outputFields, final DATA_TYPE targetType);

}