Changeset 3848 for waeup


Ignore:
Timestamp:
16 Jan 2009, 12:22:52 (16 years ago)
Author:
uli
Message:

New interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/interfaces.py

    r3826 r3848  
    44from zope import schema
    55
    6 class IUniversity(Interface):
     6class IWAeUPObject(Interface):
     7    """A WAeUP object.
     8    """
     9
     10class IUniversity(IWAeUPObject):
    711    """Representation of a university.
    812    """
     
    1317        )
    1418
    15 class IStudentContainer(Interface):
     19class IWAeUPContainer(IWAeUPObject):
     20    """A container for WAeUP objects.
     21    """
     22   
     23class IStudentContainer(IWAeUPContainer):
    1624    """A container for StudentObjects.
    1725    """
    1826
    19 class IHostelContainer(Interface):
     27class IHostelContainer(IWAeUPContainer):
    2028    """A container for hostels.
    2129    """
    2230
    23 class IFacultyContainer(Interface):
     31class IFacultyContainer(IWAeUPContainer):
    2432    """A container for faculties.
    2533    """
     34class IWAeUPExporter(Interface):
     35    """An exporter for objects.
     36    """
     37    def export(obj, filepath=None):
     38        """Export by pickling.
     39
     40        Returns a file-like object containing a representation of `obj`.
     41
     42        This is done using `pickle`. If `filepath` is ``None``, a
     43        `cStringIO` object is returned, that contains the saved data.
     44        """
     45
     46class IWAeUPXMLExporter(Interface):
     47    """An XML exporter for objects.
     48    """
     49    def export(obj, filepath=None):
     50        """Export as XML.
     51
     52        Returns an XML representation of `obj`.
     53
     54        If `filepath` is ``None``, a StringIO` object is returned,
     55        that contains the transformed data.
     56        """
Note: See TracChangeset for help on using the changeset viewer.