[Zope-CVS] CVS: Products/AdaptableStorage/serial - ObjectGateway.py:1.5 ObjectSerializer.py:1.3 SerializationEvent.py:1.4 public.py:1.2 DomainMapper.py:NONE

Shane Hathaway shane@zope.com
Mon, 9 Dec 2002 10:57:54 -0500


Update of /cvs-repository/Products/AdaptableStorage/serial
In directory cvs.zope.org:/tmp/cvs-serv29307/serial

Modified Files:
	ObjectGateway.py ObjectSerializer.py SerializationEvent.py 
	public.py 
Removed Files:
	DomainMapper.py 
Log Message:
Tidying:

- Removed domain mapper, which has been folded into object mapper (as I had
  always hoped to do--yay!)

- Removed makeKey from various places, since it now has a less meaningful
  purpose

- Removed classifyObject() from serialization events since it now serves
  no purpose I can think of

- Removed commented code

- Removed IObjectGateway since it now defines nothing more than IGateway

- Switched the order of the arguments for classifyObject() to match the
  order of the other methods

- Corrected and added comments



=== Products/AdaptableStorage/serial/ObjectGateway.py 1.4 => 1.5 ===
--- Products/AdaptableStorage/serial/ObjectGateway.py:1.4	Fri Dec  6 17:06:50 2002
+++ Products/AdaptableStorage/serial/ObjectGateway.py	Mon Dec  9 10:57:23 2002
@@ -17,12 +17,12 @@
 """
 
 
-from interfaces.public import IObjectGateway
+from interfaces.public import IGateway
 
 
 class ObjectGateway:
 
-    __implements__ = IObjectGateway
+    __implements__ = IGateway
 
     def __init__(self):
         self._gws = {}
@@ -78,8 +78,4 @@
         serials = serials.items()
         serials.sort()
         return tuple(serials)
-
-    def makeKey(self, event, name, stored):
-        # By default, use simple path-based keys
-        return event.getKeychain() + '/' + name
 


=== Products/AdaptableStorage/serial/ObjectSerializer.py 1.2 => 1.3 ===
--- Products/AdaptableStorage/serial/ObjectSerializer.py:1.2	Fri Dec  6 17:06:50 2002
+++ Products/AdaptableStorage/serial/ObjectSerializer.py	Mon Dec  9 10:57:23 2002
@@ -67,7 +67,7 @@
             event.setAspectName(name)
             aspect.deserialize(object, event, state)
 
-    def createEmptyInstance(self, full_state=None):
+    def createEmptyInstance(self, classification=None):
         m = __import__(self._module, {}, {}, ('__doc__',))
         c = getattr(m, self._name)
         return c.__basicnew__()


=== Products/AdaptableStorage/serial/SerializationEvent.py 1.3 => 1.4 ===
--- Products/AdaptableStorage/serial/SerializationEvent.py:1.3	Fri Dec  6 17:06:50 2002
+++ Products/AdaptableStorage/serial/SerializationEvent.py	Mon Dec  9 10:57:23 2002
@@ -61,17 +61,6 @@
         kos = self.getKeyedObjectSystem()
         return kos.identifyObject(value)
 
-    def classifyObject(self, value):
-        c = self.getObjectMapper().getClassifier()
-        return c.classifyObject(value)
-
-    def makeKey(self, name, stored_key=0):
-        raise NotImplementedError
-##        dm = self.getObjectMapper().getDomainMapper()
-##        sub_mapper = dm.getMapper(mapper_name)
-##        key = sub_mapper.getGateway().makeKey(self, name, stored_key)
-##        return key
-        
     def notifySerializedRef(self, name, value, is_attribute, keychain):
         assert keychain is not None
         self._refs.append((keychain, value))


=== Products/AdaptableStorage/serial/public.py 1.1 => 1.2 ===
--- Products/AdaptableStorage/serial/public.py:1.1	Wed Nov 27 13:37:06 2002
+++ Products/AdaptableStorage/serial/public.py	Mon Dec  9 10:57:23 2002
@@ -18,8 +18,8 @@
 
 from interfaces.public import *
 from exceptions import *
+
 from DeserializationEvent import DeserializationEvent
-from DomainMapper import DomainMapper
 from EventBase import EventBase
 from ObjectGateway import ObjectGateway
 from ObjectMapper import ObjectMapper

=== Removed File Products/AdaptableStorage/serial/DomainMapper.py ===