Top Description Fields Constructors Methods
com.ctc.wstx.evt

public abstract Class WEntityDeclaration

extends BaseEventImpl
implements EntityDeclaration
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.EntityDeclaration, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Known Direct Subclasses
com.ctc.wstx.ent.EntityDecl
Imports
java.io.IOException, .Writer, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.EntityDeclaration, org.codehaus.stax2.XMLStreamWriter2, org.codehaus.stax2.ri.evt.BaseEventImpl, com.ctc.wstx.ent.EntityDecl, com.ctc.wstx.exc.WstxIOException

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

Field Summary

Inherited from org.codehaus.stax2.ri.evt.BaseEventImpl:
mLocation

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Declared abstract to force redefinition by sub-classes

public abstract String
getBaseURI()

Redeclares javax.xml.stream.events.EntityDeclaration.getBaseURI.

Get the base URI for this reference or null if this information is not available

public int
getEventType()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.getEventType.

Implements javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

public abstract String
public abstract String
getNotationName()

Redeclares javax.xml.stream.events.EntityDeclaration.getNotationName.

The name of the associated notation.

public abstract String
getPublicId()

Redeclares javax.xml.stream.events.EntityDeclaration.getPublicId.

The entity's public identifier, or null if none was given

public abstract String
public abstract String
getSystemId()

Redeclares javax.xml.stream.events.EntityDeclaration.getSystemId.

The entity's system identifier.

public int
hashCode()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Declared abstract to force redefinition by sub-classes

public void
writeAsEncodedUnicode(Writer
The writer that will output the data
w
)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeAsEncodedUnicode.

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.

public abstract void
public void
writeUsing(XMLStreamWriter2 w)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeUsing.

Implements org.codehaus.stax2.evt.XMLEvent2.writeUsing.

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.

Inherited from org.codehaus.stax2.ri.evt.BaseEventImpl:
addHashasCharactersasEndElementasStartElementgetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementiteratedEqualsstringsWithNullsEqualthrowFromIOEtoString

Constructor Detail

WEntityDeclarationback to summary
public WEntityDeclaration(Location loc)

Method Detail

equalsback to summary
public boolean equals(Object o)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Doc from org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Declared abstract to force redefinition by sub-classes

Parameters
o:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getBaseURIback to summary
public abstract String getBaseURI()

Redeclares javax.xml.stream.events.EntityDeclaration.getBaseURI.

Doc from javax.xml.stream.events.EntityDeclaration.getBaseURI.

Get the base URI for this reference or null if this information is not available

Returns:String

the base URI or null

Annotations
@Override
getEventTypeback to summary
public int getEventType()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.getEventType.

Implements javax.xml.stream.events.XMLEvent.getEventType.

Doc from javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

Returns:int

the event type

Annotations
@Override
getNameback to summary
public abstract String getName()

Redeclares javax.xml.stream.events.EntityDeclaration.getName.

Doc from javax.xml.stream.events.EntityDeclaration.getName.

The entity's name

Returns:String

the name, may not be null

Annotations
@Override
getNotationNameback to summary
public abstract String getNotationName()

Redeclares javax.xml.stream.events.EntityDeclaration.getNotationName.

Doc from javax.xml.stream.events.EntityDeclaration.getNotationName.

The name of the associated notation.

Returns:String

the notation name

Annotations
@Override
getPublicIdback to summary
public abstract String getPublicId()

Redeclares javax.xml.stream.events.EntityDeclaration.getPublicId.

Doc from javax.xml.stream.events.EntityDeclaration.getPublicId.

The entity's public identifier, or null if none was given

Returns:String

the public ID for this declaration or null

Annotations
@Override
getReplacementTextback to summary
public abstract String getReplacementText()

Redeclares javax.xml.stream.events.EntityDeclaration.getReplacementText.

Doc from javax.xml.stream.events.EntityDeclaration.getReplacementText.

The replacement text of the entity. This method will only return non-null if this is an internal entity.

Returns:String

null or the replacement text

Annotations
@Override
getSystemIdback to summary
public abstract String getSystemId()

Redeclares javax.xml.stream.events.EntityDeclaration.getSystemId.

Doc from javax.xml.stream.events.EntityDeclaration.getSystemId.

The entity's system identifier.

Returns:String

the system ID for this declaration or null

Annotations
@Override
hashCodeback to summary
public int hashCode()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Doc from org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Declared abstract to force redefinition by sub-classes

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

Annotations
@Override
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeAsEncodedUnicode.

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

Doc from javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
w:Writer

The writer that will output the data

Annotations
@Override
Exceptions
XMLStreamException:
if there is a fatal error writing the event
writeEncback to summary
public abstract void writeEnc(Writer w) throws IOException
writeUsingback to summary
public void writeUsing(XMLStreamWriter2 w) throws XMLStreamException

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeUsing.

Implements org.codehaus.stax2.evt.XMLEvent2.writeUsing.

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.

Annotations
@Override