[Zope3-checkins] CVS: Zope3/src/zope/app/index/text - configure.zcml:1.4.2.1 index.py:1.4.4.1 processors.py:1.3.4.1
Sidnei da Silva
sidnei@x3ng.com.br
Tue, 11 Feb 2003 09:41:47 -0500
Update of /cvs-repository/Zope3/src/zope/app/index/text
In directory cvs.zope.org:/tmp/cvs-serv18615/src/zope/app/index/text
Modified Files:
Tag: paris-copypasterename-branch
configure.zcml index.py processors.py
Log Message:
Updating from HEAD to make sure everything still works before merging
=== Zope3/src/zope/app/index/text/configure.zcml 1.4 => 1.4.2.1 ===
--- Zope3/src/zope/app/index/text/configure.zcml:1.4 Sun Jan 5 14:04:42 2003
+++ Zope3/src/zope/app/index/text/configure.zcml Tue Feb 11 09:41:16 2003
@@ -16,5 +16,9 @@
interface="zope.app.interfaces.services.query.IQueryProcessable"
/>
</content>
-
+<adapter
+ factory="zope.app.index.text.processors.BatchedRankedProcessor"
+ provides="zope.app.interfaces.services.query.IQueryProcessor"
+ for="zope.textindex.textindexinterfaces.IQuerying"
+ />
</zopeConfigure>
=== Zope3/src/zope/app/index/text/index.py 1.4 => 1.4.4.1 ===
--- Zope3/src/zope/app/index/text/index.py:1.4 Mon Dec 30 09:03:08 2002
+++ Zope3/src/zope/app/index/text/index.py Tue Feb 11 09:41:16 2003
@@ -22,6 +22,7 @@
"""
from zope.component import getService, queryAdapter
+from zope.component.servicenames import HubIds
from zope.proxy.context import ContextMethod
from zope.app.interfaces.event import ISubscriber
from zope.exceptions import NotFoundError
@@ -90,7 +91,7 @@
def _getChannel(wrapped_self, channel):
if channel is None:
- channel = getService(wrapped_self, "HubIds")
+ channel = getService(wrapped_self, HubIds)
return channel
_getChannel = ContextMethod(_getChannel)
=== Zope3/src/zope/app/index/text/processors.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zope/app/index/text/processors.py:1.3 Mon Dec 30 13:43:07 2002
+++ Zope3/src/zope/app/index/text/processors.py Tue Feb 11 09:41:16 2003
@@ -19,35 +19,32 @@
from zope.component import getAdapter
from zope.textindex.textindexinterfaces import IQuerying
-from zope.app.interfaces.index.interfaces import \
- IBatchedResult, IRankedHubIdList, IBatchedTextIndexQuery
-from zope.app.interfaces.services.query import \
- IQueryProcessor
+from zope.app.interfaces.index.interfaces import IBatchedResult
+from zope.app.interfaces.index.interfaces import IRankedHubIdList
+from zope.app.interfaces.index.interfaces import IBatchedTextIndexQuery
+from zope.app.interfaces.services.query import IQueryProcessor
from zope.app.index.text.queries import BatchedTextIndexQuery
from zope.app.index.queries import BatchedRankedResult
-class IBatchedRankedProcessor(IQueryProcessor):
- # XXX until named adapters are there
- pass
-
class BatchedRankedProcessor:
- __implements__ = IBatchedRankedProcessor
+ __implements__ = IQueryProcessor
__used_for__ = IQuerying
inputInterfaces = (IBatchedTextIndexQuery,)
outputInterfaces = (IRankedHubIdList, IBatchedResult)
def __init__(self, textindex):
- self.__textindex = textindex
+ self.textindex = textindex
def __call__(self, query):
query = getAdapter(query, IBatchedTextIndexQuery)
- resultlist, totalresults = self.__textindex.query(query.textIndexQuery, \
- query.startPosition, query.batchSize)
+ resultlist, totalresults = self.textindex.query(query.textIndexQuery,
+ query.startPosition,
+ query.batchSize)
# XXX do we need some wrapping here?
- result = BatchedRankedResult(resultlist, query.startPosition, \
- query.batchSize, totalresults)
+ result = BatchedRankedResult(resultlist, query.startPosition,
+ query.batchSize, totalresults)
return result