public class FTPDataSource extends Object implements org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSource, org.gcube.datatransformation.datatransformationlibrary.datahandlers.ContentTypeDataSource
This DataSource fetches DataElements from an ftp site.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PARAMETER_DirectoryName |
protected static String |
PARAMETER_Password |
protected static String |
PARAMETER_Port |
protected static String |
PARAMETER_Username |
| Constructor and Description |
|---|
FTPDataSource()
Instantiates an FTPDataSource object.
|
FTPDataSource(String input,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] inputParameters) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement |
getDataElement(String dataElementID) |
String |
getNextDataElementID() |
boolean |
hasNext() |
void |
initializeDistributableDataSource(String input,
org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] inputParameters) |
boolean |
isClosed() |
static void |
main(String[] args)
Tests ftp data source and sink.
|
org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement |
next() |
org.gcube.datatransformation.datatransformationlibrary.model.ContentType |
nextContentType() |
protected static final String PARAMETER_DirectoryName
protected static final String PARAMETER_Username
protected static final String PARAMETER_Password
protected static final String PARAMETER_Port
public FTPDataSource(String input, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] inputParameters) throws Exception
input - The input value of the DataSource.inputParameters - The input parameters of the DataSource.Exception - If a connection could not be established.public FTPDataSource()
public static void main(String[] args) throws Exception
args - The arguments of the main.Exception - If an error occurred in the test.public boolean hasNext()
hasNext in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.ContentTypeDataSourcehasNext in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSourcehasNext in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSourceDataSource.hasNext()public org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement next()
next in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSourceDataSource.next()public void close()
close in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandlerDataHandler.close()public boolean isClosed()
isClosed in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandlerDataHandler.isClosed()public org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement getDataElement(String dataElementID) throws Exception
getDataElement in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSourcedataElementID - The id of the DataElement.DataElement instance.Exception - If an error occurred in getting the DataElement.DistributableDataSource.getDataElement(java.lang.String)public String getNextDataElementID() throws Exception
getNextDataElementID in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSourceException - If the DistributableDataSource did not manage to get another data element id.DistributableDataSource.getNextDataElementID()public void initializeDistributableDataSource(String input, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] inputParameters) throws Exception
initializeDistributableDataSource in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSourceinput - The input of the DistributableDataSourceinputParameters - Any input parameters required by the DistributableDataSource.Exception - If the DistributableDataSource could not be initialized.DistributableDataSource.initializeDistributableDataSource(java.lang.String, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[])public org.gcube.datatransformation.datatransformationlibrary.model.ContentType nextContentType()
nextContentType in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.ContentTypeDataSourceCopyright © 2014. All Rights Reserved.