Class ValidationTask

java.lang.Object
gov.nasa.pds.tools.validate.task.ValidationTask
All Implemented Interfaces:
Task

public class ValidationTask
extends Object
implements Task
Implements a background task for performing a validation.
  • Constructor Details

    • ValidationTask

      public ValidationTask​(ProblemListener problemListener, RuleContext context, TargetRegistrar targetRegistrar)
      Creates a new instance of the validation task.
      Parameters:
      listener - the problem listener for the task
  • Method Details

    • getLocation

      public String getLocation()
      Gets the location of the target to validate.
      Returns:
      the target location
    • setLocation

      public void setLocation​(String location)
      Sets the location to validate.
      Parameters:
      location - the location to validate
    • getErrorLimit

      public int getErrorLimit()
      Gets the limit on the number of errors found.
      Returns:
      the error limit
    • setErrorLimit

      public void setErrorLimit​(int limit)
      Sets the limit on the number of errors encountered before the validation will terminate.
      Parameters:
      limit - the error limit
    • getValidationType

      public String getValidationType()
      Gets the type of validation.
      Returns:
      the validation type
    • setRule

      public void setRule​(ValidationRule rule)
      Sets the validation rule to use.
      Parameters:
      rule - the validation rule
    • execute

      public void execute​(TaskAdvisor advisor)
      Description copied from interface: Task
      Executes the task with a given advisor to detect cancel requests.
      Specified by:
      execute in interface Task
      Parameters:
      advisor - the task advisor
    • getErrorCount

      public int getErrorCount()
      Gets the count of errors encountered.
      Returns:
      the error count
    • getWarningCount

      public int getWarningCount()
      Gets the count of warnings encountered.
      Returns:
      the warning count
    • getInfoCount

      public int getInfoCount()
      Gets the count of informational events encountered.
      Returns:
      the count of info messages
    • setRuleManager

      public void setRuleManager​(ValidationRuleManager ruleManager)
      Sets the validation rule manager to use for finding validation rules.
      Parameters:
      ruleManager - the rule manager to use
    • getRegistrar

      public TargetRegistrar getRegistrar()
      Gets the registrar for getting target information.
      Returns:
      the target registrar
    • getProblemListener

      public ProblemListener getProblemListener()
      Gets the problem listener for getting problems found.
      Returns:
      the problem listener
    • getAllTargets

      public List<TargetWithErrors> getAllTargets()