Class TaskResultValidator.ValidationReport

java.lang.Object
neqsim.util.agentic.TaskResultValidator.ValidationReport
All Implemented Interfaces:
Serializable
Enclosing class:
TaskResultValidator

public static class TaskResultValidator.ValidationReport extends Object implements Serializable
Report of validation results for a results.json file.
Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

  • Constructor Details

    • ValidationReport

      public ValidationReport()
      Constructor.
  • Method Details

    • addError

      public void addError(String field, String message)
      Add an error.
      Parameters:
      field - the JSON field with the issue
      message - error description
    • addWarning

      public void addWarning(String field, String message)
      Add a warning.
      Parameters:
      field - the JSON field with the issue
      message - warning description
    • isValid

      public boolean isValid()
      Check if the results.json is valid (no errors, warnings are OK).
      Returns:
      true if no errors found
    • getErrorCount

      public int getErrorCount()
      Get the error count.
      Returns:
      number of errors
    • getWarningCount

      public int getWarningCount()
      Get the warning count.
      Returns:
      number of warnings
    • getErrors

      Get all errors.
      Returns:
      unmodifiable list of errors
    • getWarnings

      Get all warnings.
      Returns:
      unmodifiable list of warnings
    • toJson

      public String toJson()
      Serialize the report to JSON.
      Returns:
      JSON report string