javax.xml.stream.util

Class ReaderDelegate

Implemented Interfaces:
XMLStreamConstants, XMLStreamReader

public class ReaderDelegate
extends Object
implements XMLStreamReader, XMLStreamConstants

Base class for XML stream reader filters.

Fields inherited from interface javax.xml.stream.XMLStreamConstants

ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, END_ENTITY, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT, START_ENTITY

Constructor Summary

ReaderDelegate()
Constructs an empty filter with no parent set.
ReaderDelegate(XMLStreamReader reader)
Constructs an empty filter with the specfied parent.

Method Summary

void
close()
int
getAttributeCount()
String
getAttributeName(int index)
String
getAttributeNamespace(int index)
String
getAttributePrefix(int index)
QName
getAttributeQName(int index)
String
getAttributeType(int index)
String
getAttributeValue(int index)
String
getAttributeValue(String namespaceUri, String localName)
String
getCharacterEncodingScheme()
String
getElementText()
String
getEncoding()
int
getEventType()
String
getLocalName()
Location
getLocation()
QName
getName()
NamespaceContext
getNamespaceContext()
int
getNamespaceCount()
String
getNamespacePrefix(int index)
String
getNamespaceURI()
String
getNamespaceURI(int index)
String
getNamespaceURI(String prefix)
String
getPIData()
String
getPITarget()
XMLStreamReader
getParent()
Returns the parent.
String
getPrefix()
Object
getProperty(String name)
String
getText()
char[]
getTextCharacters()
int
getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
int
getTextLength()
int
getTextStart()
String
getVersion()
boolean
hasName()
boolean
hasNext()
boolean
hasText()
boolean
isAttributeSpecified(int index)
boolean
isCharacters()
boolean
isEndElement()
boolean
isStandalone()
boolean
isStartElement()
boolean
isWhiteSpace()
int
next()
int
nextTag()
void
require(int type, String namespaceURI, String localName)
void
setParent(XMLStreamReader reader)
Sets the parent.
boolean
standaloneSet()

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ReaderDelegate

public ReaderDelegate()
Constructs an empty filter with no parent set.


ReaderDelegate

public ReaderDelegate(XMLStreamReader reader)
Constructs an empty filter with the specfied parent.

Method Details

close

public void close()
            throws XMLStreamException
Specified by:
close in interface XMLStreamReader


getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface XMLStreamReader


getAttributeName

public String getAttributeName(int index)
Specified by:
getAttributeName in interface XMLStreamReader


getAttributeNamespace

public String getAttributeNamespace(int index)
Specified by:
getAttributeNamespace in interface XMLStreamReader


getAttributePrefix

public String getAttributePrefix(int index)
Specified by:
getAttributePrefix in interface XMLStreamReader


getAttributeQName

public QName getAttributeQName(int index)
Specified by:
getAttributeQName in interface XMLStreamReader


getAttributeType

public String getAttributeType(int index)
Specified by:
getAttributeType in interface XMLStreamReader


getAttributeValue

public String getAttributeValue(int index)
Specified by:
getAttributeValue in interface XMLStreamReader


getAttributeValue

public String getAttributeValue(String namespaceUri,
                                String localName)
Specified by:
getAttributeValue in interface XMLStreamReader


getCharacterEncodingScheme

public String getCharacterEncodingScheme()
Specified by:
getCharacterEncodingScheme in interface XMLStreamReader


getElementText

public String getElementText()
            throws XMLStreamException
Specified by:
getElementText in interface XMLStreamReader


getEncoding

public String getEncoding()
Specified by:
getEncoding in interface XMLStreamReader


getEventType

public int getEventType()
Specified by:
getEventType in interface XMLStreamReader


getLocalName

public String getLocalName()
Specified by:
getLocalName in interface XMLStreamReader


getLocation

public Location getLocation()
Specified by:
getLocation in interface XMLStreamReader


getName

public QName getName()
Specified by:
getName in interface XMLStreamReader


getNamespaceContext

public NamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface XMLStreamReader


getNamespaceCount

public int getNamespaceCount()
Specified by:
getNamespaceCount in interface XMLStreamReader


getNamespacePrefix

public String getNamespacePrefix(int index)
Specified by:
getNamespacePrefix in interface XMLStreamReader


getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface XMLStreamReader


getNamespaceURI

public String getNamespaceURI(int index)
Specified by:
getNamespaceURI in interface XMLStreamReader


getNamespaceURI

public String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface XMLStreamReader


getPIData

public String getPIData()
Specified by:
getPIData in interface XMLStreamReader


getPITarget

public String getPITarget()
Specified by:
getPITarget in interface XMLStreamReader


getParent

public XMLStreamReader getParent()
Returns the parent.


getPrefix

public String getPrefix()
Specified by:
getPrefix in interface XMLStreamReader


getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface XMLStreamReader


getText

public String getText()
Specified by:
getText in interface XMLStreamReader


getTextCharacters

public char[] getTextCharacters()
Specified by:
getTextCharacters in interface XMLStreamReader


getTextCharacters

public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
            throws XMLStreamException
Specified by:
getTextCharacters in interface XMLStreamReader


getTextLength

public int getTextLength()
Specified by:
getTextLength in interface XMLStreamReader


getTextStart

public int getTextStart()
Specified by:
getTextStart in interface XMLStreamReader


getVersion

public String getVersion()
Specified by:
getVersion in interface XMLStreamReader


hasName

public boolean hasName()
Specified by:
hasName in interface XMLStreamReader


hasNext

public boolean hasNext()
            throws XMLStreamException
Specified by:
hasNext in interface XMLStreamReader


hasText

public boolean hasText()
Specified by:
hasText in interface XMLStreamReader


isAttributeSpecified

public boolean isAttributeSpecified(int index)
Specified by:
isAttributeSpecified in interface XMLStreamReader


isCharacters

public boolean isCharacters()
Specified by:
isCharacters in interface XMLStreamReader


isEndElement

public boolean isEndElement()
Specified by:
isEndElement in interface XMLStreamReader


isStandalone

public boolean isStandalone()
Specified by:
isStandalone in interface XMLStreamReader


isStartElement

public boolean isStartElement()
Specified by:
isStartElement in interface XMLStreamReader


isWhiteSpace

public boolean isWhiteSpace()
Specified by:
isWhiteSpace in interface XMLStreamReader


next

public int next()
            throws XMLStreamException
Specified by:
next in interface XMLStreamReader


nextTag

public int nextTag()
            throws XMLStreamException
Specified by:
nextTag in interface XMLStreamReader


require

public void require(int type,
                    String namespaceURI,
                    String localName)
            throws XMLStreamException
Specified by:
require in interface XMLStreamReader


setParent

public void setParent(XMLStreamReader reader)
Sets the parent.


standaloneSet

public boolean standaloneSet()
Specified by:
standaloneSet in interface XMLStreamReader


ReaderDelegate.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.