|
|||||||||
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 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. |
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)
|
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, toString, 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.XMLEvent
XMLStreamConstants.START_ELEMENT
,
XMLStreamConstants.END_ELEMENT
,
XMLStreamConstants.CHARACTERS
,
XMLStreamConstants.ATTRIBUTE
,
XMLStreamConstants.NAMESPACE
,
XMLStreamConstants.PROCESSING_INSTRUCTION
,
XMLStreamConstants.COMMENT
,
XMLStreamConstants.START_DOCUMENT
,
XMLStreamConstants.END_DOCUMENT
,
XMLStreamConstants.DTD
protected void setEventType(int type)
public java.lang.String getTypeAsString()
public boolean isStartElement()
javax.xml.stream.events.XMLEvent
isStartElement
in interface javax.xml.stream.events.XMLEvent
StartElement
public boolean isEndElement()
javax.xml.stream.events.XMLEvent
isEndElement
in interface javax.xml.stream.events.XMLEvent
EndElement
public boolean isEntityReference()
javax.xml.stream.events.XMLEvent
isEntityReference
in interface javax.xml.stream.events.XMLEvent
EntityReference
public boolean isProcessingInstruction()
javax.xml.stream.events.XMLEvent
isProcessingInstruction
in interface javax.xml.stream.events.XMLEvent
ProcessingInstruction
public boolean isCharacters()
javax.xml.stream.events.XMLEvent
isCharacters
in interface javax.xml.stream.events.XMLEvent
Characters
public boolean isStartDocument()
javax.xml.stream.events.XMLEvent
isStartDocument
in interface javax.xml.stream.events.XMLEvent
StartDocument
public boolean isEndDocument()
javax.xml.stream.events.XMLEvent
isEndDocument
in interface javax.xml.stream.events.XMLEvent
EndDocument
public boolean isAttribute()
javax.xml.stream.events.XMLEvent
isAttribute
in interface javax.xml.stream.events.XMLEvent
Attribute
public boolean isNamespace()
javax.xml.stream.events.XMLEvent
isNamespace
in interface javax.xml.stream.events.XMLEvent
Namespace
public javax.xml.stream.Location getLocation()
javax.xml.stream.events.XMLEvent
getLocation
in interface javax.xml.stream.events.XMLEvent
Location
public java.lang.String getPublicId()
javax.xml.stream.Location
getPublicId
in interface javax.xml.stream.Location
public java.lang.String getSystemId()
javax.xml.stream.Location
getSystemId
in interface javax.xml.stream.Location
public java.lang.String getSourceName()
public int getLineNumber()
javax.xml.stream.Location
getLineNumber
in interface javax.xml.stream.Location
public void setLineNumber(int line)
public int getColumnNumber()
javax.xml.stream.Location
getColumnNumber
in interface javax.xml.stream.Location
public void setColumnNumber(int col)
public int getCharacterOffset()
javax.xml.stream.Location
getCharacterOffset
in interface javax.xml.stream.Location
public 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.XMLEvent
public javax.xml.stream.events.EndElement asEndElement()
javax.xml.stream.events.XMLEvent
asEndElement
in interface javax.xml.stream.events.XMLEvent
public javax.xml.stream.events.Characters asCharacters()
javax.xml.stream.events.XMLEvent
asCharacters
in interface javax.xml.stream.events.XMLEvent
public void recycle()
public javax.xml.namespace.QName getSchemaType()
javax.xml.stream.events.XMLEvent
getSchemaType
in interface javax.xml.stream.events.XMLEvent
public void writeAsEncodedUnicode(java.io.Writer writer) throws javax.xml.stream.XMLStreamException
javax.xml.stream.events.XMLEvent
writeAsEncodedUnicode
in interface javax.xml.stream.events.XMLEvent
writer
- The writer that will output the data
XMLStreamException
- if there is a fatal error writing the event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |