org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl
Class FTPDataSource
java.lang.Object
org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl.FTPDataSource
public class FTPDataSource
- extends java.lang.Object
- Author:
- Dimitris Katris, NKUA
This DataSource fetches DataElements from an ftp site.
Constructor Summary |
FTPDataSource()
Instantiates an FTPDataSource object. |
FTPDataSource(java.lang.String input,
Parameter[] inputParameters)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FTPDataSource
public FTPDataSource(java.lang.String input,
Parameter[] inputParameters)
throws java.lang.Exception
- Parameters:
input
- The input value of the DataSource.inputParameters
- The input parameters of the DataSource.
- Throws:
java.lang.Exception
- If a connection could not be established.
FTPDataSource
public FTPDataSource()
- Instantiates an FTPDataSource object.
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Tests ftp data source and sink.
- Parameters:
args
- The arguments of the main.
- Throws:
java.lang.Exception
- If an error occurred in the test.
hasNext
public boolean hasNext()
- Returns:
- true if the DataSource has more elements.
- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource#hasNext()
next
public DataElement next()
- Returns:
- the next element of the DataSource.
- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSource#next()
close
public void close()
- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler#close()
isClosed
public boolean isClosed()
- Returns:
- true if the DataHandler has been closed.
- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler#isClosed()
getDataElement
public DataElement getDataElement(java.lang.String dataElementID)
throws java.lang.Exception
- Parameters:
dataElementID
- The id of the DataElement
.
- Returns:
- The
DataElement
instance.
- Throws:
java.lang.Exception
- If an error occurred in getting the DataElement
.- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSource#getDataElement(java.lang.String)
getNextDataElementID
public java.lang.String getNextDataElementID()
throws java.lang.Exception
- Returns:
- The next data element id.
- Throws:
java.lang.Exception
- If the DistributableDataSource did not manage to get another data element id.- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSource#getNextDataElementID()
initializeDistributableDataSource
public void initializeDistributableDataSource(java.lang.String input,
Parameter[] inputParameters)
throws java.lang.Exception
- Parameters:
input
- The input of the DistributableDataSourceinputParameters
- Any input parameters required by the DistributableDataSource.
- Throws:
java.lang.Exception
- If the DistributableDataSource could not be initialized.- See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DistributableDataSource#initializeDistributableDataSource(java.lang.String, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[])
nextContentType
public ContentType nextContentType()