edu.ucsb.nceas.morpho.plugins
Interface XMLFactoryInterface

All Known Implementing Classes:
AbstractDataPackage, DataPackage

public interface XMLFactoryInterface

This Interface enables calling classes to gain access to resources that are identified by unique String identifiers. Implementing classes need to be able to map the identifiers to resources in order to return the correct instances


Method Summary
 org.w3c.dom.Document openAsDom(java.lang.String id)
          method to return a DOM Document rather than a Reader Since the real purppose is to provide the source for an XSLT transform a DOM can passed instead of a Reader.
 java.io.Reader openAsReader(java.lang.String id)
          method to return a Reader object, which will provide access to a character-based resource.
 

Method Detail

openAsReader

public java.io.Reader openAsReader(java.lang.String id)
                            throws DocumentNotFoundException
method to return a Reader object, which will provide access to a character-based resource. The resource to be returned is determined based on the unique String identifier passed to this method

Parameters:
id - a unique identifier used to determine what resource to return
Returns:
a Reader for the character-based resource
Throws:
DocumentNotFoundException - if id does not point to a document, or if requested document exists but cannot be accessed.

openAsDom

public org.w3c.dom.Document openAsDom(java.lang.String id)
method to return a DOM Document rather than a Reader Since the real purppose is to provide the source for an XSLT transform a DOM can passed instead of a Reader. This avoids the need to convert a Reader to the DOM. Return of a 'null' Document is allowed as an indication that one should use the 'openAsReader' method.

Parameters:
id - a unique identifier used to determine what resource to return


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.