Package javanet.staxutils.events
Class AbstractXMLEvent
java.lang.Object
javanet.staxutils.events.AbstractXMLEvent
- All Implemented Interfaces:
Serializable,Cloneable,ExtendedXMLEvent,XMLEvent,XMLStreamConstants
- Direct Known Subclasses:
AbstractCharactersEvent,AttributeEvent,CommentEvent,DTDEvent,EndDocumentEvent,EndElementEvent,EntityDeclarationEvent,EntityReferenceEvent,NotationDeclarationEvent,ProcessingInstructionEvent,StartDocumentEvent,StartElementEvent
public abstract class AbstractXMLEvent
extends Object
implements ExtendedXMLEvent, Serializable, Cloneable
Abstract base class for
XMLEvent implementations.- Version:
- $Revision: 1.3 $
- Author:
- Christian Niles
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LocationThe event location.protected QNameThe schema type.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 -
Constructor Summary
ConstructorsConstructorDescriptionAbstractXMLEvent(XMLEvent that) AbstractXMLEvent(Location location) AbstractXMLEvent(Location location, QName schemaType) -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanDetermines if this event matches another event, irrespective of document location.toString()voidwriteAsEncodedUnicode(Writer writer) voidwriteEvent(XMLStreamWriter writer) Writes the event to the providedXMLStreamWriter.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.xml.stream.events.XMLEvent
getEventType
-
Field Details
-
location
The event location. -
schemaType
The schema type.
-
-
Constructor Details
-
AbstractXMLEvent
public AbstractXMLEvent() -
AbstractXMLEvent
-
AbstractXMLEvent
-
AbstractXMLEvent
-
-
Method Details
-
getLocation
- Specified by:
getLocationin interfaceXMLEvent
-
getSchemaType
- Specified by:
getSchemaTypein interfaceXMLEvent
-
asCharacters
- Specified by:
asCharactersin interfaceXMLEvent
-
asEndElement
- Specified by:
asEndElementin interfaceXMLEvent
-
asStartElement
- Specified by:
asStartElementin interfaceXMLEvent
-
isAttribute
public boolean isAttribute()- Specified by:
isAttributein interfaceXMLEvent
-
isCharacters
public boolean isCharacters()- Specified by:
isCharactersin interfaceXMLEvent
-
isEndDocument
public boolean isEndDocument()- Specified by:
isEndDocumentin interfaceXMLEvent
-
isEndElement
public boolean isEndElement()- Specified by:
isEndElementin interfaceXMLEvent
-
isEntityReference
public boolean isEntityReference()- Specified by:
isEntityReferencein interfaceXMLEvent
-
isNamespace
public boolean isNamespace()- Specified by:
isNamespacein interfaceXMLEvent
-
isProcessingInstruction
public boolean isProcessingInstruction()- Specified by:
isProcessingInstructionin interfaceXMLEvent
-
isStartDocument
public boolean isStartDocument()- Specified by:
isStartDocumentin interfaceXMLEvent
-
isStartElement
public boolean isStartElement()- Specified by:
isStartElementin interfaceXMLEvent
-
clone
-
matches
Description copied from interface:ExtendedXMLEventDetermines if this event matches another event, irrespective of document location.- Specified by:
matchesin interfaceExtendedXMLEvent- Parameters:
event- The event to match against.- Returns:
trueif the two events match,falseotherwise.
-
writeEvent
Description copied from interface:ExtendedXMLEventWrites the event to the providedXMLStreamWriter.- Specified by:
writeEventin interfaceExtendedXMLEvent- Parameters:
writer- The destination stream.- Throws:
XMLStreamException- If an error occurs writing to the destination stream.
-
writeAsEncodedUnicode
- Specified by:
writeAsEncodedUnicodein interfaceXMLEvent- Throws:
XMLStreamException
-
toString
-