ADL_query_translator modules/paradigms/Adaptor_Switch.py

modules / paradigms / Adaptor_Switch.py 


 SYNOPSIS

     Adaptor_Switch (bucketParadigm, fieldParadigm)
     Adaptor_Switch (bucketParadigm, fieldParadigms)

         bucketParadigm
             The underlying paradigm used to translate bucket-level
             constraints.

         fieldParadigm
             A single underlying paradigm used to translate all
             field-level constraints.

         -or-

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

 DESCRIPTION

     An adaptor that supports both bucket-level and field-level
     searching by directing bucket-level constraints to one
     underlying paradigm and field-level constraints to another.
     Thus this paradigm is useful when different query translation
     strategies are desired for different levels of searches.

     If a dictionary is specified for the field paradigms, a
     field-level constraint matching one of the URIs listed in
     'fieldParadigms' 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.

     Exceptions thrown:

         none

 AUTHOR

     Greg Janee
     gjanee@alexandria.ucsb.edu

 HISTORY

     $Log: Adaptor_Switch.py,v $
     Revision 1.2  2003/12/15 23:54:18  peter
     Mondified source code documentation so that it formats properly when
     creating HTML documents with happydoc.

     Revision 1.1  2003/12/08 23:32:56  valentin
     update to oct2003

     Revision 1.1  2003/10/28 00:16:54  gjanee
     Initial revision

Imported Modules   

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

Classes   

Adaptor_Switch


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