コード例 #1
0
 def __init__(self, source=None):
     PrivacyBase.__init__(self, source)
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.rel = source.rel
     else:
         self.rel = ''
コード例 #2
0
ファイル: address.py プロジェクト: PyCManager/portableApps
 def __init__(self, source=None):
     """
     Create a new Address instance, copying from the source if provided.
     """
     PrivacyBase.__init__(self, source)
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     LocationBase.__init__(self, source)
コード例 #3
0
ファイル: reporef.py プロジェクト: arpalmares/portableApps
 def __init__(self, source=None):
     PrivacyBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.call_number = source.call_number
         self.media_type = SourceMediaType(source.media_type)
     else:
         self.call_number = ""
         self.media_type = SourceMediaType()
コード例 #4
0
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (privacy, citation_list, note_list, the_type, self.value) = data
     PrivacyBase.unserialize(self, privacy)
     CitationBase.unserialize(self, citation_list)
     NoteBase.unserialize(self, note_list)
     self.type.unserialize(the_type)
     return self
コード例 #5
0
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (privacy, citation_list, note_list, ref, self.rel) = data
     PrivacyBase.unserialize(self, privacy)
     CitationBase.unserialize(self, citation_list)
     NoteBase.unserialize(self, note_list)
     RefBase.unserialize(self, ref)
     return self
コード例 #6
0
ファイル: mediaref.py プロジェクト: arpalmares/portableApps
    def __init__(self, source=None):
        PrivacyBase.__init__(self, source)
        CitationBase.__init__(self, source)
        NoteBase.__init__(self, source)
        RefBase.__init__(self, source)
        AttributeBase.__init__(self, source)

        if source:
            self.rect = source.rect
        else:
            self.rect = None
コード例 #7
0
 def __init__(self, source=None):
     PrivacyBase.__init__(self, source)
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.frel = ChildRefType(source.frel)
         self.mrel = ChildRefType(source.mrel)
     else:
         self.frel = ChildRefType()
         self.mrel = ChildRefType()
コード例 #8
0
ファイル: url.py プロジェクト: arpalmares/portableApps
 def __init__(self, source=None):
     """Create a new URL instance, copying from the source if present."""
     PrivacyBase.__init__(self, source)
     if source:
         self.path = source.path
         self.desc = source.desc
         self.type = UrlType(source.type)
     else:
         self.path = ""
         self.desc = ""
         self.type = UrlType()
コード例 #9
0
ファイル: reporef.py プロジェクト: arpalmares/portableApps
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (note_list, ref, self.call_number, media_type, privacy) = data
     self.media_type = SourceMediaType()
     self.media_type.unserialize(media_type)
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note_list)
     RefBase.unserialize(self, ref)
     return self
コード例 #10
0
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (privacy, note_list, attribute_list, ref, role) = data
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note_list)
     AttributeBase.unserialize(self, attribute_list)
     RefBase.unserialize(self, ref)
     self.__role = EventRoleType()
     self.__role.unserialize(role)
     return self
コード例 #11
0
 def __init__(self, source=None):
     """
     Create a new EventRef instance, copying from the source if present.
     """
     PrivacyBase.__init__(self, source)
     NoteBase.__init__(self, source)
     AttributeBase.__init__(self, source)
     RefBase.__init__(self, source)
     if source:
         self.__role = EventRoleType(source.__role)
     else:
         self.__role = EventRoleType()
コード例 #12
0
ファイル: address.py プロジェクト: PyCManager/portableApps
    def unserialize(self, data):
        """
        Convert a serialized tuple of data to an object.
        """
        (privacy, citation_list, note_list, date, location) = data

        PrivacyBase.unserialize(self, privacy)
        CitationBase.unserialize(self, citation_list)
        NoteBase.unserialize(self, note_list)
        DateBase.unserialize(self, date)
        LocationBase.unserialize(self, location)
        return self
コード例 #13
0
 def __init__(self, source=None):
     """
     Create a new Attribute object, copying from the source if provided.
     """
     PrivacyBase.__init__(self, source)
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     
     if source:
         self.type = AttributeType(source.type)
         self.value = source.value
     else:
         self.type = AttributeType()
         self.value = ""
コード例 #14
0
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (privacy, citation_list, note_list, ref, frel, mrel) = data
     PrivacyBase.unserialize(self, privacy)
     CitationBase.unserialize(self, citation_list)
     NoteBase.unserialize(self, note_list)
     RefBase.unserialize(self, ref)
     self.frel = ChildRefType()
     self.frel.unserialize(frel)
     self.mrel = ChildRefType()
     self.mrel.unserialize(mrel)
     return self
