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

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.dataelements.DataElement
      extended by org.gcube.datatransformation.datatransformationlibrary.dataelements.impl.StrDataElement
All Implemented Interfaces:
Serializable

public class StrDataElement
extends DataElement
implements Serializable

Author:
Dimitris Katris, NKUA Implementation of DataElement class in which the content is kept in a String.
See Also:
Serialized Form

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 StrDataElement getSinkDataElement(DataElement sourceDataElement)
          Returns a new StrDataElement which contains all the attributes taken from the source DataElement.
static StrDataElement getSourceDataElement()
          Returns a new StrDataElement instance.
 String getStringContent()
          Returns the content as String.
 void setContent(String 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 StrDataElement getSourceDataElement()
Returns a new StrDataElement instance.

Returns:
The new StrDataElement instance.

getSinkDataElement

public static StrDataElement getSinkDataElement(DataElement sourceDataElement)
Returns a new StrDataElement 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 StrDataElement instance.

setContent

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

Parameters:
content - The content of the DataElement.

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

getStringContent

public String getStringContent()
Returns the content as String.

Returns:
The content as String.

destroy

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


Copyright © 2013. All Rights Reserved.