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

com.github.fge.jsonschema.processing.Processor Maven / Gradle / Ivy

There is a newer version: 2.2.6
Show newest version
/*
 * Copyright (c) 2013, Francis Galiegue 
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Lesser GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Lesser GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */

package com.github.fge.jsonschema.processing;

import com.github.fge.jsonschema.exceptions.ProcessingException;
import com.github.fge.jsonschema.report.MessageProvider;
import com.github.fge.jsonschema.report.ProcessingReport;

/**
 * Interface for a processor in JSON Schema processing
 *
 * 

Note that it is required that both inputs and outputs implement {@link * MessageProvider}: this allows the processor to grab a context-dependent * message to include into the report should the need arise. A {@link * ProcessingReport} is passed as an argument so that the processor can add * debug/info/warning/error messages.

* * @param input type for that processor * @param output type for that processor */ public interface Processor { /** * Process the input * * @param report the report to use while processing * @param input the input for this processor * @return the output * @throws ProcessingException processing failed */ OUT process(final ProcessingReport report, final IN input) throws ProcessingException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy