com.ctc.wstx.evt
Class WEntityDeclaration

java.lang.Object
  extended by org.codehaus.stax2.ri.evt.BaseEventImpl
      extended by com.ctc.wstx.evt.WEntityDeclaration
All Implemented Interfaces:
EntityDeclaration, XMLEvent, XMLStreamConstants, XMLEvent2
Direct Known Subclasses:
EntityDecl

public abstract class WEntityDeclaration
extends BaseEventImpl
implements EntityDeclaration

Simple implementation of StAX entity declaration events; for the most just wraps a EntityDecl instance.


Field Summary
 
Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocation
 
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
WEntityDeclaration(Location loc)
           
 
Method Summary
 boolean equals(Object o)
          Declared abstract to force redefinition by sub-classes
abstract  String getBaseURI()
           
 int getEventType()
           
abstract  String getName()
           
abstract  String getNotationName()
           
abstract  String getPublicId()
           
abstract  String getReplacementText()
           
abstract  String getSystemId()
           
 int hashCode()
          Declared abstract to force redefinition by sub-classes
 void writeAsEncodedUnicode(Writer w)
           
abstract  void writeEnc(Writer w)
           
 void writeUsing(XMLStreamWriter2 w)
          This method does not make much sense for this event type -- the reason being that the entity declarations can only be written as part of a DTD (internal or external subset), not separately.
 
Methods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement
 

Constructor Detail

WEntityDeclaration

public WEntityDeclaration(Location loc)
Method Detail

getBaseURI

public abstract String getBaseURI()
Specified by:
getBaseURI in interface EntityDeclaration

getName

public abstract String getName()
Specified by:
getName in interface EntityDeclaration

getNotationName

public abstract String getNotationName()
Specified by:
getNotationName in interface EntityDeclaration

getPublicId

public abstract String getPublicId()
Specified by:
getPublicId in interface EntityDeclaration

getReplacementText

public abstract String getReplacementText()
Specified by:
getReplacementText in interface EntityDeclaration

getSystemId

public abstract String getSystemId()
Specified by:
getSystemId in interface EntityDeclaration

getEventType

public int getEventType()
Specified by:
getEventType in interface XMLEvent
Specified by:
getEventType in class BaseEventImpl

writeEnc

public abstract void writeEnc(Writer w)
                       throws IOException
Throws:
IOException

writeAsEncodedUnicode

public void writeAsEncodedUnicode(Writer w)
                           throws XMLStreamException
Specified by:
writeAsEncodedUnicode in interface XMLEvent
Specified by:
writeAsEncodedUnicode in class BaseEventImpl
Throws:
XMLStreamException

writeUsing

public void writeUsing(XMLStreamWriter2 w)
                throws XMLStreamException
This method does not make much sense for this event type -- the reason being that the entity declarations can only be written as part of a DTD (internal or external subset), not separately. Can basically choose to either skip silently (output nothing), or throw an exception.

Specified by:
writeUsing in interface XMLEvent2
Specified by:
writeUsing in class BaseEventImpl
Throws:
XMLStreamException

equals

public boolean equals(Object o)
Description copied from class: BaseEventImpl
Declared abstract to force redefinition by sub-classes

Specified by:
equals in class BaseEventImpl

hashCode

public int hashCode()
Description copied from class: BaseEventImpl
Declared abstract to force redefinition by sub-classes

Specified by:
hashCode in class BaseEventImpl