[Zope3-checkins] CVS: Zope3/src/zope/app/schemagen - interfaces.py:1.1 modulegen.py:1.5 schemaspec.py:1.5 typereg.py:1.6

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


Update of /cvs-repository/Zope3/src/zope/app/schemagen
In directory cvs.zope.org:/tmp/cvs-serv23881/src/zope/app/schemagen

Modified Files:
	modulegen.py schemaspec.py typereg.py 
Added Files:
	interfaces.py 
Log Message:


Move schemgen interfaces into the package.




=== Added File Zope3/src/zope/app/schemagen/interfaces.py ===
##############################################################################
#
# Copyright (c) 2002 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.
#
##############################################################################
"""XXX short summary goes here.

XXX longer description goes here.

$Id: interfaces.py,v 1.1 2004/03/13 20:24:15 srichter Exp $
"""

from zope.interface import Interface, Attribute

class ITypeRepresentation(Interface):
    """Provide a textual representation of object

    The goal is to have a textual representation (text) that can be
    'eval'ed again so it becomes an object.
    """
    importList = Attribute('List of two-string tuples for use in '
                           'from X import Y')

    text = Attribute('Textual representation of object')


    def getTypes():
        """Return the sequence of types this representation can represent.
        """

class ISchemaSpec(Interface):

    def addField(name, field):
        """Add a field to schema.

        This should be a null operation for instances of the class
        implementing the schema; FieldProperty will provide a default
        for the added field.
        """

    def removeField(name):
        """Remove field from schema.
        """

    def renameField(orig_name, target_name):
        """Rename field.
        """

    def insertField(name, field, position):
        """Insert a field at position.
        """

    def moveField(name, position):
        """Move field to position.
        """

    def generateModuleSource(self):
        pass


=== Zope3/src/zope/app/schemagen/modulegen.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/schemagen/modulegen.py:1.4	Fri Feb 20 11:57:28 2004
+++ Zope3/src/zope/app/schemagen/modulegen.py	Sat Mar 13 15:24:15 2004
@@ -14,7 +14,6 @@
 """
 $Id$
 """
-
 from zope.app.schemagen.typereg import fieldRegistry
 
 def generateModuleSource(schema_name, fields, class_name,


=== Zope3/src/zope/app/schemagen/schemaspec.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/schemagen/schemaspec.py:1.4	Fri Feb 20 11:57:28 2004
+++ Zope3/src/zope/app/schemagen/schemaspec.py	Sat Mar 13 15:24:15 2004
@@ -16,7 +16,7 @@
 """
 __metaclass__ = type
 
-from zope.app.interfaces.schemagen import ISchemaSpec
+from interfaces import ISchemaSpec
 from persistent import Persistent
 from zope.app.schemagen.modulegen import generateModuleSource
 from zope.interface import implements


=== Zope3/src/zope/app/schemagen/typereg.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/schemagen/typereg.py:1.5	Mon Nov  3 23:04:25 2003
+++ Zope3/src/zope/app/schemagen/typereg.py	Sat Mar 13 15:24:15 2004
@@ -11,17 +11,14 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""XXX short summary goes here.
-
-XXX longer description goes here.
+"""Type Reprsentation Registry
 
 $Id$
 """
-
 from zope.interface import implements, providedBy
 import zope.schema
 
-from zope.app.interfaces.schemagen import ITypeRepresentation
+from interfaces import ITypeRepresentation
 
 class TypeRepresentationRegistry:
     def __init__(self, default):




More information about the Zope3-Checkins mailing list