|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.xml.stream.events.BaseEvent
public abstract class BaseEvent
Base event class for events to extend from
| Field Summary |
|---|
| 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 | |
|---|---|
BaseEvent()
|
|
BaseEvent(int type)
|
|
| Method Summary | |
|---|---|
javax.xml.stream.events.Characters |
asCharacters()
Returns this event as Characters, may result in a class cast exception if this event is not Characters. |
javax.xml.stream.events.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. |
javax.xml.stream.events.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 abstract void |
doWriteAsEncodedUnicode(java.io.Writer writer)
Template method to be implemented by sub-classes. |
int |
getCharacterOffset()
Return the byte or character offset into the input source this location is pointing to. |
int |
getColumnNumber()
Return the column number where the current event ends, returns -1 if none is available. |
int |
getEventType()
Returns an integer code for this event. |
int |
getLineNumber()
Return the line number where the current event ends, returns -1 if none is available. |
javax.xml.stream.Location |
getLocation()
Return the location of this event. |
java.lang.String |
getLocationURI()
|
java.lang.String |
getPublicId()
Returns the public ID of the XML |
javax.xml.namespace.QName |
getSchemaType()
This method is provided for implementations to provide optional type information about the associated event. |
java.lang.String |
getSourceName()
|
java.lang.String |
getSystemId()
Returns the system ID of the XML |
java.lang.String |
getTypeAsString()
|
boolean |
isAttribute()
A utility function to check if this event is an Attribute. |
boolean |
isCharacters()
A utility function to check if this event is Characters. |
boolean |
isEndDocument()
A utility function to check if this event is an EndDocument. |
boolean |
isEndElement()
A utility function to check if this event is a EndElement. |
boolean |
isEntityReference()
A utility function to check if this event is an EntityReference. |
boolean |
isNamespace()
A utility function to check if this event is a Namespace. |
boolean |
isProcessingInstruction()
A utility function to check if this event is a ProcessingInstruction. |
boolean |
isStartDocument()
A utility function to check if this event is a StartDocument. |
boolean |
isStartElement()
A utility function to check if this event is a StartElement. |
void |
recycle()
|
void |
setCharacterOffset(int c)
|
void |
setColumnNumber(int col)
|
protected void |
setEventType(int type)
|
void |
setLineNumber(int line)
|
void |
setLocationURI(java.lang.String uri)
|
java.lang.String |
toString()
|
void |
writeAsEncodedUnicode(java.io.Writer writer)
This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseEvent()
public BaseEvent(int type)
| Method Detail |
|---|
public int getEventType()
javax.xml.stream.events.XMLEvent
getEventType in interface javax.xml.stream.events.XMLEventXMLStreamConstants.START_ELEMENT,
XMLStreamConstants.END_ELEMENT,
XMLStreamConstants.CHARACTERS,
XMLStreamConstants.ATTRIBUTE,
XMLStreamConstants.NAMESPACE,
XMLStreamConstants.PROCESSING_INSTRUCTION,
XMLStreamConstants.COMMENT,
XMLStreamConstants.START_DOCUMENT,
XMLStreamConstants.END_DOCUMENT,
XMLStreamConstants.DTDprotected void setEventType(int type)
public java.lang.String getTypeAsString()
public boolean isStartElement()
javax.xml.stream.events.XMLEvent
isStartElement in interface javax.xml.stream.events.XMLEventStartElementpublic boolean isEndElement()
javax.xml.stream.events.XMLEvent
isEndElement in interface javax.xml.stream.events.XMLEventEndElementpublic boolean isEntityReference()
javax.xml.stream.events.XMLEvent
isEntityReference in interface javax.xml.stream.events.XMLEventEntityReferencepublic boolean isProcessingInstruction()
javax.xml.stream.events.XMLEvent
isProcessingInstruction in interface javax.xml.stream.events.XMLEventProcessingInstructionpublic boolean isCharacters()
javax.xml.stream.events.XMLEvent
isCharacters in interface javax.xml.stream.events.XMLEventCharacterspublic boolean isStartDocument()
javax.xml.stream.events.XMLEvent
isStartDocument in interface javax.xml.stream.events.XMLEventStartDocumentpublic boolean isEndDocument()
javax.xml.stream.events.XMLEvent
isEndDocument in interface javax.xml.stream.events.XMLEventEndDocumentpublic boolean isAttribute()
javax.xml.stream.events.XMLEvent
isAttribute in interface javax.xml.stream.events.XMLEventAttributepublic boolean isNamespace()
javax.xml.stream.events.XMLEvent
isNamespace in interface javax.xml.stream.events.XMLEventNamespacepublic javax.xml.stream.Location getLocation()
javax.xml.stream.events.XMLEvent
getLocation in interface javax.xml.stream.events.XMLEventLocationpublic java.lang.String getPublicId()
javax.xml.stream.Location
getPublicId in interface javax.xml.stream.Locationpublic java.lang.String getSystemId()
javax.xml.stream.Location
getSystemId in interface javax.xml.stream.Locationpublic java.lang.String getSourceName()
public int getLineNumber()
javax.xml.stream.Location
getLineNumber in interface javax.xml.stream.Locationpublic void setLineNumber(int line)
public int getColumnNumber()
javax.xml.stream.Location
getColumnNumber in interface javax.xml.stream.Locationpublic void setColumnNumber(int col)
public int getCharacterOffset()
javax.xml.stream.Location
getCharacterOffset in interface javax.xml.stream.Locationpublic void setCharacterOffset(int c)
public java.lang.String getLocationURI()
public void setLocationURI(java.lang.String uri)
public javax.xml.stream.events.StartElement asStartElement()
javax.xml.stream.events.XMLEvent
asStartElement in interface javax.xml.stream.events.XMLEventpublic javax.xml.stream.events.EndElement asEndElement()
javax.xml.stream.events.XMLEvent
asEndElement in interface javax.xml.stream.events.XMLEventpublic javax.xml.stream.events.Characters asCharacters()
javax.xml.stream.events.XMLEvent
asCharacters in interface javax.xml.stream.events.XMLEventpublic void recycle()
public javax.xml.namespace.QName getSchemaType()
javax.xml.stream.events.XMLEvent
getSchemaType in interface javax.xml.stream.events.XMLEvent
public final void writeAsEncodedUnicode(java.io.Writer writer)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.events.XMLEvent
writeAsEncodedUnicode in interface javax.xml.stream.events.XMLEventwriter - The writer that will output the data
XMLStreamException - if there is a fatal error writing the event
protected abstract void doWriteAsEncodedUnicode(java.io.Writer writer)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||