org.gcube.datatransformation.datatransformationservice
Class StubsToModelUtils

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationservice.StubsToModelUtils

public class StubsToModelUtils
extends java.lang.Object

Author:
Dimitris Katris, NKUA Helper class that converts stub objects from model objects and the reverse.

Constructor Summary
StubsToModelUtils()
           
 
Method Summary
static ArrayOfContentTypes contentTypeArrayToStub(java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.ContentType> contentTypesList)
          Returns an array of stub ContentType from an ArrayList of model org.gcube.datatransformation.datatransformationlibrary.model.ContentType
static org.gcube.datatransformation.datatransformationlibrary.model.ContentType contentTypeFromStub(ContentType contentType)
          Returns a model org.gcube.datatransformation.datatransformationlibrary.model.ContentType from a stub ContentType
static ContentType contentTypeToStub(org.gcube.datatransformation.datatransformationlibrary.model.ContentType contentType)
          Returns a stub ContentType from a model org.gcube.datatransformation.datatransformationlibrary.model.ContentType.
static org.gcube.datatransformation.datatransformationlibrary.datahandlers.model.Input inputFromStub(Input stubInput)
          Returns model's Input constructed from stubs Input
static org.gcube.datatransformation.datatransformationlibrary.datahandlers.model.Output outputFromStub(Output stubOutput)
          Returns model's Output constructed from stubs Output
static org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] parametersFromStub(Parameter[] parameters)
          Returns an array of org.gcube.datatransformation.datatransformationlibrary.model.Parameter from an array of Parameter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubsToModelUtils

public StubsToModelUtils()
Method Detail

contentTypeFromStub

public static org.gcube.datatransformation.datatransformationlibrary.model.ContentType contentTypeFromStub(ContentType contentType)
                                                                                                    throws java.lang.Exception
Returns a model org.gcube.datatransformation.datatransformationlibrary.model.ContentType from a stub ContentType

Parameters:
contentType - The stub ContentType
Returns:
The model org.gcube.datatransformation.datatransformationlibrary.model.ContentType
Throws:
java.lang.Exception - If an error in conversion occurred.

parametersFromStub

public static org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] parametersFromStub(Parameter[] parameters)
Returns an array of org.gcube.datatransformation.datatransformationlibrary.model.Parameter from an array of Parameter

Parameters:
parameters - The array of Parameter
Returns:
The array of org.gcube.datatransformation.datatransformationlibrary.model.Parameter

contentTypeToStub

public static ContentType contentTypeToStub(org.gcube.datatransformation.datatransformationlibrary.model.ContentType contentType)
                                     throws java.lang.Exception
Returns a stub ContentType from a model org.gcube.datatransformation.datatransformationlibrary.model.ContentType.

Parameters:
contentType - The model org.gcube.datatransformation.datatransformationlibrary.model.ContentType
Returns:
The stub ContentType
Throws:
java.lang.Exception - If an error in conversion occurred.

contentTypeArrayToStub

public static ArrayOfContentTypes contentTypeArrayToStub(java.util.ArrayList<org.gcube.datatransformation.datatransformationlibrary.model.ContentType> contentTypesList)
Returns an array of stub ContentType from an ArrayList of model org.gcube.datatransformation.datatransformationlibrary.model.ContentType

Parameters:
contentTypesList - The ArrayList of model org.gcube.datatransformation.datatransformationlibrary.model.ContentType
Returns:
The array of ContentTypes

inputFromStub

public static org.gcube.datatransformation.datatransformationlibrary.datahandlers.model.Input inputFromStub(Input stubInput)
Returns model's Input constructed from stubs Input

Parameters:
stubInput -
Returns:

outputFromStub

public static org.gcube.datatransformation.datatransformationlibrary.datahandlers.model.Output outputFromStub(Output stubOutput)
Returns model's Output constructed from stubs Output

Parameters:
stubInput -
Returns: