com.softwareag.tamino.db.api.response
Interface TResponseQueryContent

All Superinterfaces:
TResponseContent
All Known Implementing Classes:
TResponseQueryContentImpl

public interface TResponseQueryContent
extends TResponseContent

TResponseQueryContent is the interface that defines all operations needed to access the actual content of a response for a previous query operation. Such content only consists of TXMLObject instances. This interface defines operations so that such instance can be added to and cleared from the content. The content behaves as an ordered list and provides access to an iterator that can be used to navigate over the contents TXMLObject instances.

Version:
$Revision: 1.8 $
Author:
Marcus Schreyer

Method Summary
 void add(TXMLObject xmlObject)
          Adds the specified TXMLObject to the set.
 void addAll(java.util.Iterator iterator)
          Adds all TXMLObject instances underlying the iterator to the set.
 void clear()
          Clears the entire set.
 TXMLObject get(int index)
          Gets the TXMLObject at the specified index.
 java.lang.String getText()
          Gets text content that might be given for the response query content.
 boolean hasText()
          Indicates if text content is given for the response query content.
 java.util.Iterator iterator()
          Returns the iterator for this set.
 void reverse()
          Reverses the entire set of contained TXMLObjects.
 void set(int index, TXMLObject xmlObject)
          Sets the specified TXMLObject at the specified index.
 void setText(java.lang.String text)
          Sets text content that might be given for the responses query content.
 int size()
          Returns the size meaning number of TXMLObject instances currently stored within the sequence.
 void writeTo(java.io.Writer writer)
          Writes the current query content to the given Writer instance.
 

Method Detail

add

void add(TXMLObject xmlObject)
Adds the specified TXMLObject to the set.

Parameters:
xmlObject - that should be added to the set.

addAll

void addAll(java.util.Iterator iterator)
Adds all TXMLObject instances underlying the iterator to the set.

Parameters:
iterator - is the iterator for TXMLObject instances.

set

void set(int index,
         TXMLObject xmlObject)
         throws java.lang.IndexOutOfBoundsException
Sets the specified TXMLObject at the specified index.

Parameters:
index - should be in valid range.
xmlObject - is the object that should be inserted.
Throws:
java.lang.IndexOutOfBoundsException - when index is out of bounds.

setText

void setText(java.lang.String text)
Sets text content that might be given for the responses query content. As an example for a _xql=count(xpath) the xql:result element only contains text content instead of serveral XML documents. This content can be set by this method.

Parameters:
text - referrs to the text content that might be given for xql:result.

get

TXMLObject get(int index)
               throws java.lang.IndexOutOfBoundsException
Gets the TXMLObject at the specified index.

Returns:
TXMLObject at the specified index.
Throws:
java.lang.IndexOutOfBoundsException

getText

java.lang.String getText()
Gets text content that might be given for the response query content. As an example for a _xql=count(xpath) the xql:result element only contains text content instead of several XML documents. This content can be accessed with this method.

Returns:
the text content that might be given directly under the xql:result element, or if none is given the empty string.

hasText

boolean hasText()
Indicates if text content is given for the response query content. As an example for a _xql=count(xpath) the xql:result element only contains text content instead of several XML documents. This content can be accessed with this method.

Returns:
true if text content is given for the query content, false otherwise.

reverse

void reverse()
Reverses the entire set of contained TXMLObjects.


iterator

java.util.Iterator iterator()
Returns the iterator for this set. The iterator points to the start of the sequence.

Returns:
java.util.Iterator.

clear

void clear()
Clears the entire set. All TXMLObject instances already stored are removed.


size

int size()
Returns the size meaning number of TXMLObject instances currently stored within the sequence.


writeTo

void writeTo(java.io.Writer writer)
Writes the current query content to the given Writer instance. Please note that for TXMLObject instances only their root element with a given id and docname are written to the output stream. This operations mainly serves for debugging purpose.

Parameters:
writer - is the output stream to which the sequnce of TXMLObject instances are written to.


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