Package com.bea.xml.stream.events
Class EntityDeclarationEvent
java.lang.Object
com.bea.xml.stream.events.BaseEvent
com.bea.xml.stream.events.EntityDeclarationEvent
- All Implemented Interfaces:
EntityDeclaration
,XMLEvent
,Location
,XMLStreamConstants
Simple implementation of
EntityDeclaration
. Since no external
or unparsed entities are supported (yet?), this is quite simplistic
implementation.- Author:
- Tatu Saloranta
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doWriteAsEncodedUnicode
(Writer writer) Template method to be implemented by sub-classes.Get the base URI for this reference or null if this information is not availablegetName()
The entity's nameThe name of the associated notation.Returns the public ID of the XMLThe replacement text of the entity.Returns the system ID of the XMLMethods inherited from class com.bea.xml.stream.events.BaseEvent
asCharacters, asEndElement, asStartElement, getCharacterOffset, getColumnNumber, getEventType, getLineNumber, getLocation, getLocationURI, getSchemaType, getSourceName, getTypeAsString, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, recycle, setCharacterOffset, setColumnNumber, setEventType, setLineNumber, setLocationURI, toString, writeAsEncodedUnicode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
-
Field Details
-
name
-
replacementText
-
-
Constructor Details
-
EntityDeclarationEvent
-
-
Method Details
-
getReplacementText
Description copied from interface:javax.xml.stream.events.EntityDeclaration
The replacement text of the entity. This method will only return non-null if this is an internal entity.- Specified by:
getReplacementText
in interfaceEntityDeclaration
- Returns:
- null or the replacment text
-
getName
Description copied from interface:javax.xml.stream.events.EntityDeclaration
The entity's name- Specified by:
getName
in interfaceEntityDeclaration
- Returns:
- the name, may not be null
-
getBaseURI
Description copied from interface:javax.xml.stream.events.EntityDeclaration
Get the base URI for this reference or null if this information is not available- Specified by:
getBaseURI
in interfaceEntityDeclaration
- Returns:
- the base URI or null
-
getPublicId
Description copied from interface:javax.xml.stream.Location
Returns the public ID of the XML- Specified by:
getPublicId
in interfaceEntityDeclaration
- Specified by:
getPublicId
in interfaceLocation
- Overrides:
getPublicId
in classBaseEvent
- Returns:
- the public ID, or null if not available
-
getSystemId
Description copied from interface:javax.xml.stream.Location
Returns the system ID of the XML- Specified by:
getSystemId
in interfaceEntityDeclaration
- Specified by:
getSystemId
in interfaceLocation
- Overrides:
getSystemId
in classBaseEvent
- Returns:
- the system ID, or null if not available
-
getNotationName
Description copied from interface:javax.xml.stream.events.EntityDeclaration
The name of the associated notation.- Specified by:
getNotationName
in interfaceEntityDeclaration
- Returns:
- the notation name
-
doWriteAsEncodedUnicode
Description copied from class:BaseEvent
Template method to be implemented by sub-classes.- Specified by:
doWriteAsEncodedUnicode
in classBaseEvent
- Throws:
IOException
-