de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.consumer.dump.WriterInterface Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2011 Ubiquitous Knowledge Processing Lab
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl.html
*
* Project Website:
* http://jwpl.googlecode.com
*
* Contributors:
* Torsten Zesch
* Simon Kulessa
* Oliver Ferschke
******************************************************************************/
package de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.consumer.dump;
import java.io.IOException;
import java.sql.SQLException;
import de.tudarmstadt.ukp.wikipedia.revisionmachine.common.exceptions.ConfigurationException;
import de.tudarmstadt.ukp.wikipedia.revisionmachine.common.exceptions.SQLConsumerException;
import de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.data.tasks.Task;
import de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.data.tasks.content.Diff;
/**
* The WriterInterface symbolizes the link to the output writer.
*
*
*/
public interface WriterInterface
{
/**
* This method will process the given DiffTask and send him to the specified
* output.
*
* @param task
* DiffTask
*
* @throws ConfigurationException
* if problems occurred while initializing the components
*
* @throws IOException
* if problems occurred while writing the output (to file or
* archive)
*
* @throws SQLConsumerException
* if problems occurred while writing the output (to the sql
* producer database)
*/
void process(final Task task)
throws ConfigurationException, IOException, SQLConsumerException;
/**
* This method will close the connection to the output.
*
* @throws IOException
* if problems occurred while closing the file or process.
*
* @throws SQLConsumerException
* if problems occurred while closing the connection to the
* database.
*/
void close()
throws IOException, SQLException;
}