public abstract class File2FileProgram extends Elm2ElmProgram
Abstract helper class that implements the Program interface.
Each class that extends the P2PProgram shall implement the File2FileProgram#transformObjectFromItsPath(String, List, ContentType) method which takes as input a file location and returns the location of a file which contains the transformed content.
| Constructor and Description |
|---|
File2FileProgram() |
| Modifier and Type | Method and Description |
|---|---|
DataElement |
transformDataElement(DataElement sourceDataElement,
List<Parameter> programParameters,
ContentType targetContentType)
Transforms the sourceDataElement to the targetContentType and returns the transformed DataElement.
|
abstract File |
transformFile(File sourceFile,
List<Parameter> programParameters,
ContentType targetContentType,
String targetContentPath)
Transforms the content of the sourceFile file to the targetContentType and returns the transformed content in a file.
|
transformpublic DataElement transformDataElement(DataElement sourceDataElement, List<Parameter> programParameters, ContentType targetContentType) throws Exception
Elm2ElmProgramtransformDataElement in class Elm2ElmProgramsourceDataElement - The source DataElement.programParameters - The parameters of the Program.targetContentType - The ContentType in which the DataElement will be transformed.Exception - If the Program is not capable to transform DataElements.Elm2ElmProgram.transformDataElement(org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement, java.util.List, org.gcube.datatransformation.datatransformationlibrary.model.ContentType)public abstract File transformFile(File sourceFile, List<Parameter> programParameters, ContentType targetContentType, String targetContentPath) throws Exception
sourceFile - The source file.programParameters - The parameters of the Program.targetContentType - The ContentType in which the DataElement will be transformed.targetContentPath - The path for the transformed content.Exception - If the Program is not capable to transform DataElements.Copyright © 2014. All Rights Reserved.