public abstract class DummyEvent extends Object implements XMLEvent
| Modifier and Type | Field and Description |
|---|---|
protected Location |
fLocation |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT| Constructor and Description |
|---|
DummyEvent() |
DummyEvent(int i) |
| Modifier and Type | Method and Description |
|---|---|
Characters |
asCharacters()
Returns this event as Characters, may result in
a class cast exception if this event is not Characters.
|
EndElement |
asEndElement()
Returns this event as an end element event, may result in
a class cast exception if this event is not a end element.
|
StartElement |
asStartElement()
Returns this event as a start element event, may result in
a class cast exception if this event is not a start element.
|
protected void |
charEncode(Writer writer,
String data)
Helper method to escape < > & for characters event and
quotes, lt and amps for Entity
|
int |
getEventType() |
Location |
getLocation() |
QName |
getSchemaType()
This method is provided for implementations to provide
optional type information about the associated event.
|
boolean |
isAttribute()
A utility function to check if this event is an Attribute.
|
boolean |
isCharacterData() |
boolean |
isCharacters()
A utility function to check if this event is Characters.
|
boolean |
isEndDocument() |
boolean |
isEndElement() |
boolean |
isEntityReference() |
boolean |
isNamespace()
A utility function to check if this event is a Namespace.
|
boolean |
isProcessingInstruction() |
boolean |
isStartDocument() |
boolean |
isStartElement() |
protected void |
setEventType(int eventType) |
void |
writeAsEncodedUnicode(Writer writer)
This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
|
protected abstract void |
writeAsEncodedUnicodeEx(Writer writer)
Helper method in order to expose IOException.
|
protected Location fLocation
public int getEventType()
getEventType in interface XMLEventprotected void setEventType(int eventType)
public boolean isStartElement()
isStartElement in interface XMLEventpublic boolean isEndElement()
isEndElement in interface XMLEventpublic boolean isEntityReference()
isEntityReference in interface XMLEventpublic boolean isProcessingInstruction()
isProcessingInstruction in interface XMLEventpublic boolean isCharacterData()
public boolean isStartDocument()
isStartDocument in interface XMLEventpublic boolean isEndDocument()
isEndDocument in interface XMLEventpublic Location getLocation()
getLocation in interface XMLEventpublic Characters asCharacters()
asCharacters in interface XMLEventpublic EndElement asEndElement()
asEndElement in interface XMLEventpublic StartElement asStartElement()
asStartElement in interface XMLEventpublic QName getSchemaType()
getSchemaType in interface XMLEventpublic boolean isAttribute()
isAttribute in interface XMLEventAttributepublic boolean isCharacters()
isCharacters in interface XMLEventCharacterspublic boolean isNamespace()
isNamespace in interface XMLEventNamespacepublic void writeAsEncodedUnicode(Writer writer) throws XMLStreamException
writeAsEncodedUnicode in interface XMLEventwriter - The writer that will output the dataXMLStreamException - if there is a fatal error writing the eventprotected abstract void writeAsEncodedUnicodeEx(Writer writer) throws IOException, XMLStreamException
writer - The writer that will output the dataXMLStreamException - if there is a fatal error writing the eventIOException - if there is an IO errorprotected void charEncode(Writer writer, String data) throws IOException
IOExceptionCopyright © 2018–2021 mhoffrogge. All rights reserved.