[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/catalog - __init__.py:1.2 catalog.py:1.2 index.py:1.2
Anthony Baxter
anthony@interlink.com.au
Sat, 12 Jul 2003 23:36:35 -0400
Update of /cvs-repository/Zope3/src/zope/app/interfaces/catalog
In directory cvs.zope.org:/tmp/cvs-serv2618/app/interfaces/catalog
Added Files:
__init__.py catalog.py index.py
Log Message:
Say hello to Mr. Catalog.
Merge of the melb-2003-content-catalog-branch.
Currently, only FieldIndexes are hooked up to catalogs. Will be
hooking up TextIndex next. Catalogs can be added as both Utilities
(see zope/app/catalog/catalog.txt for details on doing this) and in
Content space.
=== Zope3/src/zope/app/interfaces/catalog/__init__.py 1.1 => 1.2 ===
=== Zope3/src/zope/app/interfaces/catalog/catalog.py 1.1 => 1.2 ===
--- /dev/null Sat Jul 12 23:36:34 2003
+++ Zope3/src/zope/app/interfaces/catalog/catalog.py Sat Jul 12 23:36:00 2003
@@ -0,0 +1,26 @@
+from zope.interface import Interface
+
+class ICatalogView(Interface):
+ "Provides read-only access to Catalog"
+
+ def getSubscribed(): "get current subscription status"
+
+class ICatalogQuery(Interface):
+ "Provides Catalog Queries"
+ def searchResults(**kw):
+ "search on the given indexes"
+
+class ICatalogEdit(Interface):
+ "Provides read-write Catalog info"
+ def clearIndexes():
+ "nuke the indexes"
+ def updateIndexes():
+ "reindex all objects"
+ def subscribeEvents(update=True):
+ "start receiving events, if update, reindex all existing events"
+ def unsubscribeEvents():
+ "stop receiving events"
+
+class ICatalog(ICatalogView, ICatalogQuery, ICatalogEdit):
+ "a content-space catalog"
+ pass
=== Zope3/src/zope/app/interfaces/catalog/index.py 1.1 => 1.2 ===
--- /dev/null Sat Jul 12 23:36:35 2003
+++ Zope3/src/zope/app/interfaces/catalog/index.py Sat Jul 12 23:36:00 2003
@@ -0,0 +1,19 @@
+
+from zope.app.interfaces.event import ISubscriber
+from zope.interface import Interface
+
+class ICatalogIndexUpdate(ISubscriber):
+ "A wrapper around an Index that's in a Catalog"
+
+ def clear():
+ "Clear everything from the index"
+
+class ICatalogIndexQuery(Interface):
+ "la la la la la"
+
+ def search(term):
+ "do a search"
+
+class ICatalogIndex(ICatalogIndexUpdate, ICatalogIndexQuery):
+ pass
+