org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl
Class MCollectionDataSource

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl.MCollectionDataSource

public class MCollectionDataSource
extends java.lang.Object

Author:
Dimitris Katris, NKUA

This DataSource fetches DataElements from a metadata collection.


Constructor Summary
MCollectionDataSource(java.lang.String input, Parameter[] inputParameters)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 boolean isClosed()
           
 DataElement next()
           
 ContentType nextContentType()
           
 java.lang.String streamToString(java.io.InputStream in)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCollectionDataSource

public MCollectionDataSource(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. getElementsRS is the only parameter identified.
Throws:
java.lang.Exception - If the MCollectionDataSource could not be initialized.
Method Detail

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()

streamToString

public java.lang.String streamToString(java.io.InputStream in)
                                throws java.io.IOException
Throws:
java.io.IOException

nextContentType

public ContentType nextContentType()