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

java.lang.Object
  extended by java.lang.Thread
      extended by org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl.CollectionDataSource
All Implemented Interfaces:
java.lang.Runnable

public class CollectionDataSource
extends java.lang.Thread

Author:
Dimitris Katris, NKUA

This DataSource fetches DataElements from a content collection.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CollectionDataSource(java.lang.String input, Parameter[] inputParameters)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 boolean isClosed()
           
 DataElement next()
           
 ContentType nextContentType()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionDataSource

public CollectionDataSource(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 data source 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()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

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

nextContentType

public ContentType nextContentType()