|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gcube.datatransformation.datatransformationlibrary.DTSCore
public class DTSCore
| Constructor Summary | |
|---|---|
DTSCore(org.gcube.datatransformation.datatransformationlibrary.imanagers.IManager iManager,
org.gcube.datatransformation.datatransformationlibrary.model.graph.TransformationsGraph graph)
Constructor of DTSCore. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the information kept by the DTSCore instance. |
java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.TransformationUnit> |
findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
boolean createAndPublishCompositeTP)
Searches for TransformationUnits that are able to perform a transformationUnit from a source to a target ContentType. |
java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.ContentType> |
getAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType)
Searches for ContentTypes to which an object can be transformed. |
static org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataBridge |
getDataBridge()
Returns an instance of a DataBridge. |
static org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataBridge |
getHardDataBridge()
Returns an instance of a DataBridge. |
org.gcube.datatransformation.datatransformationlibrary.imanagers.IManager |
getIManager()
Returns the iManager object. |
void |
initializeAdaptor(org.gcube.datatransformation.datatransformationlibrary.transformation.model.TransformationDescription desc)
|
void |
transformData(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType)
This method transforms the input data which are fetched by the DataSource to the target ContentType and stores the transformed DataElements to the DataSink. |
void |
transformDataWithTransformationProgram(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source,
java.lang.String transformationProgramID,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType)
This method transforms the input data which are fetched by the DataSources to the target ContentType and stores the transformed DataElements to the DataSink. |
void |
transformDataWithTransformationUnit(java.lang.String transformationProgramID,
java.lang.String transformationUnitID,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
boolean filterSources)
This method transforms the input data which are fetched by the DataSources to the target ContentType and stores the transformed DataElements to the DataSink. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DTSCore(org.gcube.datatransformation.datatransformationlibrary.imanagers.IManager iManager,
org.gcube.datatransformation.datatransformationlibrary.model.graph.TransformationsGraph graph)
throws java.lang.Exception
DTSCore. DTSCore requires a IManager instance and a TransformationsGraph instance in order to be initialized.
iManager - The IManager from which the DTSCore instance will retrieve the TransformationPrograms.graph - The TransformationsGraph which the DTSCore instance will use in order to search for applicable TransformationUnits.
java.lang.Exception - If imanager or graph is not set.| Method Detail |
|---|
public org.gcube.datatransformation.datatransformationlibrary.imanagers.IManager getIManager()
public void destroy()
DTSCore instance.
public void initializeAdaptor(org.gcube.datatransformation.datatransformationlibrary.transformation.model.TransformationDescription desc)
throws java.lang.Exception
java.lang.Exception
public void transformDataWithTransformationProgram(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source,
java.lang.String transformationProgramID,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType)
throws java.lang.Exception
This method transforms the input data which are fetched by the DataSources to the target ContentType and stores the transformed DataElements to the DataSink. The TransformationProgram which will be used by the service is indicated by the client.
This method should be only used externally as internally the transformationUnit id is known. Putting a TP without the transformationUnit id is useful when having a TP that is created in order to perform an operation over some variable input content types, performed by different programs and the target format has common semantics.
source - The DataSource from which the DTSCore#transformDataWithTransformationProgram(DataSource, String, Parameter[], ContentType, DataSink) method fetches the DataElements.transformationProgramID - The id of the TransformationProgram.programUnboundParameters - The unbound program parameters which are set by the client.targetContentType - The ContentType to which the DataElements are transformed.
java.lang.Exception - If an error occurred in the transformationUnit process.
public void transformDataWithTransformationUnit(java.lang.String transformationProgramID,
java.lang.String transformationUnitID,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
boolean filterSources)
throws java.lang.Exception
DataSources to the target ContentType and stores the transformed DataElements to the DataSink. The TransformationUnit which will be used by the service is indicated by the client.
transformationProgramID - The id of the TransformationProgram.transformationUnitID - The id of the TransformationUnit.programUnboundParameters - A list with Program parameters set by the client.targetContentType - The ContentType to which the DataElements are transformed.filterSources - If true then the ContentType of each DataElement from the DataSources is checked if it conforms to the input expected by the TransformationUnit.
java.lang.Exception - If an error occurred in the transformationUnit process.
public void transformData(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType)
DataSource to the target ContentType and stores the transformed DataElements to the DataSink. In this method the service by its self discovers the TransformationProgram to use.
source - The DataSource from which the DTSCore#transformData(DataSource, ContentType, DataSink) method fetches the DataElements.targetContentType - The ContentType to which the DataElements are transformed.public static org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataBridge getDataBridge()
DataBridge. The class name of the DataBridge is set in the "dtslib.properties" file.
DataBridge.public static org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataBridge getHardDataBridge()
DataBridge. The class name of the DataBridge is set in the "dtslib.properties" file.
The difference with the getDataBridge() method is that hard DataBridges copies the content of each DataElement in the hard disk.
DataBridge.
public java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.TransformationUnit> findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
boolean createAndPublishCompositeTP)
TransformationUnits that are able to perform a transformationUnit from a source to a target ContentType.
sourceContentType - The source ContentType.targetContentType - The target ContentType.createAndPublishCompositeTP - If true then the TransformationsGraph creates and publishes the composite TransformationPrograms.
TransformationUnits.public java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.ContentType> getAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType)
ContentTypes to which an object can be transformed.
sourceContentType - The source ContentType.
ContentTypes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||