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:
Runnable, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler, org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink

public class CollectionDataSink
extends Thread
implements org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink

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
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected static String PARAMETER_CollectionDesc
           
protected static String PARAMETER_CollectionName
           
protected static String PARAMETER_IsUserCollection
           
protected static String PARAMETER_IsVirtual
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CollectionDataSink(String output, org.gcube.datatransformation.datatransformationlibrary.model.Parameter[] outputParameters)
           
 
Method Summary
 void append(org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement object)
           
 void close()
           
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMETER_CollectionName

protected static final String PARAMETER_CollectionName
See Also:
Constant Field Values

PARAMETER_CollectionDesc

protected static final String PARAMETER_CollectionDesc
See Also:
Constant Field Values

PARAMETER_IsUserCollection

protected static final String PARAMETER_IsUserCollection
See Also:
Constant Field Values

PARAMETER_IsVirtual

protected static final String PARAMETER_IsVirtual
See Also:
Constant Field Values
Constructor Detail

CollectionDataSink

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

append

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

close

public void close()
Specified by:
close in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataHandler
See Also:
DataHandler.close()

getOutput

public String getOutput()
Specified by:
getOutput in interface org.gcube.datatransformation.datatransformationlibrary.datahandlers.DataSink
Returns:
The output of the transformation.
See Also:
DataSink.getOutput()

run

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

isClosed

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


Copyright © 2012. All Rights Reserved.