com.bea.xml.stream

Class AttributeBase

Implemented Interfaces:
javax.xml.stream.events.Attribute, javax.xml.stream.Location
Known Direct Subclasses:
NamespaceBase

public class AttributeBase
extends java.lang.Object
implements javax.xml.stream.events.Attribute, javax.xml.stream.Location

An implementation of the Attribute class.

Constructor Summary

AttributeBase(String prefix, String localName, String value)
AttributeBase(String prefix, String namespaceURI, String localName, String value, String attributeType)
AttributeBase(javax.xml.namespace.QName name, String value)

Method Summary

javax.xml.stream.events.Characters
asCharacters()
javax.xml.stream.events.EndElement
asEndElement()
javax.xml.stream.events.StartElement
asStartElement()
int
getCharacterOffset()
int
getColumnNumber()
String
getDTDType()
int
getEventType()
int
getLineNumber()
String
getLocalName()
javax.xml.stream.Location
getLocation()
String
getLocationURI()
javax.xml.namespace.QName
getName()
String
getNamespaceURI()
String
getPublicId()
javax.xml.namespace.QName
getSchemaType()
String
getSourceName()
String
getSystemId()
String
getValue()
boolean
hasName()
boolean
isAttribute()
boolean
isCharacters()
boolean
isDefault()
boolean
isEndDocument()
boolean
isEndElement()
boolean
isEndEntity()
boolean
isEntityReference()
boolean
isNamespace()
boolean
isNamespaceDeclaration()
boolean
isProcessingInstruction()
boolean
isSpecified()
By default, all attributes are created as specified since RI doesn't handle attribute defaulting.
boolean
isStartDocument()
boolean
isStartElement()
boolean
isStartEntity()
void
recycle()
void
setCharacterOffset(int c)
void
setColumnNumber(int col)
void
setLineNumber(int line)
void
setLocationURI(String uri)
void
setNamespaceURI(String uri)
String
toString()
void
writeAsEncodedUnicode(Writer writer)
static void
writeEncodedChar(java.io.Writer writer, char c)

Constructor Details

AttributeBase

public AttributeBase(String prefix,
                     String localName,
                     String value)

AttributeBase

public AttributeBase(String prefix,
                     String namespaceURI,
                     String localName,
                     String value,
                     String attributeType)

AttributeBase

public AttributeBase(javax.xml.namespace.QName name,
                     String value)

Method Details

asCharacters

public javax.xml.stream.events.Characters asCharacters()
Specified by:
asCharacters in interface javax.xml.stream.events.XMLEvent

asEndElement

public javax.xml.stream.events.EndElement asEndElement()
Specified by:
asEndElement in interface javax.xml.stream.events.XMLEvent

asStartElement

public javax.xml.stream.events.StartElement asStartElement()
Specified by:
asStartElement in interface javax.xml.stream.events.XMLEvent

getCharacterOffset

public int getCharacterOffset()
Specified by:
getCharacterOffset in interface javax.xml.stream.Location

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface javax.xml.stream.Location

getDTDType

public String getDTDType()
Specified by:
getDTDType in interface javax.xml.stream.events.Attribute

getEventType

public int getEventType()
Specified by:
getEventType in interface javax.xml.stream.events.XMLEvent

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface javax.xml.stream.Location

getLocalName

public String getLocalName()

getLocation

public javax.xml.stream.Location getLocation()
Specified by:
getLocation in interface javax.xml.stream.events.XMLEvent

getLocationURI

public String getLocationURI()

getName

public javax.xml.namespace.QName getName()
Specified by:
getName in interface javax.xml.stream.events.Attribute

getNamespaceURI

public String getNamespaceURI()

getPublicId

public String getPublicId()
Specified by:
getPublicId in interface javax.xml.stream.Location

getSchemaType

public javax.xml.namespace.QName getSchemaType()
Specified by:
getSchemaType in interface javax.xml.stream.events.XMLEvent

getSourceName

public String getSourceName()

getSystemId

public String getSystemId()
Specified by:
getSystemId in interface javax.xml.stream.Location

getValue

public String getValue()
Specified by:
getValue in interface javax.xml.stream.events.Attribute

hasName

public boolean hasName()

isAttribute

public boolean isAttribute()
Specified by:
isAttribute in interface javax.xml.stream.events.XMLEvent

isCharacters

public boolean isCharacters()
Specified by:
isCharacters in interface javax.xml.stream.events.XMLEvent

isDefault

public boolean isDefault()

isEndDocument

public boolean isEndDocument()
Specified by:
isEndDocument in interface javax.xml.stream.events.XMLEvent

isEndElement

public boolean isEndElement()
Specified by:
isEndElement in interface javax.xml.stream.events.XMLEvent

isEndEntity

public boolean isEndEntity()

isEntityReference

public boolean isEntityReference()
Specified by:
isEntityReference in interface javax.xml.stream.events.XMLEvent

isNamespace

public boolean isNamespace()
Specified by:
isNamespace in interface javax.xml.stream.events.XMLEvent

isNamespaceDeclaration

public boolean isNamespaceDeclaration()

isProcessingInstruction

public boolean isProcessingInstruction()
Specified by:
isProcessingInstruction in interface javax.xml.stream.events.XMLEvent

isSpecified

public boolean isSpecified()
By default, all attributes are created as specified since RI doesn't handle attribute defaulting.
Specified by:
isSpecified in interface javax.xml.stream.events.Attribute

isStartDocument

public boolean isStartDocument()
Specified by:
isStartDocument in interface javax.xml.stream.events.XMLEvent

isStartElement

public boolean isStartElement()
Specified by:
isStartElement in interface javax.xml.stream.events.XMLEvent

isStartEntity

public boolean isStartEntity()

recycle

public void recycle()

setCharacterOffset

public void setCharacterOffset(int c)

setColumnNumber

public void setColumnNumber(int col)

setLineNumber

public void setLineNumber(int line)

setLocationURI

public void setLocationURI(String uri)

setNamespaceURI

public void setNamespaceURI(String uri)

toString

public String toString()

writeAsEncodedUnicode

public void writeAsEncodedUnicode(Writer writer)
            throws javax.xml.stream.XMLStreamException
Specified by:
writeAsEncodedUnicode in interface javax.xml.stream.events.XMLEvent

writeEncodedChar

public static void writeEncodedChar(java.io.Writer writer,
                                    char c)
            throws java.io.IOException