|
|||||||||
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 TransformationUnit s 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 ContentType s 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 |
transformData(org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource source,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink)
This method transforms the input data which are fetched by the DataSource to the target ContentType and stores the transformed DataElement s 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,
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink)
This method transforms the input data which are fetched by the DataSource s to the target ContentType and stores the transformed DataElement s to the DataSink . |
void |
transformDataWithTransformationUnit(java.util.List<org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource> sources,
java.lang.String transformationProgramID,
java.lang.String transformationUnitID,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType,
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink,
boolean filterSources)
This method transforms the input data which are fetched by the DataSource s to the target ContentType and stores the transformed DataElement s 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 TransformationProgram
s.graph
- The TransformationsGraph
which the DTSCore
instance will use in order to search for applicable TransformationUnit
s.
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 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, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink) throws java.lang.Exception
This method transforms the input data which are fetched by the DataSource
s to the target ContentType
and stores the transformed DataElement
s 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 transformDataWithTransformationProgram(DataSource, String, Parameter[], ContentType, DataSink)
method fetches the DataElement
s.transformationProgramID
- The id of the TransformationProgram
.programUnboundParameters
- The unbound program parameters which are set by the client.targetContentType
- The ContentType
to which the DataElement
s are transformed.sink
- The DataSink
in which the transformed DataElement
s are stored.
java.lang.Exception
- If an error occurred in the transformationUnit process.public void transformDataWithTransformationUnit(java.util.List<org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource> sources, java.lang.String transformationProgramID, java.lang.String transformationUnitID, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] programUnboundParameters, org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink, boolean filterSources) throws java.lang.Exception
DataSource
s to the target ContentType
and stores the transformed DataElement
s to the DataSink
. The TransformationUnit
which will be used by the service is indicated by the client.
sources
- A List
with DataSource
s from which this method fetches the DataElement
s.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 DataElement
s are transformed.sink
- The DataSink
in which the transformed DataElement
s are stored.filterSources
- If true then the ContentType
of each DataElement
from the DataSource
s 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, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink sink)
DataSource
to the target ContentType
and stores the transformed DataElement
s to the DataSink
. In this method the service by its self discovers the TransformationProgram
to use.
source
- The DataSource
from which the transformData(DataSource, ContentType, DataSink)
method fetches the DataElement
s.targetContentType
- The ContentType
to which the DataElement
s are transformed.sink
- The DataSink
in which the transformed DataElement
s are stored.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 DataBridge
s 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)
TransformationUnit
s 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 TransformationProgram
s.
TransformationUnit
s.public java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.ContentType> getAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType)
ContentType
s to which an object can be transformed.
sourceContentType
- The source ContentType
.
ContentType
s.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |