com.softwareag.tamino.db.api.response.stream
Class TStreamElement

java.lang.Object
  extended by com.softwareag.tamino.db.api.response.stream.TStreamElement
All Implemented Interfaces:
TSAXElement

public class TStreamElement
extends java.lang.Object
implements TSAXElement

TStreamElement is an implementation for the TSAXElement interface needed for the response interpretation within the stream based object model.

Version:
$Revision: 1.9 $
Author:
Marcus Schreyer

Constructor Summary
TStreamElement()
          Initializes the TStreamElement.
 
Method Summary
 java.io.Reader getCharacterInputStream()
          Returns the character input stream that represents the entire elements content.
 java.lang.String getDocname()
          Gets the ino:docnaid from the underlying element.
 java.lang.String getDoctype()
          Gets the doctype to which this instance might be referred to.
 java.lang.String getId()
          Gets the ino:id if one is available.
 TStreamWriterHelper getWriterHelper()
          Gets the TSreamWriterHelper instance that is currently in use to write the streams element to.
 void setDocname(java.lang.String docname)
          Sets the ino:docname on the underlying element.
 void setId(java.lang.String id)
          Sets the ino:id on the underlying element.
 void writeTo(java.io.Writer writer)
          Serializes this elements content into the given character output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TStreamElement

public TStreamElement()
Initializes the TStreamElement. Elements content can afterwards be written to this streams element.

Method Detail

setDocname

public void setDocname(java.lang.String docname)
Sets the ino:docname on the underlying element. This operation is not implemented here.

Specified by:
setDocname in interface TSAXElement
Parameters:
docname - is the ino:docname attribute of the data object.

setId

public void setId(java.lang.String id)
Sets the ino:id on the underlying element. This operation is not implemented here.

Specified by:
setId in interface TSAXElement
Parameters:
id - denotes the ino:id that has to be set on the underlying element.

getDoctype

public java.lang.String getDoctype()
Gets the doctype to which this instance might be referred to. Please note, if this is not needed here simply hand back the empty string within an implementation. This operation is not implemented here.

Specified by:
getDoctype in interface TSAXElement
Returns:
the doctype information to which the sax based element might be referred to, the empty string otherwise.

getDocname

public java.lang.String getDocname()
Gets the ino:docnaid from the underlying element. This operation is not implemented here.

Specified by:
getDocname in interface TSAXElement
Returns:
the docname information to which the sax based element might be referred to, the empty string otherwise.

getId

public java.lang.String getId()
Gets the ino:id if one is available. This operation is not implemented here.

Specified by:
getId in interface TSAXElement
Returns:
the ino:id of the element, an empty string if none is available.

writeTo

public void writeTo(java.io.Writer writer)
Serializes this elements content into the given character output stream. This operation is not implemented here.

Specified by:
writeTo in interface TSAXElement
Parameters:
StringWriter - that takes the elements XML content.

getCharacterInputStream

public java.io.Reader getCharacterInputStream()
                                       throws java.io.IOException
Returns the character input stream that represents the entire elements content. Please note that this should not be called any ealier before the processing that takes place in order to establish this input stream is finnished. Once the character input stream is obtained it is no longer possible to write content to this TStreamElement instance.

Returns:
Reader containing the elements content.
Throws:
java.io.IOException

getWriterHelper

public TStreamWriterHelper getWriterHelper()
Gets the TSreamWriterHelper instance that is currently in use to write the streams element to.

Returns:
TStreamWriterHelper instance.


Copyright (c) 2013 Software AG. All Rights Reserved.