Package gov.nasa.pds.tools.validate.rule
Class ValidationRuleManager
java.lang.Object
gov.nasa.pds.tools.validate.rule.ValidationRuleManager
Implements an object that allows callers to find out what validators exist.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationRuleManager(org.apache.commons.chain.Catalog catalog) Creates a new instance with a given catalog. -
Method Summary
Modifier and TypeMethodDescriptionfindApplicableRule(String location) Finds an applicable rule for the given location.findRuleByCaption(String caption) Finds a rule given its caption.findRuleByName(String name) Finds a validation rule by name.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
-