コード例 #15
0
 def unserialize(self, data):
     """
     Convert a serialized tuple of data to an object.
     """
     (privacy, citation_list, note_list, date, self.first_name,
      surname_list, self.suffix, self.title, name_type, self.group_as,
      self.sort_as, self.display_as, self.call, self.nick,
      self.famnick) = data
     self.type = NameType(name_type)
     PrivacyBase.unserialize(self, privacy)
     SurnameBase.unserialize(self, surname_list)
     CitationBase.unserialize(self, citation_list)
     NoteBase.unserialize(self, note_list)
     DateBase.unserialize(self, date)
     return self
コード例 #16
0
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (PrivacyBase.serialize(self), CitationBase.serialize(self),
             NoteBase.serialize(self), RefBase.serialize(self),
             self.frel.serialize(), self.mrel.serialize())
コード例 #17
0
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (PrivacyBase.serialize(self), NoteBase.serialize(self),
             AttributeBase.serialize(self), RefBase.serialize(self),
             self.__role.serialize())
コード例 #18
0
ファイル: address.py プロジェクト: PyCManager/portableApps
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (PrivacyBase.serialize(self), CitationBase.serialize(self),
             NoteBase.serialize(self), DateBase.serialize(self),
             LocationBase.serialize(self))
コード例 #19
0
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (PrivacyBase.serialize(self),
             CitationBase.serialize(self),
             NoteBase.serialize(self),
             self.type.serialize(), self.value)
コード例 #20
0
ファイル: primaryobj.py プロジェクト: arpalmares/portableApps
    def __init__(self, source=None):
        """
        Initialize a PrimaryObject. 
        
        If source is None, both the ID and handle are assigned as empty 
        strings. If source is not None, then object is initialized from values 
        of the source object.

        :param source: Object used to initialize the new object
        :type source: PrimaryObject
        """
        TableObject.__init__(self, source)
        PrivacyBase.__init__(self, source)
        if source:
            self.gramps_id = source.gramps_id
        else:
            self.gramps_id = None
コード例 #21
0
 def __init__(self, source=None, data=None):
     """Create a new Name instance, copying from the source if provided.
     We should connect here to 'person-groupname-rebuild' and do something
     correct when first parameter is the name, and second parameter is
     different from the group here. However, that would be complicated and
     no real errors that cannot be ammended can be done if group is 
     saved differently.
     """
     PrivacyBase.__init__(self, source)
     SurnameBase.__init__(self, source)
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     if data:
         (privacy, citation_list, note, date, self.first_name, surname_list,
          self.suffix, self.title, name_type, self.group_as, self.sort_as,
          self.display_as, self.call, self.nick, self.famnick) = data
         self.type = NameType(name_type)
         SurnameBase.unserialize(self, surname_list)
         PrivacyBase.unserialize(self, privacy)
         CitationBase.unserialize(self, citation_list)
         NoteBase.unserialize(self, note)
         DateBase.unserialize(self, date)
     elif source:
         self.first_name = source.first_name
         self.suffix = source.suffix
         self.title = source.title
         self.type = NameType(source.type)
         self.group_as = source.group_as
         self.sort_as = source.sort_as
         self.display_as = source.display_as
         self.call = source.call
         self.nick = source.nick
         self.famnick = source.famnick
     else:
         self.first_name = ""
         self.suffix = ""
         self.title = ""
         self.type = NameType()
         self.group_as = ""
         self.sort_as = self.DEF
         self.display_as = self.DEF
         self.call = u''
         self.nick = u''
         self.famnick = u''
コード例 #22
0
ファイル: ldsord.py プロジェクト: arpalmares/portableApps
 def __init__(self, source=None):
     """Create a LDS Ordinance instance."""
     CitationBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     PlaceBase.__init__(self, source)
     PrivacyBase.__init__(self, source)
     
     if source:
         self.type = source.type
         self.famc = source.famc
         self.temple = source.temple
         self.status = source.status
     else:
         self.type = LdsOrd.DEFAULT_TYPE
         self.famc = None
         self.temple = ""
         self.status = LdsOrd.DEFAULT_STATUS
コード例 #23
0
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (PrivacyBase.serialize(self), CitationBase.serialize(self),
             NoteBase.serialize(self), DateBase.serialize(self),
             self.first_name, SurnameBase.serialize(self), self.suffix,
             self.title, self.type.serialize(), self.group_as, self.sort_as,
             self.display_as, self.call, self.nick, self.famnick)
コード例 #24
0
ファイル: reporef.py プロジェクト: arpalmares/portableApps
 def serialize(self):
     """
     Convert the object to a serialized tuple of data.
     """
     return (
         NoteBase.serialize(self),
         RefBase.serialize(self),
         self.call_number,
         self.media_type.serialize(),
         PrivacyBase.serialize(self),
     )
コード例 #25
0
 def __init__(self):
     SourceNote.__init__(self)
     PrivacyBase.__init__(self)