org.gcube.datatransformation.datatransformationlibrary.datahandlers
Interface DistributableDataSource


public interface DistributableDataSource

Author:
Dimitris Katris, NKUA DistributableDataSource is the interface implemented by DataSources whose DataElements are able to be distributed in workers.

Method Summary
 DataElement getDataElement(String dataElementID)
          Returns a DataElement instance from its id.
 String getNextDataElementID()
          Returns the next DataElement id which will be send to the worker.
 boolean hasNext()
          Returns true if there is another DataElement id available.
 void initializeDistributableDataSource(String input, Parameter[] inputParameters)
          Initializes the DistributableDataSource.
 

Method Detail

getDataElement

DataElement getDataElement(String dataElementID)
                           throws Exception
Returns a DataElement instance from its id.

Parameters:
dataElementID - The id of the DataElement.
Returns:
The DataElement instance.
Throws:
Exception - If an error occurred in getting the DataElement.

getNextDataElementID

String getNextDataElementID()
                            throws Exception
Returns the next DataElement id which will be send to the worker.

Returns:
The next data element id.
Throws:
Exception - If the DistributableDataSource did not manage to get another data element id.

hasNext

boolean hasNext()
Returns true if there is another DataElement id available.

Returns:
true if there is another DataElement id available.

initializeDistributableDataSource

void initializeDistributableDataSource(String input,
                                       Parameter[] inputParameters)
                                       throws Exception
Initializes the DistributableDataSource.

Parameters:
input - The input of the DistributableDataSource
inputParameters - Any input parameters required by the DistributableDataSource.
Throws:
Exception - If the DistributableDataSource could not be initialized.


Copyright © 2013. All Rights Reserved.