com.trolltech.qt.xml
Class QXmlStreamAttributes

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.xml.QXmlStreamAttributes
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QXmlStreamAttributes
extends QtJambiObject
implements java.lang.Cloneable

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute. Attributes are returned by a QXmlStreamReader in attributes() when the reader reports a start element . The class can also be used with a QXmlStreamWriter as an argument to writeAttributes().

The convenience function value() loops over the vector and returns an attribute value for a given namespaceUri and an attribute's name.

New attributes can be added with append().


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Constructor Summary
QXmlStreamAttributes()
          Creates a new QXmlStreamAttributes object.
 
Method Summary
 void append(QXmlStreamAttribute attribute)
          Appends attribute to this QXmlStreamAttributes.
 void append(java.lang.String qualifiedName, java.lang.String value)
          Appends a new attribute with qualified name qualifiedName and value value.
 void append(java.lang.String namespaceUri, java.lang.String name, java.lang.String value)
          Appends a new attribute with name in the namespace described with namespaceUri, and value value.
 QXmlStreamAttribute at(int i)
           
 int capacity()
           
 void clear()
           
 QXmlStreamAttributes clone()
          This method is reimplemented for internal reasons
 boolean contains(QXmlStreamAttribute t)
           
 int count()
           
 int count(QXmlStreamAttribute t)
           
 boolean empty()
           
 java.util.List fill(QXmlStreamAttribute t)
           
 java.util.List fill(QXmlStreamAttribute t, int size)
           
 QXmlStreamAttribute first()
          
static java.util.List fromList(java.util.List list)
           
static QXmlStreamAttributes fromNativePointer(QNativePointer nativePointer)
          This method returns the QXmlStreamAttributes instance pointed to by nativePointer.
 int indexOf(QXmlStreamAttribute t)
           
 int indexOf(QXmlStreamAttribute t, int from)
           
 boolean isEmpty()
           
 QXmlStreamAttribute last()
          
 int lastIndexOf(QXmlStreamAttribute t)
           
 int lastIndexOf(QXmlStreamAttribute t, int from)
           
 java.util.List mid(int pos)
           
 java.util.List mid(int pos, int length)
           
static QNativePointer nativePointerArray(QXmlStreamAttributes[] array)
          This function returns a QNativePointer that is pointing to the specified QXmlStreamAttributes array.
 void prepend(QXmlStreamAttribute t)
           
 void remove(int i)
           
 void remove(int i, int n)
           
 void replace(int i, QXmlStreamAttribute t)
           
 void reserve(int size)
           
 void resize(int size)
           
 void setSharable(boolean sharable)
           
 int size()
           
 void squeeze()
           
 java.util.List toList()
           
 java.lang.String value(java.lang.String qualifiedName)
          Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined.
 java.lang.String value(java.lang.String namespaceUri, java.lang.String name)
          Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined.
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QXmlStreamAttributes

public QXmlStreamAttributes()
Creates a new QXmlStreamAttributes object.

Method Detail

append

public final void append(java.lang.String namespaceUri,
                         java.lang.String name,
                         java.lang.String value)
Appends a new attribute with name in the namespace described with namespaceUri, and value value. The namespaceUri can be empty.


append

public final void append(java.lang.String qualifiedName,
                         java.lang.String value)
Appends a new attribute with qualified name qualifiedName and value value.


append

public final void append(QXmlStreamAttribute attribute)
Appends attribute to this QXmlStreamAttributes.


at

public final QXmlStreamAttribute at(int i)

capacity

public final int capacity()

clear

public final void clear()

contains

public final boolean contains(QXmlStreamAttribute t)

count

public final int count()

count

public final int count(QXmlStreamAttribute t)

empty

public final boolean empty()

fill

public final java.util.List fill(QXmlStreamAttribute t)

fill

public final java.util.List fill(QXmlStreamAttribute t,
                                 int size)

first

public final QXmlStreamAttribute first()


indexOf

public final int indexOf(QXmlStreamAttribute t)

indexOf

public final int indexOf(QXmlStreamAttribute t,
                         int from)

isEmpty

public final boolean isEmpty()

last

public final QXmlStreamAttribute last()


lastIndexOf

public final int lastIndexOf(QXmlStreamAttribute t)

lastIndexOf

public final int lastIndexOf(QXmlStreamAttribute t,
                             int from)

mid

public final java.util.List mid(int pos)

mid

public final java.util.List mid(int pos,
                                int length)

prepend

public final void prepend(QXmlStreamAttribute t)

remove

public final void remove(int i)

remove

public final void remove(int i,
                         int n)

replace

public final void replace(int i,
                          QXmlStreamAttribute t)

reserve

public final void reserve(int size)

resize

public final void resize(int size)

setSharable

public final void setSharable(boolean sharable)

size

public final int size()

squeeze

public final void squeeze()

toList

public final java.util.List toList()

value

public final java.lang.String value(java.lang.String namespaceUri,
                                    java.lang.String name)
Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.


value

public final java.lang.String value(java.lang.String qualifiedName)
Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix, followed by colon, followed by the attribute's local name. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualified names, but a resolved namespaceUri and the attribute's local name.


fromList

public static java.util.List fromList(java.util.List list)

fromNativePointer

public static QXmlStreamAttributes fromNativePointer(QNativePointer nativePointer)
This method returns the QXmlStreamAttributes instance pointed to by nativePointer.


nativePointerArray

public static QNativePointer nativePointerArray(QXmlStreamAttributes[] array)
This function returns a QNativePointer that is pointing to the specified QXmlStreamAttributes array.


clone

public QXmlStreamAttributes clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object