org.gcube.datatransformation.datatransformationlibrary.dataelements.impl
Class DataElementImpl

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement
      extended by org.gcube.datatransformation.datatransformationlibrary.dataelements.impl.DataElementImpl

public class DataElementImpl
extends DataElement

Author:
Dimitris Katris, NKUA Generic implementation of DataElement class. Content is an InputStream.

Field Summary
 
Fields inherited from class org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement
attributes
 
Method Summary
 void destroy()
           
 InputStream getContent()
          Abstract method which returns the content of the DataElement in a stream.
static DataElementImpl getSinkDataElement(DataElement sourceDataElement)
          Returns a new DataElementImpl which contains all the attributes taken from the source DataElement.
static DataElementImpl getSourceDataElement()
          Returns a new DataElementImpl.
 void setContent(InputStream content)
          Sets the content of the DataElement.
 
Methods inherited from class org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement
deleteAttribute, getAllAttributes, getAttributeValue, getContentType, getId, setAttribute, setContentType, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSourceDataElement

public static DataElementImpl getSourceDataElement()
Returns a new DataElementImpl.

Returns:
The new DataElementImpl.

getSinkDataElement

public static DataElementImpl getSinkDataElement(DataElement sourceDataElement)
Returns a new DataElementImpl which contains all the attributes taken from the source DataElement.

Parameters:
sourceDataElement - The DataElement from which the new one inherits all attributes.
Returns:
The new DataElementImpl.

getContent

public InputStream getContent()
Description copied from class: DataElement
Abstract method which returns the content of the DataElement in a stream.

Specified by:
getContent in class DataElement
Returns:
The content of the DataElement.
See Also:
DataElement.getContent()

setContent

public void setContent(InputStream content)
Sets the content of the DataElement.

Parameters:
content - The content of the DataElement.

destroy

public void destroy()
Specified by:
destroy in class DataElement


Copyright © 2013. All Rights Reserved.