Class MergeableRulesValidator
java.lang.Object
de.redsix.dmncheck.validators.core.GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
de.redsix.dmncheck.validators.core.SimpleValidator<org.operaton.bpm.model.dmn.instance.DecisionTable>
de.redsix.dmncheck.validators.MergeableRulesValidator
- All Implemented Interfaces:
Validator
public class MergeableRulesValidator
extends SimpleValidator<org.operaton.bpm.model.dmn.instance.DecisionTable>
Proposes to merge rules with identical outputs that differ in only one input entry. The merged rule uses the
disjunction of both entries, e.g.,
"Fall", "Winter".-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(org.operaton.bpm.model.dmn.DmnModelInstance dmnModelInstance) Validates the given DMN model instance and returns the validation results as a list.Link to a detailed description of the problems reported by this validator and how to solve them.Class<org.operaton.bpm.model.dmn.instance.DecisionTable> Auxiliary method to determine the class for the validation.booleanisApplicable(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext) Checks whether the validation is applicable for an element of type S taking account of the validation context.validate(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext) Validates a given element of type T.Methods inherited from class SimpleValidator
getClassUsedToCheckApplicabilityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Validator
applyWithDocumentation
-
Constructor Details
-
MergeableRulesValidator
public MergeableRulesValidator()
-
-
Method Details
-
documentation
-
apply
Description copied from interface:ValidatorValidates the given DMN model instance and returns the validation results as a list.- Specified by:
applyin interfaceValidator- Overrides:
applyin classGenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>- Parameters:
dmnModelInstance- DMN model instance used for validation- Returns:
- A possibly empty list of validation results
-
getClassUnderValidation
Description copied from class:GenericValidatorAuxiliary method to determine the class for the validation.- Specified by:
getClassUnderValidationin classGenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>- Returns:
- Class used for validation
-
isApplicable
public boolean isApplicable(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext) Description copied from class:GenericValidatorChecks whether the validation is applicable for an element of type S taking account of the validation context.- Specified by:
isApplicablein classGenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>- Parameters:
decisionTable- Element used to check applicability of the validationvalidationContext- Validation Context- Returns:
- Whether the validation is applicable
-
validate
public List<ValidationResult> validate(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext) Description copied from class:GenericValidatorValidates a given element of type T.A validation context can be used to track global assumptions about the DMN model instance.
- Specified by:
validatein classGenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>- Parameters:
decisionTable- Element under validationvalidationContext- Validation Context- Returns:
- A list of validation results
-