/*
* Copyright (c) 2012 Data Harmonisation Panel
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* HUMBOLDT EU Integrated Project #030962
* Data Harmonisation Panel <http://www.dhpanel.eu>
*/
package eu.esdihumboldt.hale.common.align.transformation.function;
import java.util.Map;
import com.google.common.collect.ListMultimap;
import eu.esdihumboldt.hale.common.align.model.ParameterValue;
import eu.esdihumboldt.hale.common.align.transformation.engine.TransformationEngine;
import eu.esdihumboldt.hale.common.align.transformation.report.TransformationLog;
import eu.esdihumboldt.hale.common.instance.model.FamilyInstance;
import eu.esdihumboldt.hale.common.instance.model.InstanceCollection;
import eu.esdihumboldt.hale.common.instance.model.ResourceIterator;
/**
* Partitions multiple instances.
*
* @param <E> the transformation engine type
* @author Kai Schwierczek
*/
public interface InstanceHandler<E extends TransformationEngine> {
/**
* Partition the given instances.
*
* @param instances the instances
* @param transformationIdentifier the transformation function identifier
* @param engine the transformation engine that may be used for the function
* execution
* @param transformationParameters the transformation parameters, may be
* <code>null</code>
* @param executionParameters additional parameters for the execution, may
* be <code>null</code>
* @param log the transformation log to report any information about the
* execution of the transformation to
* @return a resource iterator over partitioned instances instances
* @throws TransformationException if an unrecoverable error occurs during
* transformation
*/
public ResourceIterator<FamilyInstance> partitionInstances(InstanceCollection instances,
String transformationIdentifier, E engine,
ListMultimap<String, ParameterValue> transformationParameters,
Map<String, String> executionParameters, TransformationLog log)
throws TransformationException;
}