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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationRule
findApplicableRule(String location)
Finds an applicable rule for the given location.ValidationRule
findRuleByCaption(String caption)
Finds a rule given its caption.ValidationRule
findRuleByName(String name)
Finds a validation rule by name.List<ValidationRule>
getValidators()
Gets the list of available validators.
-
-
-
Method Detail
-
getValidators
public List<ValidationRule> getValidators()
Gets the list of available validators. The list is sorted by the validator caption string.- Returns:
- a list of validators
-
findApplicableRule
public ValidationRule findApplicableRule(String location)
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
public ValidationRule findRuleByName(String name)
Finds a validation rule by name.- Parameters:
name
- the rule name- Returns:
- the validation rule, or null if no such rule found
-
findRuleByCaption
public ValidationRule findRuleByCaption(String caption)
Finds a rule given its caption.- Parameters:
caption
- the rule caption- Returns:
- the rule with that caption, or null if no such rule
-
-