[Zope3-checkins] CVS: Zope3/src/zope/app/index/interfaces - __init__.py:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 13 15:24:39 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/index/interfaces
In directory cvs.zope.org:/tmp/cvs-serv23775/src/zope/app/index/interfaces

Modified Files:
	__init__.py 
Log Message:


Move last two query interface into zope.app.index.




=== Zope3/src/zope/app/index/interfaces/__init__.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/index/interfaces/__init__.py:1.1	Tue Mar  2 09:40:10 2004
+++ Zope3/src/zope/app/index/interfaces/__init__.py	Sat Mar 13 15:24:09 2004
@@ -15,10 +15,28 @@
 
 $Id$
 """
-from zope.interface import Interface
+from zope.interface import Interface, Attribute
 
 class IInterfaceIndexer(Interface):
     """I index objects by first adapting them to an interface, then
        retrieving a field on the adapted object.
     """
     
+class IQueryProcessable(Interface):
+    """Query Processor
+
+    Marker interface that says that the implementing component is adaptable
+    to IQueryProcessor, although maybe only via a named adapter."""
+
+class IQueryProcessor(IQueryProcessable):
+
+    inputInterfaces = Attribute("Sequence of input interfaces")
+    outputInterfaces = Attribute("Sequence of output interfaces")
+
+    def __call__(query):
+        """Processes the query returning the result.
+
+           The query must be adaptable to each interface in input_interface.
+           The output should be adaptable to each interface in the
+           output_interface.
+        """




More information about the Zope3-Checkins mailing list