Пример #1
0
    def __init__(self, data=None):
        """
        Creates a new Person instance. After initialization, most
        data items have empty or null values, including the database
        handle.
        """
        PrimaryObject.__init__(self)
        SourceBase.__init__(self)
        NoteBase.__init__(self)
        MediaBase.__init__(self)
        AttributeBase.__init__(self)
        AddressBase.__init__(self)
        UrlBase.__init__(self)
        LdsOrdBase.__init__(self)
        self.primary_name = Name()
        self.event_ref_list = []
        self.family_list = []
        self.parent_family_list = []
        self.alternate_names = []
        self.person_ref_list = []
        self.gender = Person.UNKNOWN
        self.death_ref_index = -1
        self.birth_ref_index = -1

        if data:
            self.unserialize(data)
Пример #2
0
 def __init__(self, source=None):
     """Creates a new Address instance, copying from the source
     if provided"""
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     LocationBase.__init__(self, source)
Пример #3
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 = ''
Пример #4
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()
Пример #5
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()
Пример #6
0
 def __init__(self, source=None):
     """
     Creates a new Attribute object, copying from the source if provided.
     """
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     
     if source:
         self.type = source.type
         self.value = source.value
     else:
         self.type = AttributeType()
         self.value = ""
Пример #7
0
 def __init__(self):
     """
     Creates a new Family instance. After initialization, most
     data items have empty or null values, including the database
     handle.
     """
     PrimaryObject.__init__(self)
     SourceBase.__init__(self)
     NoteBase.__init__(self)
     MediaBase.__init__(self)
     AttributeBase.__init__(self)
     LdsOrdBase.__init__(self)
     self.father_handle = None
     self.mother_handle = None
     self.child_ref_list = []
     self.type = FamilyRelType()
     self.event_ref_list = []
     self.complete = 0
Пример #8
0
 def __init__(self):
     """
     Creates a new Family instance. After initialization, most
     data items have empty or null values, including the database
     handle.
     """
     PrimaryObject.__init__(self)
     SourceBase.__init__(self)
     NoteBase.__init__(self)
     MediaBase.__init__(self)
     AttributeBase.__init__(self)
     LdsOrdBase.__init__(self)
     self.father_handle = None
     self.mother_handle = None
     self.child_ref_list = []
     self.type = FamilyRelType()
     self.event_ref_list = []
     self.complete = 0
Пример #9
0
    def __init__(self, source=None):
        """Creates a LDS Ordinance instance"""
        SecondaryObject.__init__(self)
        SourceBase.__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
Пример #10
0
    def __init__(self, source=None):
        """Creates a LDS Ordinance instance"""
        SecondaryObject.__init__(self)
        SourceBase.__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
Пример #11
0
 def __init__(self, source=None, data=None):
     """creates a new Name instance, copying from the source if provided"""
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     if data:
         (privacy, source_list, note, date,
          self.first_name, self.surname, self.suffix, self.title,
          name_type, self.prefix, self.patronymic,
          self.group_as, self.sort_as, self.display_as, self.call) = data
         self.type = NameType(name_type)
         PrivacyBase.unserialize(self, privacy)
         SourceBase.unserialize(self, source_list)
         NoteBase.unserialize(self, note)
         DateBase.unserialize(self, date)
     elif source:
         self.first_name = source.first_name
         self.surname = source.surname
         self.suffix = source.suffix
         self.title = source.title
         self.type = source.type
         self.prefix = source.prefix
         self.patronymic = source.patronymic
         self.group_as = source.group_as
         self.sort_as = source.sort_as
         self.display_as = source.display_as
         self.call = source.call
     else:
         self.first_name = ""
         self.surname = ""
         self.suffix = ""
         self.title = ""
         self.type = NameType()
         self.prefix = ""
         self.patronymic = ""
         self.group_as = ""
         self.sort_as = self.DEF
         self.display_as = self.DEF
         self.call = u''
Пример #12
0
    def __init__(self, source=None):
        """
        Creates a new Event instance, copying from the source if present

        @param source: An event used to initialize the new event
        @type source: Event
        """

        PrimaryObject.__init__(self, source)
        SourceBase.__init__(self, source)
        NoteBase.__init__(self, source)
        MediaBase.__init__(self, source)
        AttributeBase.__init__(self)
        DateBase.__init__(self, source)
        PlaceBase.__init__(self, source)

        if source:
            self.description = source.description
            self.type = source.type
        else:
            self.description = ""
            self.type = EventType()
Пример #13
0
    def __init__(self, source=None):
        """
        Creates a new Event instance, copying from the source if present

        @param source: An event used to initialize the new event
        @type source: Event
        """

        PrimaryObject.__init__(self, source)
        SourceBase.__init__(self, source)
        NoteBase.__init__(self, source)
        MediaBase.__init__(self, source)
        AttributeBase.__init__(self)
        DateBase.__init__(self, source)
        PlaceBase.__init__(self, source)

        if source:
            self.description = source.description
            self.type = source.type
        else:
            self.description = ""
            self.type = EventType()
Пример #14
0
    def __init__(self, source=None):
        """
        Creates a new Place object, copying from the source if present.

        @param source: A Place object used to initialize the new Place
        @type source: Place
        """
        PrimaryObject.__init__(self, source)
        SourceBase.__init__(self, source)
        NoteBase.__init__(self, source)
        MediaBase.__init__(self, source)
        UrlBase.__init__(self, source)
        if source:
            self.long = source.long
            self.lat = source.lat
            self.title = source.title
            self.main_loc = Location(source.main_loc)
            self.alt_loc = [Location(loc) for loc in source.alt_loc]
        else:
            self.long = ""
            self.lat = ""
            self.title = ""
            self.main_loc = None
            self.alt_loc = []
Пример #15
0
    def __init__(self, source=None):
        """
        Initialize a MediaObject. 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: MediaObject
        """
        PrimaryObject.__init__(self, source)
        SourceBase.__init__(self, source)
        NoteBase.__init__(self, source)
        DateBase.__init__(self, source)
        AttributeBase.__init__(self, source)

        if source:
            self.path = source.path
            self.mime = source.mime
            self.desc = source.desc
            self.thumb = source.thumb
        else:
            self.path = ""
            self.mime = ""
            self.desc = ""
            self.thumb = None
Пример #16
0
    def __init__(self, source=None):
        """
        Initialize a MediaObject. 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: MediaObject
        """
        PrimaryObject.__init__(self, source)
        SourceBase.__init__(self, source)
        NoteBase.__init__(self, source)
        DateBase.__init__(self, source)
        AttributeBase.__init__(self, source)

        if source:
            self.path = source.path
            self.mime = source.mime
            self.desc = source.desc
            self.thumb = source.thumb
        else:
            self.path = ""
            self.mime = ""
            self.desc = ""
            self.thumb = None