Package nl.knaw.dans.lib.util.ruleengine
Class RuleEngineImpl
java.lang.Object
nl.knaw.dans.lib.util.ruleengine.RuleEngineImpl
- All Implemented Interfaces:
RuleEngine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidateBag(Path bag, List<NumberedRule> rules) Validates the given bag against a given rule set.voidvalidateRuleSet(List<NumberedRule> rules) Check that a rule set is internally consistent.
-
Constructor Details
-
RuleEngineImpl
public RuleEngineImpl()
-
-
Method Details
-
validateRuleSet
Description copied from interface:RuleEngineCheck that a rule set is internally consistent. It checks for duplicate rules and for unresolved dependencies.- Specified by:
validateRuleSetin interfaceRuleEngine- Parameters:
rules- the rule set- Throws:
RuleEngineConfigurationException- if the rule set is not consistent
-
validateBag
Description copied from interface:RuleEngineValidates the given bag against a given rule set.- Specified by:
validateBagin interfaceRuleEngine- Parameters:
bag- the bag to validaterules- the rule set- Returns:
- the validation result
- Throws:
Exception- if the validation could not be completed successfully
-