|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.ucsb.adl.middleware.CachingMetadataDriver
Metadata driver that caches reports. This driver can sit, as a
kind of filter, in front of any nominal metadata driver; it is
automatically created by MetadataService for a collection
if (and only if) the collection's metadata.cache
property is "on".
This class reads the following properties from the
collection-specific middleware configuration file
drivers.conf for the collection in question:
metadata.driver.classedu.ucsb.adl.bucket99.MetadataDriver".metadata.cache.directory:V"
within the environment. As a consequence, the cache directory may
be shared by multiple collections without conflict.metadata.cache.viewsadl:bucket,adl:browse,adl:access".@P where P is the name of
another property (see ExtendedProperties for more
information). Note that the main middleware configuration file
serves as a properties default for the collection-specific
configuration files.
Implementation note: this class validates reports, and valid
reports are processed (e.g., by removing any XML encoding
declaration) just as MetadataService would. All
reports are returned, but only valid (and processed) reports are
cached. Cached reports are prefixed with the string
"VALID"; this prefix is detected and removed by
MetadataService, and is interpreted by that class as
meaning that no further validation or processing need be done.
$Log: CachingMetadataDriver.java,v $ Revision 1.1 2006/06/23 22:59:56 gjanee Initial revision
| Method Summary | |
static edu.ucsb.adl.middleware.CachingMetadataDriver |
createDriver(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
Creates a CachingMetadataDriver for a collection. |
static edu.ucsb.adl.middleware.CachingMetadataDriver |
createDriverInternal(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
Creates a CachingMetadataDriver for a collection. |
void |
destroy()
Frees all resources held by the driver. |
java.lang.String |
performMetadataService(java.lang.String view,
java.lang.String collection,
java.lang.String holding)
Returns a view of the metadata for a holding within the collection. |
java.lang.String[] |
performViewsService(java.lang.String collection,
java.lang.String holding)
Returns a list of the views supported by a holding within the collection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static edu.ucsb.adl.middleware.CachingMetadataDriver createDriver(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
throws InternalErrorException
CachingMetadataDriver for a collection.
The wrapped metadata driver is created as well.
global - The global object representing this instance of the middleware.directory - The pathname of the directory containing the
collection-specific middleware configuration file.collection - The name of the collection, e.g., "adl_catalog".
CachingMetadataDriver.
InternalErrorException - If any error is encountered.
public static edu.ucsb.adl.middleware.CachingMetadataDriver createDriverInternal(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
throws InternalErrorException
CachingMetadataDriver for a collection.
The wrapped metadata driver is created as well.
global - The global object representing this instance of the middleware.directory - The pathname of the directory containing the
collection-specific middleware configuration file.collection - The name of the collection, e.g., "adl_catalog".
CachingMetadataDriver.
InternalErrorException - If any error is encountered.
public java.lang.String performMetadataService(java.lang.String view,
java.lang.String collection,
java.lang.String holding)
throws MiddlewareException
performMetadataService in interface MetadataDriverview - The metadata view, e.g., "adl:bucket".collection - The collection name, e.g., "adl_catalog".holding - The holding identifier.
BadRequestException - If holding is not a valid holding identifier.
UnsupportedException - If the request is valid but not supported (e.g., the view is
unsupported by the holding).
InternalErrorException - If the request is valid but cannot otherwise be completed.
MiddlewareExceptionMetadataService
public java.lang.String[] performViewsService(java.lang.String collection,
java.lang.String holding)
throws MiddlewareException
performViewsService in interface MetadataDrivercollection - The collection name, e.g., "adl_catalog".holding - The holding identifier.
BadRequestException - If holding is not a valid holding identifier.
InternalErrorException - If the request is valid but cannot otherwise be completed.
MiddlewareExceptionMetadataServicepublic void destroy()
destroy in interface MetadataDriver
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||