blob: fd6db407b89d55a727fac8988d206dbdf376d749 [file] [log] [blame]
/*********************************************************************
* Copyright (c) 2019 The University of York.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipse.epsilon.executors.etl;
import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
import org.eclipse.epsilon.etl.EtlModule;
import org.eclipse.epsilon.etl.IEtlModule;
import org.eclipse.epsilon.etl.trace.TransformationTrace;
import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The ETL executor
*
* @author Horacio Hoyos Rodriguez
*/
public class EtlExecutor extends AbstractLanguageExecutor implements IEtlExecutor {
private static final Logger logger = LoggerFactory.getLogger(EtlExecutor.class);
public EtlExecutor() {
this(new EtlModule());
}
public EtlExecutor(IEtlModule module) {
super(module);
logger.info("Creating the EvlStandaloneEngine");
}
@Override
public IEtlModule getModule() {
return (IEtlModule) super.getModule();
}
@Override
protected TransformationTrace executeInternal() throws EolRuntimeException {
logger.info("Executing ETL script.");
return (TransformationTrace) getModule().execute();
}
@Override
public TransformationTrace getResult() {
return (TransformationTrace) super.getResult();
}
}