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:
DTD,XMLEvent,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 ObjectmDTDprotected StringmFullTextFull 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 StringmInternalSubsetprotected StringmPublicIdprotected StringmRootNameprotected StringmSystemId-
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
Constructors Constructor Description DTDEventImpl(Location loc, String fullText)DTDEventImpl(Location loc, String rootName, String intSubset)Constructor used when only partial information is available.DTDEventImpl(Location loc, String rootName, String sysId, String pubId, String intSubset, Object dtd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdoGetDocumentTypeDeclaration()booleanequals(Object o)Declared abstract to force redefinition by sub-classesStringgetDocumentTypeDeclaration()List<EntityDeclaration>getEntities()intgetEventType()StringgetInternalSubset()List<NotationDeclaration>getNotations()ObjectgetProcessedDTD()StringgetPublicId()StringgetRootName()StringgetSystemId()inthashCode()Declared abstract to force redefinition by sub-classesvoidwriteAsEncodedUnicode(Writer w)voidwriteUsing(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
-
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
-
-
-
-
Field Detail
-
mRootName
protected final String mRootName
-
mSystemId
protected final String mSystemId
-
mPublicId
protected final String mPublicId
-
mInternalSubset
protected final String mInternalSubset
-
mDTD
protected final Object mDTD
-
mFullText
protected 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.
-
-
Method Detail
-
getDocumentTypeDeclaration
public String getDocumentTypeDeclaration()
- Specified by:
getDocumentTypeDeclarationin interfaceDTD
-
getEntities
public List<EntityDeclaration> getEntities()
- Specified by:
getEntitiesin interfaceDTD
-
getNotations
public List<NotationDeclaration> getNotations()
- Specified by:
getNotationsin interfaceDTD
-
getProcessedDTD
public Object getProcessedDTD()
- Specified by:
getProcessedDTDin interfaceDTD
-
getEventType
public int getEventType()
- Specified by:
getEventTypein interfaceXMLEvent- Specified by:
getEventTypein classBaseEventImpl
-
writeAsEncodedUnicode
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException
- Specified by:
writeAsEncodedUnicodein interfaceXMLEvent- Specified by:
writeAsEncodedUnicodein classBaseEventImpl- Throws:
XMLStreamException
-
writeUsing
public void writeUsing(XMLStreamWriter2 w) throws XMLStreamException
- Specified by:
writeUsingin interfaceXMLEvent2- Specified by:
writeUsingin classBaseEventImpl- Throws:
XMLStreamException
-
getRootName
public String getRootName()
- Specified by:
getRootNamein interfaceDTD2
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceDTD2
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceDTD2
-
getInternalSubset
public String getInternalSubset()
- Specified by:
getInternalSubsetin interfaceDTD2
-
equals
public boolean equals(Object o)
Description copied from class:BaseEventImplDeclared abstract to force redefinition by sub-classes- Specified by:
equalsin classBaseEventImpl
-
hashCode
public int hashCode()
Description copied from class:BaseEventImplDeclared abstract to force redefinition by sub-classes- Specified by:
hashCodein classBaseEventImpl
-
doGetDocumentTypeDeclaration
protected String doGetDocumentTypeDeclaration() throws XMLStreamException
- Throws:
XMLStreamException
-
-