ValidationResult

Result generated by a schema validation.

Description

The ValidationResult class provides a representation of the result generated by a schema validation.

Constructors

Creates a new instance of a validation ressult and sets its values. See ValidationResultType

public ValidationResult(String path, ValidationResultType, String code, String message, Object expected, Object actual)

  • path: String - dot notation path of the validated element.
  • type: ValidationResultType - type of the validation result: Information, Warning, or Error.
  • code: String - error code.
  • message: String - human readable message.
  • expected: Object - value expected by a schema validation.
  • actual: Object - actual value found by a schema validation.

Instance methods

getActual

Gets the actual value found by a schema validation.

public Object getActual()

  • returns: Object - actual value.

getCode

Gets the error code.

public String getCode()

  • returns: String - error code

getExpected

Gets the value expected by a schema validation.

public Object getExpected()

  • returns: Object - expected value.

getMessage

Gets the human readable message.

public String getMessage()

  • returns: String - result message.

getPath

Gets the dot notation path of the validated element.

public String getPath()

  • returns: String - path of the validated element.

getType

Gets the dot notation path of the validated element.

public ValidationResultType getType()