com.bea.xml.stream.events

Class BaseEvent

Implemented Interfaces:
javax.xml.stream.Location, javax.xml.stream.events.XMLEvent
Known Direct Subclasses:
CharactersEvent, DTDEvent, EndDocumentEvent, EntityDeclarationEvent, EntityReferenceEvent, NamedEvent, NotationDeclarationEvent, ProcessingInstructionEvent, StartDocumentEvent

public abstract class BaseEvent
extends java.lang.Object
implements javax.xml.stream.events.XMLEvent, javax.xml.stream.Location

Base event class for events to extend from

Constructor Summary

BaseEvent()
BaseEvent(int type)

Method Summary

javax.xml.stream.events.Characters
asCharacters()
javax.xml.stream.events.EndElement
asEndElement()
javax.xml.stream.events.StartElement
asStartElement()
protected abstract void
doWriteAsEncodedUnicode(Writer writer)
Template method to be implemented by sub-classes.
int
getCharacterOffset()
int
getColumnNumber()
int
getEventType()
int
getLineNumber()
javax.xml.stream.Location
getLocation()
String
getLocationURI()
String
getPublicId()
javax.xml.namespace.QName
getSchemaType()
String
getSourceName()
String
getSystemId()
String
getTypeAsString()
boolean
isAttribute()
boolean
isCharacters()
boolean
isEndDocument()
boolean
isEndElement()
boolean
isEntityReference()
boolean
isNamespace()
boolean
isProcessingInstruction()
boolean
isStartDocument()
boolean
isStartElement()
void
recycle()
void
setCharacterOffset(int c)
void
setColumnNumber(int col)
protected void
setEventType(int type)
void
setLineNumber(int line)
void
setLocationURI(String uri)
String
toString()
void
writeAsEncodedUnicode(Writer writer)

Constructor Details

BaseEvent

public BaseEvent()

BaseEvent

public BaseEvent(int type)

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

doWriteAsEncodedUnicode

protected abstract void doWriteAsEncodedUnicode(Writer writer)
            throws IOException,
                   javax.xml.stream.XMLStreamException
Template method to be implemented by sub-classes.

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

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

getLocation

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

getLocationURI

public String getLocationURI()

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

getTypeAsString

public String getTypeAsString()

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

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

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

isProcessingInstruction

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

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

recycle

public void recycle()

setCharacterOffset

public void setCharacterOffset(int c)

setColumnNumber

public void setColumnNumber(int col)

setEventType

protected void setEventType(int type)

setLineNumber

public void setLineNumber(int line)

setLocationURI

public void setLocationURI(String uri)

toString

public String toString()

writeAsEncodedUnicode

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