org.gcube.datatransformation.datatransformationservice
Class DataTransformationService

java.lang.Object
  extended by org.gcube.common.core.porttypes.GCUBEPortType
      extended by org.gcube.datatransformation.datatransformationservice.DataTransformationService
All Implemented Interfaces:
javax.xml.rpc.server.ServiceLifecycle

public class DataTransformationService
extends org.gcube.common.core.porttypes.GCUBEPortType

Author:
Dimitris Katris, NKUA DataTransformationService is the class implementing the WS-Interface of the DataTransformationServicePortType

Field Summary
protected static org.gcube.common.core.utils.logging.GCUBELog log
          Logs operations performed by DataTransformationService class
 
Fields inherited from class org.gcube.common.core.porttypes.GCUBEPortType
initialized, logger
 
Constructor Summary
DataTransformationService()
           
 
Method Summary
 org.gcube.datatransformation.datatransformationservice.stubs.ArrayOfDataElementIDandContentType evaluateContentTypeByDataElementID(org.gcube.datatransformation.datatransformationservice.stubs.EvaluateContentTypeByDataElementID request)
          Uses a ContentType evaluator which is identified by its type in order to evaluate the ContentType of an object.
 org.gcube.datatransformation.datatransformationservice.stubs.FindApplicableTransformationUnitsResponse findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationservice.stubs.FindApplicableTransformationUnits params)
          Searches for TransformationUnits that are able to perform a transformation from a source to a target ContentType.
 org.gcube.datatransformation.datatransformationservice.stubs.FindAvailableTargetContentTypesResponse findAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationservice.stubs.FindAvailableTargetContentTypes request)
          Searches for ContentTypes to which an object can be transformed.
protected  org.gcube.common.core.contexts.GCUBEServiceContext getServiceContext()
           
protected static void init()
          This method is invoked by the DTSContext on ready event When the service is ready it is able to do all the required initialization steps e.g.
 String queryTransformationPrograms(String query)
          Performs a query to get information about the transformation programs.
 org.gcube.datatransformation.datatransformationservice.stubs.TransformDataResponse transformData(org.gcube.datatransformation.datatransformationservice.stubs.TransformData params)
          This method transforms the input data to the target ContentType and stores the results to the output.
 org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationProgramResponse transformDataWithTransformationProgram(org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationProgram params)
          This method transforms the input data to the target ContentType and stores the results to the output.
 org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationUnitResponse transformDataWithTransformationUnit(org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationUnit params)
          This method transforms the input data to the target ContentType and stores the results to the output.
 
Methods inherited from class org.gcube.common.core.porttypes.GCUBEPortType
destroy, init, onFailure, onInitialisation, onReady, onStateChange, onUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.gcube.common.core.utils.logging.GCUBELog log
Logs operations performed by DataTransformationService class

Constructor Detail

DataTransformationService

public DataTransformationService()
Method Detail

init

protected static void init()
                    throws Exception
This method is invoked by the DTSContext on ready event When the service is ready it is able to do all the required initialization steps e.g. find info from the IS

Throws:
Exception - If an underlying component could not be initialized.

transformData

public org.gcube.datatransformation.datatransformationservice.stubs.TransformDataResponse transformData(org.gcube.datatransformation.datatransformationservice.stubs.TransformData params)
                                                                                                 throws org.gcube.common.core.faults.GCUBEFault
This method transforms the input data to the target ContentType and stores the results to the output. In this method the service by its self discovers the TransformationProgram to use.

Parameters:
params - The input (type + value), the output, the target ContentType and a boolean that denotes if the reporting mechanism shall be enabled.
Returns:
The output value as well as the identifier of the report (if requested).
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in transformData method occurred.

transformDataWithTransformationProgram

public org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationProgramResponse transformDataWithTransformationProgram(org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationProgram params)
                                                                                                                                                   throws org.gcube.common.core.faults.GCUBEFault
This method transforms the input data to the target ContentType and stores the results to the output. The TransformationProgram which will be used by the service is indicated by the client.

Parameters:
params - The input (type + value), the output, the target ContentType, the transformation program id and a boolean that denotes if the reporting mechanism shall be enabled.
Returns:
The output value as well as the identifier of the report (if requested).
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in transformDataWithTransformationProgram method occurred.

transformDataWithTransformationUnit

public org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationUnitResponse transformDataWithTransformationUnit(org.gcube.datatransformation.datatransformationservice.stubs.TransformDataWithTransformationUnit params)
                                                                                                                                             throws org.gcube.common.core.faults.GCUBEFault
This method transforms the input data to the target ContentType and stores the results to the output. The TransformationUnit which will be used by the service is indicated by the client.

Parameters:
The - input (type + value), the output, the target ContentType, the transformation program, unit id and a boolean that denotes if the reporting mechanism shall be enabled.
Returns:
The output value as well as the identifier of the report (if requested).
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in transformDataWithTransformationUnit method occurred.

findApplicableTransformationUnits

public org.gcube.datatransformation.datatransformationservice.stubs.FindApplicableTransformationUnitsResponse findApplicableTransformationUnits(org.gcube.datatransformation.datatransformationservice.stubs.FindApplicableTransformationUnits params)
                                                                                                                                         throws org.gcube.common.core.faults.GCUBEFault
Searches for TransformationUnits that are able to perform a transformation from a source to a target ContentType.

Parameters:
params - A source and a target ContentType.
Returns:
One or more available transformation units that can perform the conversion from the source to the target ContentType.
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in searching for transformation units occurred.

findAvailableTargetContentTypes

public org.gcube.datatransformation.datatransformationservice.stubs.FindAvailableTargetContentTypesResponse findAvailableTargetContentTypes(org.gcube.datatransformation.datatransformationservice.stubs.FindAvailableTargetContentTypes request)
                                                                                                                                     throws org.gcube.common.core.faults.GCUBEFault
Searches for ContentTypes to which an object can be transformed.

Parameters:
request - The source ContentType.
Returns:
One or more available target ContentTypes.
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in searching for available target ContentTypes occurred.

queryTransformationPrograms

public String queryTransformationPrograms(String query)
                                   throws org.gcube.common.core.faults.GCUBEFault
Performs a query to get information about the transformation programs.

Parameters:
query - The query about the transformation programs.
Returns:
The result of the query in xml format.
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in performing the query occurred.

evaluateContentTypeByDataElementID

public org.gcube.datatransformation.datatransformationservice.stubs.ArrayOfDataElementIDandContentType evaluateContentTypeByDataElementID(org.gcube.datatransformation.datatransformationservice.stubs.EvaluateContentTypeByDataElementID request)
                                                                                                                                   throws org.gcube.common.core.faults.GCUBEFault
Uses a ContentType evaluator which is identified by its type in order to evaluate the ContentType of an object.

Parameters:
request - The Data Element id and the type of the content type evaluator
Returns:
The ContentType of the data element.
Throws:
org.gcube.common.core.faults.GCUBEFault - If an error in evaluating the ContentType occurred.

getServiceContext

protected org.gcube.common.core.contexts.GCUBEServiceContext getServiceContext()
Specified by:
getServiceContext in class org.gcube.common.core.porttypes.GCUBEPortType


Copyright © 2012. All Rights Reserved.