All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fge.jsonschema.processors.ValidationDomain Maven / Gradle / Ivy

There is a newer version: 2.2.6
Show newest version
package com.github.fge.jsonschema.processors;

import com.github.fge.jsonschema.exceptions.ExceptionProvider;
import com.github.fge.jsonschema.exceptions.InvalidInstanceException;
import com.github.fge.jsonschema.exceptions.InvalidSchemaException;
import com.github.fge.jsonschema.exceptions.ProcessingException;
import com.github.fge.jsonschema.report.ProcessingMessage;

public enum ValidationDomain
{
    SYNTAX
    {
        @Override
        public ExceptionProvider exceptionProvider()
        {
            return new ExceptionProvider()
            {
                @Override
                public ProcessingException doException(
                    final ProcessingMessage message)
                {
                    return new InvalidSchemaException(message);
                }
            };
        }
    },
    INSTANCE
    {
        @Override
        public ExceptionProvider exceptionProvider()
        {
            return new ExceptionProvider()
            {
                @Override
                public ProcessingException doException(
                    final ProcessingMessage message)
                {
                    return new InvalidInstanceException(message);
                }
            };
        }
    },
    ;

    public abstract ExceptionProvider exceptionProvider();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy