edu.ucsb.adl.middleware
Interface CollectionDriver

All Known Implementing Classes:
CollectionDriver, FileCollectionDriver, URLCollectionDriver

public interface CollectionDriver

The interface between the ADL collection service and drivers that implement the service on behalf of collections. The ADL collection service creates the driver for a collection by dynamically loading the driver class and calling the following class method:

public static CollectionDriver createDriver (Global global,
                                             File directory,
                                             String collection)
Driver configuration files can be obtained from directory. collection is the name of the collection, e.g., "adl_catalog". global is the global object representing this instance of the middleware; it can be used to store global quantities.

Version:
$Header: /export/home/gjanee/middleware/edu/ucsb/adl/middleware/RCS/CollectionDriver.java,v 1.4 2004/03/05 19:01:57 gjanee Exp $

$Log: CollectionDriver.java,v $ Revision 1.4 2004/03/05 19:01:57 gjanee
Added support for multiple middleware instances. A middleware instance is represented by a Global object that is tied to a main middleware configuration file. All service objects now maintain a reference to the appropriate Global object. Instance-wide variables formerly coded as class variables are now held by the Global object; various methods that return instance-wide variables now accept a Global object as an argument. The Global object is now passed to all service drivers.

Revision 1.3 2001/11/16 16:56:04 gjanee
Minor documentation change to reflect new internationalization requirements.

Revision 1.2 2001/08/11 14:06:18 gjanee
Documentation change to reflect the new configuration file structure.

Revision 1.1 2000/04/04 18:28:51 gjanee
Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
 void destroy()
          Frees any resources held by the driver.
 java.lang.String performCollectionService(java.lang.String collection)
          Returns the collection-level metadata for a collection.
 

Method Detail

performCollectionService

public java.lang.String performCollectionService(java.lang.String collection)
                                          throws InternalErrorException
Returns the collection-level metadata for a collection. The driver can assume that the request has been authorized and that collection names the collection for which the driver was created. This method must be multithread-safe.

Parameters:
collection - The collection name, e.g., "adl_catalog".
Returns:
An XML document that is well-formed and valid according to the appropriate DTD. The document should not contain an encoding declaration.
Throws:
InternalErrorException - If any error occurs.
See Also:
CollectionService

destroy

public void destroy()
Frees any resources held by the driver.