com.softwareag.tamino.db.api.response
Class TSerializedResponse

java.lang.Object
  extended by com.softwareag.tamino.db.api.response.TAbstractResponse
      extended by com.softwareag.tamino.db.api.response.TSerializedResponse
All Implemented Interfaces:
TResponse, TResponseContent, TResponseHandle

public class TSerializedResponse
extends TAbstractResponse

TAbstractResponse is the basis for response implementations. A complete response implementation needs to overload all methods, a partial implementation needs only to overload the required methods.

Version:
$Revision: 1.1 $
Author:
Vikram Shinde

Constructor Summary
TSerializedResponse(TInputStream inputStream)
           
 
Method Summary
 TInputStream getQueryContentAsStream()
          Gets the result of a query as a InputStream.
 java.lang.String getQueryContentAsString()
          Gets the content for a query related response as a String.
 
Methods inherited from class com.softwareag.tamino.db.api.response.TAbstractResponse
getFirstNonXMLObject, getFirstXMLObject, getInfoContent, getLocale, getMessageCode, getMessageLine, getMessageText, getNonXMLObjectIterator, getReturnValue, getWarnings, getXMLObjectIterator, hasFirstNonXMLObject, hasFirstXMLObject, hasQueryContent, hasWarnings, setLocale, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TSerializedResponse

public TSerializedResponse(TInputStream inputStream)
Method Detail

getQueryContentAsString

public java.lang.String getQueryContentAsString()
Gets the content for a query related response as a String. Here only the content that is delivered under the xql:result tag is provided. If this is given as a result set of XML documents these are serialzed into the resulting string only with their root elements but without deeper content. The result for a xpath function call such as count(xpath) is delivered as a pure string.

Specified by:
getQueryContentAsString in interface TResponse
Overrides:
getQueryContentAsString in class TAbstractResponse
Returns:
the String that reflects the text content given for a xql:result element within a Tamino response document. If none is given because the response is not related to a query operation an empty string is provided.

getQueryContentAsStream

public TInputStream getQueryContentAsStream()
Description copied from class: TAbstractResponse
Gets the result of a query as a InputStream.

Specified by:
getQueryContentAsStream in interface TResponse
Overrides:
getQueryContentAsStream in class TAbstractResponse
Returns:
the result of a query as a Stream, if available. Otherwise, an empty stream is returned.


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