org.enhydra.zeus.source
Class BaseSource

Direct Known Subclasses:
DTDSource, StreamSource

public abstract class BaseSource
implements Source

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.

This implementation of Source handles the basic functionality of dealing with system IDs so that other implementations don't have to code these methods. Thus, XXXSource classes should extend this class, rather than directly implementing Source, and will get this functionality "for free."

Author:
Brett McLaughlin
Version: 1.0

Method Summary
 abstract DocumentgetDocument()
           This will return a JDOM Document that represents the input source.
 StringgetSystemID()
           This will return the system ID associated with this Source.
 voidsetSystemID(String systemID)
           This will set the system ID for this Source.

Method Detail

getDocument

public abstract Document getDocument()
throws java.io.IOException

This will return a JDOM Document that represents the input source.

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

getSystemID

public String getSystemID()

This will return the system ID associated with this Source. This is generally in the form of a URI.

Returns: String - the system ID for the Source.

setSystemID

public void setSystemID(String systemID)

This will set the system ID for this Source. This is important to use, even when input is in the form of an input stream (see StreamSource) for resolving external references, such as to a DTD.

Parameters:
systemID - String system ID to use.

Association Links

to Class java.lang.String

The system ID for this Source