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 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

      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