Package org.codehaus.stax2.ri.evt
Class DTDEventImpl
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- org.codehaus.stax2.ri.evt.DTDEventImpl
-
- All Implemented Interfaces:
javax.xml.stream.events.DTD
,javax.xml.stream.events.XMLEvent
,javax.xml.stream.XMLStreamConstants
,DTD2
,XMLEvent2
public class DTDEventImpl extends BaseEventImpl implements DTD2
Vanilla implementation of a DTD event. Note that as is, it is not really complete, since there is no way to access declared notations and entities, because Stax 1.0 has no method for dispatching calls. As such, it is expected that actual implementations would usually extend this class, instead of using it as is.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
mDTD
protected java.lang.String
mFullText
Full textual presentation of the DOCTYPE event; usually only constructed when needed, but sometimes (when using 'broken' older StAX interfaces), may be the only piece that's actually passed.protected java.lang.String
mInternalSubset
protected java.lang.String
mPublicId
protected java.lang.String
mRootName
protected java.lang.String
mSystemId
-
Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocation
-
-
Constructor Summary
Constructors Constructor Description DTDEventImpl(javax.xml.stream.Location loc, java.lang.String fullText)
DTDEventImpl(javax.xml.stream.Location loc, java.lang.String rootName, java.lang.String intSubset)
Constructor used when only partial information is available.DTDEventImpl(javax.xml.stream.Location loc, java.lang.String rootName, java.lang.String sysId, java.lang.String pubId, java.lang.String intSubset, java.lang.Object dtd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
doGetDocumentTypeDeclaration()
boolean
equals(java.lang.Object o)
Declared abstract to force redefinition by sub-classesjava.lang.String
getDocumentTypeDeclaration()
java.util.List<javax.xml.stream.events.EntityDeclaration>
getEntities()
int
getEventType()
java.lang.String
getInternalSubset()
java.util.List<javax.xml.stream.events.NotationDeclaration>
getNotations()
java.lang.Object
getProcessedDTD()
java.lang.String
getPublicId()
java.lang.String
getRootName()
java.lang.String
getSystemId()
int
hashCode()
Declared abstract to force redefinition by sub-classesvoid
writeAsEncodedUnicode(java.io.Writer w)
void
writeUsing(XMLStreamWriter2 w)
-
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
-
-
-
-
Field Detail
-
mRootName
protected final java.lang.String mRootName
-
mSystemId
protected final java.lang.String mSystemId
-
mPublicId
protected final java.lang.String mPublicId
-
mInternalSubset
protected final java.lang.String mInternalSubset
-
mDTD
protected final java.lang.Object mDTD
-
mFullText
protected java.lang.String mFullText
Full textual presentation of the DOCTYPE event; usually only constructed when needed, but sometimes (when using 'broken' older StAX interfaces), may be the only piece that's actually passed.
-
-
Constructor Detail
-
DTDEventImpl
public DTDEventImpl(javax.xml.stream.Location loc, java.lang.String rootName, java.lang.String sysId, java.lang.String pubId, java.lang.String intSubset, java.lang.Object dtd)
-
DTDEventImpl
public DTDEventImpl(javax.xml.stream.Location loc, java.lang.String rootName, java.lang.String intSubset)
Constructor used when only partial information is available.
-
DTDEventImpl
public DTDEventImpl(javax.xml.stream.Location loc, java.lang.String fullText)
-
-
Method Detail
-
getDocumentTypeDeclaration
public java.lang.String getDocumentTypeDeclaration()
- Specified by:
getDocumentTypeDeclaration
in interfacejavax.xml.stream.events.DTD
-
getEntities
public java.util.List<javax.xml.stream.events.EntityDeclaration> getEntities()
- Specified by:
getEntities
in interfacejavax.xml.stream.events.DTD
-
getNotations
public java.util.List<javax.xml.stream.events.NotationDeclaration> getNotations()
- Specified by:
getNotations
in interfacejavax.xml.stream.events.DTD
-
getProcessedDTD
public java.lang.Object getProcessedDTD()
- Specified by:
getProcessedDTD
in interfacejavax.xml.stream.events.DTD
-
getEventType
public int getEventType()
- Specified by:
getEventType
in interfacejavax.xml.stream.events.XMLEvent
- Specified by:
getEventType
in classBaseEventImpl
-
writeAsEncodedUnicode
public void writeAsEncodedUnicode(java.io.Writer w) throws javax.xml.stream.XMLStreamException
- Specified by:
writeAsEncodedUnicode
in interfacejavax.xml.stream.events.XMLEvent
- Specified by:
writeAsEncodedUnicode
in classBaseEventImpl
- Throws:
javax.xml.stream.XMLStreamException
-
writeUsing
public void writeUsing(XMLStreamWriter2 w) throws javax.xml.stream.XMLStreamException
- Specified by:
writeUsing
in interfaceXMLEvent2
- Specified by:
writeUsing
in classBaseEventImpl
- Throws:
javax.xml.stream.XMLStreamException
-
getRootName
public java.lang.String getRootName()
- Specified by:
getRootName
in interfaceDTD2
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interfaceDTD2
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interfaceDTD2
-
getInternalSubset
public java.lang.String getInternalSubset()
- Specified by:
getInternalSubset
in interfaceDTD2
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:BaseEventImpl
Declared abstract to force redefinition by sub-classes- Specified by:
equals
in classBaseEventImpl
-
hashCode
public int hashCode()
Description copied from class:BaseEventImpl
Declared abstract to force redefinition by sub-classes- Specified by:
hashCode
in classBaseEventImpl
-
doGetDocumentTypeDeclaration
protected java.lang.String doGetDocumentTypeDeclaration() throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
-