public abstract class Elm2ElmProgram extends Object implements Program
Abstract helper class that implements the Program interface.
Each class that extends the Elm2ElmProgram shall implement the transformDataElement(DataElement, List, ContentType) method which takes as input a DataElement and returns the transformed DataElement.
| Constructor and Description |
|---|
Elm2ElmProgram() |
| Modifier and Type | Method and Description |
|---|---|
void |
transform(List<DataSource> sources,
List<Parameter> programParameters,
ContentType targetContentType,
DataSink sink)
The method invoked by
ProgramExecutor in order for the Program to transform the sources to the targetContentType. |
abstract DataElement |
transformDataElement(DataElement sourceDataElement,
List<Parameter> programParameters,
ContentType targetContentType)
Transforms the sourceDataElement to the targetContentType and returns the transformed DataElement.
|
public void transform(List<DataSource> sources, List<Parameter> programParameters, ContentType targetContentType, DataSink sink) throws Exception
ProgramProgramExecutor in order for the Program to transform the sources to the targetContentType.transform in interface Programsources - The DataSources from which the Program will get the DataElements.programParameters - The parameters of the Program which are primarily set by the TransformationUnit.targetContentType - The ContentType in which the source data will be transformed.sink - The DataSink in which the Program will append the transformed DataElements.Exception - If the program is not capable to transform DataElements.Program.transform(java.util.List, java.util.List, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink)public abstract DataElement transformDataElement(DataElement sourceDataElement, List<Parameter> programParameters, ContentType targetContentType) throws Exception
Copyright © 2014. All Rights Reserved.