ADL_query_translator modules/paradigms/Adaptor_Union.py

modules / paradigms / Adaptor_Union.py 


 SYNOPSIS

     Adaptor_Union (paradigms)

         paradigms
             A dictionary that maps one or more field URIs
             (e.g., "http://purl.org/dc/elements/1.1/creator") to
             underlying paradigms.

 DESCRIPTION

     An adaptor that adds support for bucket-level searching to a set
     of paradigms (the "underlying" paradigms), each of which
     supports a specific field-level search, by treating a
     bucket-level search as the union of the field-level searches.

     Specifically, a field-level constraint matching one of the URIs
     listed in 'paradigms' is passed through to the corresponding
     underlying paradigm; if the paradigm does not support
     field-level searching, it should treat the constraint as being
     bucket-level.  A field-level constraint not matching any listed
     URI results in a query of the form

         SELECT id FROM table
             WHERE 1 = 0

     being returned.  A bucket-level constraint is passed to all
     underlying paradigms and the resulting queries are UNIONed
     together.

     Exceptions thrown:

         none

 AUTHOR

     Greg Janee
     gjanee@alexandria.ucsb.edu

 HISTORY

     $Log: Adaptor_Union.py,v $
     Revision 1.2  2003/10/29 22:00:47  gjanee
     Per revision 1.8 of UniversalTranslator.py, this paradigm now
     invokes field-level methods of the underlying paradigms if the
     latter support field-level searching.  Unresolved issue: given a
     *bucket-level* constraint, this paradigm still calls, for each
     underlying paradigm, the underlying paradigm's bucket-level
     methods, even if the underlying paradigm supports field-level
     searching.  It's not clear what the correct behavior is in this
     case; perhaps it should be configurable.  At any rate, nesting a
     field adaptor inside this paradigm may lead to unexpected
     behavior.

     Revision 1.1  2002/10/22 04:09:41  gjanee
     Initial revision


Imported Modules   

import UniversalTranslator
import edu.ucsb.adl.middleware
import types

Classes   

Adaptor_Union


This document was automatically generated Thu Mar 4 12:45:24 2004 by HappyDoc version WORKING