Class ProfileValidationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProfileValidationException
    extends java.lang.RuntimeException
    An exception that wraps ValidationException, adding a method to generate a Jackson JsonNode object detailing the error.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode toJsonNode()
      Create a (Jackson) JSON object containing details of the validation error.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProfileValidationException

        public ProfileValidationException​(org.everit.json.schema.ValidationException e,
                                          ResearchObjectProfile profile)
        Parameters:
        e - The original ValidationException thrown by the JSON schema validator.
        profile - The profile that was violated.
    • Method Detail

      • toJsonNode

        public com.fasterxml.jackson.databind.JsonNode toJsonNode()
        Create a (Jackson) JSON object containing details of the validation error. Does some re-writing of the schema location to ensure it is a URL that the client can resolve.
        Returns:
        The error document.