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

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

public class CollectionDataSink
extends java.lang.Thread

Author:
Dimitris Katris, NKUA

This DataSink stores DataElements in a new 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
CollectionDataSink(java.lang.String output, Parameter[] outputParameters)
           
 
Method Summary
 void append(DataElement object)
           
 void close()
           
 java.lang.String getOutput()
           
 boolean isClosed()
           
 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

CollectionDataSink

public CollectionDataSink(java.lang.String output,
                          Parameter[] outputParameters)
                   throws java.lang.Exception
Parameters:
output - The output value of the DataSink.
outputParameters - The output parameters of the DataSink.
Throws:
java.lang.Exception - If the new collection could not be created.
Method Detail

append

public void append(DataElement object)
Parameters:
object - DataElement to be appended to this DataSink
See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink#append(org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement)

close

public void close()
See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler#close()

getOutput

public java.lang.String getOutput()
Returns:
The output of the transformation.
See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink#getOutput()

run

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

isClosed

public boolean isClosed()
Returns:
true if the DataHandler has been closed.
See Also:
org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler#isClosed()