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

xpertss.json.schema.format.FormatAttribute Maven / Gradle / Ivy

The newest version!
package xpertss.json.schema.format;

import com.github.fge.jackson.NodeType;
import xpertss.json.schema.core.exceptions.ProcessingException;
import xpertss.json.schema.core.report.ProcessingReport;
import xpertss.json.schema.processors.data.FullData;
import com.github.fge.msgsimple.bundle.MessageBundle;

import java.util.EnumSet;

/**
 * Interface for a format attribute validator
 */
public interface FormatAttribute {

    /**
     * Return the set of JSON Schema types this format attribute applies to
     *
     * 

It is important that this method be implemented correctly. Remind * that validation for a given format attribute and an instance which type * is not supported always succeeds.

* * @return the set of supported types */ EnumSet supportedTypes(); /** * Validate the instance against this format attribute * * @param report the report to use * @param bundle the message bundle to use * @param data the validation data * @throws ProcessingException an exception occurs (normally, never for a * format attribute) */ void validate(ProcessingReport report, MessageBundle bundle, FullData data) throws ProcessingException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy