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

Philipp von Weitershausen philikon at philikon.de
Mon Mar 1 06:46:26 EST 2004


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

Added Files:
	__init__.py catalog.py index.py 
Log Message:
Catalog, its interfaces and its browser views are now located in
zope.app.catalog.


=== Added File Zope3/src/zope/app/catalog/interfaces/__init__.py ===
# make this directory a package


=== Added File Zope3/src/zope/app/catalog/interfaces/catalog.py ===
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Catalog Interfaces

$Id: catalog.py,v 1.1 2004/03/01 11:46:24 philikon Exp $
"""
from zope.interface import Interface

class ICatalogView(Interface):
    """Provides information about a catalog."""

    def getSubscribed():
        """Return 'True', if the catalog is subscribed to events, otherwise
        'False'."""


class ICatalogQuery(Interface):
    "Provides Catalog Queries"

    def searchResults(**kw):
	"search on the given indexes"


class ICatalogEdit(Interface):
    """Allows one to manipulate the Catalog information."""

    def clearIndexes(): 
        """Remove all index data."""

    def updateIndexes(): 
        """Reindex all objects."""

    def subscribeEvents(update=True): 
        """Start listening for events.

        Starts listening to events for possible index updating. If 'update' is
	'True', always reindex all objects.
        """

    def unsubscribeEvents(): 
        """Stop listening to events."""


class ICatalog(ICatalogView, ICatalogQuery, ICatalogEdit): 
    """Marker to describe a catalog in content space."""



=== Added File Zope3/src/zope/app/catalog/interfaces/index.py ===

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





More information about the Zope3-Checkins mailing list