Package gov.nasa.pds.tools.validate.rule
Class ValidationRuleManager
java.lang.Object
gov.nasa.pds.tools.validate.rule.ValidationRuleManager
public class ValidationRuleManager extends Object
Implements an object that allows callers to find out what
validators exist.
-
Constructor Summary
Constructors Constructor Description ValidationRuleManager(org.apache.commons.chain.Catalog catalog)Creates a new instance with a given catalog. -
Method Summary
Modifier and Type Method Description ValidationRulefindApplicableRule(String location)Finds an applicable rule for the given location.ValidationRulefindRuleByCaption(String caption)Finds a rule given its caption.ValidationRulefindRuleByName(String name)Finds a validation rule by name.List<ValidationRule>getValidators()Gets the list of available validators.
-
Constructor Details
-
ValidationRuleManager
public ValidationRuleManager(org.apache.commons.chain.Catalog catalog)Creates a new instance with a given catalog.- Parameters:
catalog- the rule catalog
-
-
Method Details
-
getValidators
Gets the list of available validators. The list is sorted by the validator caption string.- Returns:
- a list of validators
-
findApplicableRule
Finds an applicable rule for the given location.- Parameters:
location- the location to validate- Returns:
- an applicable rule, or null if no such rule found
-
findRuleByName
Finds a validation rule by name.- Parameters:
name- the rule name- Returns:
- the validation rule, or null if no such rule found
-
findRuleByCaption
Finds a rule given its caption.- Parameters:
caption- the rule caption- Returns:
- the rule with that caption, or null if no such rule
-