org.enhydra.zeus.source
Class DTDSource

org.enhydra.zeus.source.BaseSource
  |
  +--org.enhydra.zeus.source.DTDSource
Direct Known Subclasses:
StreamDTDSource

public abstract class DTDSource
extends BaseSource

Source provides an interface for all input means. It details the required contract that other portions of the Zeus XML data binding framework must use for processing of an arbitrary input.

DTDSource extends the default Source implementation in BaseSource, but provides functionality specific to obtaining DTD information. Since all other XML constraint methodologies involve constraints that are themselves well-formed XML, handling DTDs is a special case, and therefore needs a special class (this one!).

It should be noted that this class will always return null on the method getDocument(). Instead, it adds a method, getDTD(), for returning a Java representation of an XML DTD.

Author:
Brett McLaughlin
Version: 1.0

Method Summary
 DocumentgetDocument()
           This will always return null since there is no way to represent an XML DTD as a JDOM Document (or any XML document representation).
 abstract DTDgetDTD()
           This will return the DTDParser's DTD representation of the supplied XML DTD.

Methods inherited from class org.enhydra.zeus.source.BaseSource
getSystemID, setSystemID

Method Detail

getDocument

public Document getDocument()
throws java.io.IOException

This will always return null since there is no way to represent an XML DTD as a JDOM Document (or any XML document representation).

Returns: Document - the JDOM representation of the input source.
Throws:
IOException - - when construction of a Document generates errors.

getDTD

public abstract DTD getDTD()
throws java.io.IOException

This will return the DTDParser's DTD representation of the supplied XML DTD.

Returns: DTD - the DTDParser representation of the input source.
Throws:
IOException - - when construction of a DTD generates errors.