org.gcube.datatransformation.datatransformationlibrary.model.graph
Class RemoteTransformationsGraph

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.model.graph.RemoteTransformationsGraph
All Implemented Interfaces:
TransformationsGraph

public class RemoteTransformationsGraph
extends Object
implements TransformationsGraph

Author:
Dimitris Katris, NKUA

Implementation of TransformationsGraph which finds the available transformationUnit units by invoking a remote graph service.


Constructor Summary
RemoteTransformationsGraph(IManager iManager, String remoteGraphEndpoint)
          Instantiates the RemoteTransformationsGraph.
 
Method Summary
 void destroy()
          Destroys the graph.
 ArrayList<TransformationUnit> findAnyTransformationUnits(ContentType sourceContentType, ContentType targetContentType, boolean createAndPublishCompositeTP)
          Finds Transformation Units from the sourceContentType to the targetContentType.
 ArrayList<TransformationUnit> findApplicableTransformationUnits(ContentType sourceContentType, ContentType targetContentType, boolean createAndPublishCompositeTP)
          Finds applicable Transformation Units from the sourceContentType to the targetContentType.
 ArrayList<ContentType> findAvailableTargetContentTypes(ContentType sourceContentType)
          Finds the available target ContentTypes from the sourceContentType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteTransformationsGraph

public RemoteTransformationsGraph(IManager iManager,
                                  String remoteGraphEndpoint)
                           throws Exception
Instantiates the RemoteTransformationsGraph.

Parameters:
iManager - The IManager from which the graph will use to find information about transformationUnit programs.
remoteGraphEndpoint - The endpoind reference of the remote graph.
Throws:
Exception - If the service call could not be created.
Method Detail

findApplicableTransformationUnits

public ArrayList<TransformationUnit> findApplicableTransformationUnits(ContentType sourceContentType,
                                                                       ContentType targetContentType,
                                                                       boolean createAndPublishCompositeTP)
Description copied from interface: TransformationsGraph
Finds applicable Transformation Units from the sourceContentType to the targetContentType.

Specified by:
findApplicableTransformationUnits in interface TransformationsGraph
Parameters:
sourceContentType - The ContentType of the source DataElement.
targetContentType - The ContentType of the target DataElement.
createAndPublishCompositeTP - If true then a new composite TransformationProgram is created and published if no available TransformationProgram exists.
Returns:
The available TransformationUnits.
See Also:
TransformationsGraph.findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, boolean)

findAnyTransformationUnits

public ArrayList<TransformationUnit> findAnyTransformationUnits(ContentType sourceContentType,
                                                                ContentType targetContentType,
                                                                boolean createAndPublishCompositeTP)
Description copied from interface: TransformationsGraph
Finds Transformation Units from the sourceContentType to the targetContentType. Returns also generic Transformation Units.

Specified by:
findAnyTransformationUnits in interface TransformationsGraph
Parameters:
sourceContentType - The ContentType of the source DataElement.
targetContentType - The ContentType of the target DataElement.
createAndPublishCompositeTP - If true then a new composite TransformationProgram is created and published if no available TransformationProgram exists.
Returns:
The available TransformationUnits.
See Also:
TransformationsGraph.findAnyTransformationUnits(org.gcube.datatransformation.datatransformationlibrary.model.ContentType, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, boolean)

findAvailableTargetContentTypes

public ArrayList<ContentType> findAvailableTargetContentTypes(ContentType sourceContentType)
Description copied from interface: TransformationsGraph
Finds the available target ContentTypes from the sourceContentType.

Specified by:
findAvailableTargetContentTypes in interface TransformationsGraph
Parameters:
sourceContentType - The ContentType of the source DataElement.
Returns:
The available target ContentTypes from the sourceContentType.
See Also:
TransformationsGraph.findAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationlibrary.model.ContentType)

destroy

public void destroy()
Description copied from interface: TransformationsGraph
Destroys the graph.

Specified by:
destroy in interface TransformationsGraph
See Also:
TransformationsGraph.destroy()


Copyright © 2013. All Rights Reserved.