com.bea.xml.stream.events
Class BaseEvent
java.lang.Object
com.bea.xml.stream.events.BaseEvent
- All Implemented Interfaces:
- javax.xml.stream.events.XMLEvent, javax.xml.stream.Location, javax.xml.stream.XMLStreamConstants
- Direct Known Subclasses:
- CharactersEvent, DTDEvent, EndDocumentEvent, EntityReferenceEvent, NamedEvent, ProcessingInstructionEvent, StartDocumentEvent
public class BaseEvent
- extends java.lang.Object
- implements javax.xml.stream.events.XMLEvent, javax.xml.stream.Location
Base event class for events to extend from
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseEvent
public BaseEvent()
BaseEvent
public BaseEvent(int type)
getEventType
public int getEventType()
- Specified by:
getEventType
in interface javax.xml.stream.events.XMLEvent
setEventType
protected void setEventType(int type)
getTypeAsString
public java.lang.String getTypeAsString()
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement
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
isProcessingInstruction
public boolean isProcessingInstruction()
- Specified by:
isProcessingInstruction
in interface javax.xml.stream.events.XMLEvent
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interface javax.xml.stream.events.XMLEvent
isStartDocument
public boolean isStartDocument()
- Specified by:
isStartDocument
in interface javax.xml.stream.events.XMLEvent
isEndDocument
public boolean isEndDocument()
- Specified by:
isEndDocument
in interface javax.xml.stream.events.XMLEvent
isAttribute
public boolean isAttribute()
- Specified by:
isAttribute
in interface javax.xml.stream.events.XMLEvent
isNamespace
public boolean isNamespace()
- Specified by:
isNamespace
in interface javax.xml.stream.events.XMLEvent
getLocation
public javax.xml.stream.Location getLocation()
- Specified by:
getLocation
in interface javax.xml.stream.events.XMLEvent
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interface javax.xml.stream.Location
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interface javax.xml.stream.Location
getSourceName
public java.lang.String getSourceName()
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interface javax.xml.stream.Location
setLineNumber
public void setLineNumber(int line)
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interface javax.xml.stream.Location
setColumnNumber
public void setColumnNumber(int col)
getCharacterOffset
public int getCharacterOffset()
- Specified by:
getCharacterOffset
in interface javax.xml.stream.Location
setCharacterOffset
public void setCharacterOffset(int c)
getLocationURI
public java.lang.String getLocationURI()
setLocationURI
public void setLocationURI(java.lang.String uri)
asStartElement
public javax.xml.stream.events.StartElement asStartElement()
- Specified by:
asStartElement
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
asCharacters
public javax.xml.stream.events.Characters asCharacters()
- Specified by:
asCharacters
in interface javax.xml.stream.events.XMLEvent
recycle
public void recycle()
getSchemaType
public javax.xml.namespace.QName getSchemaType()
- Specified by:
getSchemaType
in interface javax.xml.stream.events.XMLEvent
writeAsEncodedUnicode
public void writeAsEncodedUnicode(java.io.Writer writer)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeAsEncodedUnicode
in interface javax.xml.stream.events.XMLEvent
- Throws:
javax.xml.stream.XMLStreamException