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

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.datahandlers.impl.REFDataBridge
All Implemented Interfaces:
ContentTypeDataSource, DataBridge, DataHandler, DataSink, DataSource
Direct Known Subclasses:
FilterDataBridge

public class REFDataBridge
extends Object
implements DataBridge

Author:
Dimitris Katris, NKUA DataBridge which keeps references to DataElements when they are appended into it.

Constructor Summary
REFDataBridge()
           
 
Method Summary
 void append(DataElement object)
          Appends the specified DataElement to this DataSink
 void close()
          Closes this DataHandler and releases any resources associated with it.
 String getOutput()
          Returns the output of the transformation.
 boolean hasNext()
          Returns true if the DataSource has more DataElements.
 boolean isClosed()
          Returns the closed state of the DataHandler.
 DataElement next()
          Returns the next element of the DataSource.
 ContentType nextContentType()
          Returns the next element's ContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

REFDataBridge

public REFDataBridge()
Method Detail

append

public void append(DataElement object)
Description copied from interface: DataSink
Appends the specified DataElement to this DataSink

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

close

public void close()
Description copied from interface: DataHandler
Closes this DataHandler and releases any resources associated with it.

Specified by:
close in interface DataHandler
See Also:
DataHandler.close()

hasNext

public boolean hasNext()
Description copied from interface: DataSource
Returns true if the DataSource has more DataElements.

Specified by:
hasNext in interface ContentTypeDataSource
Specified by:
hasNext in interface DataSource
Returns:
true if the DataSource has more elements.
See Also:
DataSource.hasNext()

next

public DataElement next()
Description copied from interface: DataSource
Returns the next element of the DataSource.

Specified by:
next in interface DataSource
Returns:
The the next DataElement of the DataSource.
See Also:
DataSource.next()

getOutput

public String getOutput()
Description copied from interface: DataSink
Returns the output of the transformation.

Specified by:
getOutput in interface DataSink
Returns:
The output of the transformationUnit.
See Also:
DataSink.getOutput()

isClosed

public boolean isClosed()
Description copied from interface: DataHandler
Returns the closed state of the DataHandler.

Specified by:
isClosed in interface DataHandler
Returns:
true if the DataHandler has been closed.
See Also:
DataHandler.isClosed()

nextContentType

public ContentType nextContentType()
Description copied from interface: ContentTypeDataSource
Returns the next element's ContentType

Specified by:
nextContentType in interface ContentTypeDataSource
Returns:
the next element's ContentType


Copyright © 2013. All Rights Reserved.