Added return on unserialize; added create for all classes

svn: r18286
This commit is contained in:
Doug Blank 2011-10-11 23:39:10 +00:00
parent c38e2ab5a0
commit bdc643366d
3 changed files with 7 additions and 0 deletions

View File

@ -186,3 +186,8 @@ class BaseObject(object):
:type acquisition: BaseObject :type acquisition: BaseObject
""" """
pass pass
@classmethod
def create(cls, data):
return cls().unserialize(data)

View File

@ -129,6 +129,7 @@ class Event(SourceBase, NoteBase, MediaBase, AttributeBase,
AttributeBase.unserialize(self, attribute_list) AttributeBase.unserialize(self, attribute_list)
SourceBase.unserialize(self, source_list) SourceBase.unserialize(self, source_list)
NoteBase.unserialize(self, note_list) NoteBase.unserialize(self, note_list)
return self
def _has_handle_reference(self, classname, handle): def _has_handle_reference(self, classname, handle):
""" """

View File

@ -147,6 +147,7 @@ class Family(SourceBase, NoteBase, MediaBase, AttributeBase, LdsOrdBase,
NoteBase.unserialize(self, note_list) NoteBase.unserialize(self, note_list)
LdsOrdBase.unserialize(self, lds_seal_list) LdsOrdBase.unserialize(self, lds_seal_list)
TagBase.unserialize(self, tag_list) TagBase.unserialize(self, tag_list)
return self
def _has_handle_reference(self, classname, handle): def _has_handle_reference(self, classname, handle):
""" """