Пример #1
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (note, ref, self.call_number, media_type) = data
     self.media_type.unserialize(media_type)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     return self
Пример #2
0
 def __init__(self, source=None):
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.rel = source.rel
     else:
         self.rel = ''
Пример #3
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, source_list, note, ref, self.rel) = data
     PrivacyBase.unserialize(self, privacy)
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     return self
Пример #4
0
 def __init__(self, source=None):
     SecondaryObject.__init__(self)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.call_number = source.call_number
         self.media_type = source.media_type
     else:
         self.call_number = ""
         self.media_type = SourceMediaType()
Пример #5
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (date, privacy, note,
      self.confidence, ref, self.page, self.text) = data
     DateBase.unserialize(self, date)
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     return self
Пример #6
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, note, attribute_list, ref, role) = data
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note)
     AttributeBase.unserialize(self, attribute_list)
     RefBase.unserialize(self, ref)
     self.role.unserialize(role)
     return self
Пример #7
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (date, privacy, note, self.confidence, ref, self.page,
      self.text) = data
     DateBase.unserialize(self, date)
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     return self
Пример #8
0
 def __init__(self, source=None):
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.frel = source.frel
         self.mrel = source.mrel
     else:
         self.frel = ChildRefType()
         self.mrel = ChildRefType()
Пример #9
0
 def __init__(self, source=None):
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.frel = source.frel
         self.mrel = source.mrel
     else:
         self.frel = ChildRefType()
         self.mrel = ChildRefType()
Пример #10
0
 def __init__(self, source=None):
     """
     Creates a new EventRef instance, copying from the source if present.
     """
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     NoteBase.__init__(self, source)
     AttributeBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.role = source.role
     else:
         self.role = EventRoleType()
Пример #11
0
 def __init__(self, source=None):
     """creates a new SourceRef, copying from the source if present"""
     SecondaryObject.__init__(self)
     DateBase.__init__(self, source)
     PrivacyBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.confidence = source.confidence
         self.page = source.page
         self.text = source.text
     else:
         self.confidence = SourceRef.CONF_NORMAL
         self.page = ""
         self.text = ""
Пример #12
0
 def __init__(self, source=None):
     """creates a new SourceRef, copying from the source if present"""
     SecondaryObject.__init__(self)
     DateBase.__init__(self, source)
     PrivacyBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.confidence = source.confidence
         self.page = source.page
         self.text = source.text
     else:
         self.confidence = SourceRef.CONF_NORMAL
         self.page = ""
         self.text = ""
Пример #13
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (DateBase.serialize(self), PrivacyBase.serialize(self),
             NoteBase.serialize(self), self.confidence,
             RefBase.serialize(self), self.page, self.text)
Пример #14
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (PrivacyBase.serialize(self), SourceBase.serialize(self),
             NoteBase.serialize(self), RefBase.serialize(self),
             self.frel.serialize(), self.mrel.serialize())
Пример #15
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (
         NoteBase.serialize(self),
         RefBase.serialize(self),
         self.call_number, self.media_type.serialize())
Пример #16
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (PrivacyBase.serialize(self),
             SourceBase.serialize(self),
             NoteBase.serialize(self),
             RefBase.serialize(self),
             self.rel)
Пример #17
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (DateBase.serialize(self),
             PrivacyBase.serialize(self),
             NoteBase.serialize(self),
             self.confidence,
             RefBase.serialize(self),
             self.page, self.text)
Пример #18
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (PrivacyBase.serialize(self),
             SourceBase.serialize(self),
             NoteBase.serialize(self),
             AttributeBase.serialize(self),
             RefBase.serialize(self),
             self.rect)
Пример #19
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     return (
         PrivacyBase.serialize(self),
         NoteBase.serialize(self),
         AttributeBase.serialize(self),
         RefBase.serialize(self),
         self.role.serialize()
         )