Top Fields Constructors Methods
org.apache.xerces.stax.events

public final Class DTDImpl

extends XMLEventImpl
implements DTD
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.DTD, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
java.io.IOException, .Writer, java.util.Collections, .List, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.DTD

Author
Lucian Holland
Version
$Id: DTDImpl.java 730471 2008-12-31 20:45:32Z mrglavas $

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
DTDImpl(final String dtd, final Location location)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public String
getDocumentTypeDeclaration()

Implements javax.xml.stream.events.DTD.getDocumentTypeDeclaration.

Returns the entire Document Type Declaration as a string, including the internal DTD subset.
public List<E>
getEntities()

Implements javax.xml.stream.events.DTD.getEntities.

Return a List containing the general entities, both external and internal, declared in the DTD.
public List<E>
getNotations()

Implements javax.xml.stream.events.DTD.getNotations.

Return a List containing the notations declared in the DTD.
public Object
getProcessedDTD()

Implements javax.xml.stream.events.DTD.getProcessedDTD.

Returns an implementation defined representation of the DTD.
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
writer
)

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

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
Inherited from org.apache.xerces.stax.events.XMLEventImpl:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementtoString

Field Detail

fDTDback to summary
private final String fDTD

Constructor Detail

DTDImplback to summary
public DTDImpl(final String dtd, final Location location)

Constructor.

Method Detail

getDocumentTypeDeclarationback to summary
public String getDocumentTypeDeclaration()

Implements javax.xml.stream.events.DTD.getDocumentTypeDeclaration.

Doc from javax.xml.stream.events.DTD.getDocumentTypeDeclaration.

Returns the entire Document Type Declaration as a string, including the internal DTD subset. This may be null if there is not an internal subset. If it is not null it must return the entire Document Type Declaration which matches the doctypedecl production in the XML 1.0 specification

Returns:String

the Document Type Declaration

See Also
javax.xml.stream.events.DTD#getDocumentTypeDeclaration()
getEntitiesback to summary
public List<E> getEntities()

Implements javax.xml.stream.events.DTD.getEntities.

Doc from javax.xml.stream.events.DTD.getEntities.

Return a List containing the general entities, both external and internal, declared in the DTD. This list must contain EntityDeclaration events.

Returns:List<E>

an unordered list of EntityDeclaration events

See Also
javax.xml.stream.events.DTD#getEntities()
getNotationsback to summary
public List<E> getNotations()

Implements javax.xml.stream.events.DTD.getNotations.

Doc from javax.xml.stream.events.DTD.getNotations.

Return a List containing the notations declared in the DTD. This list must contain NotationDeclaration events.

Returns:List<E>

an unordered list of NotationDeclaration events

See Also
javax.xml.stream.events.DTD#getNotations()
getProcessedDTDback to summary
public Object getProcessedDTD()

Implements javax.xml.stream.events.DTD.getProcessedDTD.

Doc from javax.xml.stream.events.DTD.getProcessedDTD.

Returns an implementation defined representation of the DTD. This method may return null if no representation is available.

Returns:Object

the representation of the DTD

See Also
javax.xml.stream.events.DTD#getProcessedDTD()
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException

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
writer:Writer

The writer that will output the data

Exceptions
XMLStreamException:
if there is a fatal error writing the event