[Zope-CVS] CVS: Products/AdaptableStorage/serial/interfaces - IClassifier.py:1.4 IKeyedObjectSystem.py:1.4 IObjectMapper.py:1.3 IObjectSerializer.py:1.3 ISerializationEvent.py:1.4 public.py:1.2 IDomainMapper.py:NONE IObjectGateway.py:NONE
Shane Hathaway
shane@zope.com
Mon, 9 Dec 2002 10:57:55 -0500
Update of /cvs-repository/Products/AdaptableStorage/serial/interfaces
In directory cvs.zope.org:/tmp/cvs-serv29307/serial/interfaces
Modified Files:
IClassifier.py IKeyedObjectSystem.py IObjectMapper.py
IObjectSerializer.py ISerializationEvent.py public.py
Removed Files:
IDomainMapper.py IObjectGateway.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/interfaces/IClassifier.py 1.3 => 1.4 ===
--- Products/AdaptableStorage/serial/interfaces/IClassifier.py:1.3 Sat Dec 7 00:59:13 2002
+++ Products/AdaptableStorage/serial/interfaces/IClassifier.py Mon Dec 9 10:57:24 2002
@@ -32,7 +32,7 @@
The keys in the classification mapping are implementation-dependent.
"""
- def classifyObject(keychain, value):
+ def classifyObject(value, keychain):
"""Returns a classification and mapper_name.
"""
=== Products/AdaptableStorage/serial/interfaces/IKeyedObjectSystem.py 1.3 => 1.4 ===
--- Products/AdaptableStorage/serial/interfaces/IKeyedObjectSystem.py:1.3 Sat Dec 7 00:59:13 2002
+++ Products/AdaptableStorage/serial/interfaces/IKeyedObjectSystem.py Mon Dec 9 10:57:24 2002
@@ -35,6 +35,3 @@
Returns None if the object is not in the keyed object system.
"""
-## def newKey():
-## """Returns a new keychain that doesn't conflict with any other."""
-
=== Products/AdaptableStorage/serial/interfaces/IObjectMapper.py 1.2 => 1.3 ===
--- Products/AdaptableStorage/serial/interfaces/IObjectMapper.py:1.2 Fri Dec 6 17:06:50 2002
+++ Products/AdaptableStorage/serial/interfaces/IObjectMapper.py Mon Dec 9 10:57:24 2002
@@ -23,14 +23,6 @@
"""A hub for operations involved in mapping a certain kind of object.
"""
-## def getDomainMapper():
-## """Returns the domain mapper.
-
-## Note that every object mapper in a domain mapper must return
-## the same domain mapper. Otherwise it's not possible to find
-## an object mapper given nothing other than a mapper name.
-## """
-
def getSerializer():
"""Returns the IObjectSerializer for this mapper."""
@@ -38,22 +30,15 @@
"""Returns the IGateway for this mapper."""
def getClassifier():
- """Returns the classifier for subobjects.
-
- Although object mappers are bound to a specific domain mapper,
- object mappers can provide different classifiers. This allows
- different branches of an object tree to store data in different
- ways, even though the same classes are used.
- """
+ """Returns the classifier for objects referenced by this mapper."""
def getSubMapper(name):
"""Returns the named sub-mapper.
- The name of a sub-mapper is usually chosen by either a
- classifier or an aspect.
+ The name of a sub-mapper is chosen by either a classifier or
+ an aspect.
"""
def isVolatile():
- """Returns true if objects should last only one transaction.
- """
+ """Returns true if objects should last only one transaction."""
=== Products/AdaptableStorage/serial/interfaces/IObjectSerializer.py 1.2 => 1.3 ===
--- Products/AdaptableStorage/serial/interfaces/IObjectSerializer.py:1.2 Fri Dec 6 17:06:50 2002
+++ Products/AdaptableStorage/serial/interfaces/IObjectSerializer.py Mon Dec 9 10:57:24 2002
@@ -23,7 +23,7 @@
"""Serializes/deserializes objects.
The serialized state does not need to include the class of the object,
- which is saved separately.
+ which is maintained separately.
"""
def getSchema():
@@ -48,13 +48,13 @@
"""Fills an object based on a previously serialized state.
"""
- def createEmptyInstance(full_state=None):
- """Returns the class info for a state.
+ def createEmptyInstance(classification=None):
+ """Returns a new instance.
If this serializer works with instances of only one class,
- createEmptyInstance() should create a class instance even when
- full_state is None to improve performance. When full_state is
- None and the optimization is not possible,
- createEmptyInstance() should return None.
+ createEmptyInstance() should not require the use of the
+ classification argument. Implementations that need the
+ classification argument can return None when classification is
+ None, but doing so may incur a performance penalty.
"""
=== Products/AdaptableStorage/serial/interfaces/ISerializationEvent.py 1.3 => 1.4 ===
--- Products/AdaptableStorage/serial/interfaces/ISerializationEvent.py:1.3 Fri Dec 6 17:06:50 2002
+++ Products/AdaptableStorage/serial/interfaces/ISerializationEvent.py Mon Dec 9 10:57:24 2002
@@ -34,16 +34,10 @@
subob before calling this method.
"""
- def classifyObject(value):
- """Returns a classification and mapper_name given a subobject.
- """
-
def identifyObject(value):
- """
- """
+ """Returns the keychain of an existing object.
- def makeKey(name, stored_key=0):
- """
+ Returns None if the object is not yet known.
"""
def notifySerializedRef(name, value, is_attribute, keychain):
=== Products/AdaptableStorage/serial/interfaces/public.py 1.1 => 1.2 ===
--- Products/AdaptableStorage/serial/interfaces/public.py:1.1 Wed Nov 27 13:37:06 2002
+++ Products/AdaptableStorage/serial/interfaces/public.py Mon Dec 9 10:57:24 2002
@@ -19,13 +19,11 @@
from IAspectSerializer import IAspectSerializer
from IClassifier import IClassifier
from IDeserializationEvent import IDeserializationEvent
-from IDomainMapper import IDomainMapper
from IEventBase import IEventBase
from IFullDeserializationEvent import IFullDeserializationEvent
from IFullSerializationEvent import IFullSerializationEvent
from IGateway import IGateway
from IKeyedObjectSystem import IKeyedObjectSystem
-from IObjectGateway import IObjectGateway
from IObjectMapper import IObjectMapper
from IObjectSerializer import IObjectSerializer
from ISchema import ISchema
=== Removed File Products/AdaptableStorage/serial/interfaces/IDomainMapper.py ===
=== Removed File Products/AdaptableStorage/serial/interfaces/IObjectGateway.py ===