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) CitationBase.__init__(self, source) NoteBase.__init__(self, source) DateBase.__init__(self, source) AttributeBase.__init__(self, source) TagBase.__init__(self) 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
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 = ''
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)
def __init__(self): """Create a new Citation instance.""" PrimaryObject.__init__(self) MediaBase.__init__(self) # 7 NoteBase.__init__(self) # 6 DateBase.__init__(self) # 2 self.source_handle = None # 5 self.page = "" # 3 self.confidence = Citation.CONF_NORMAL # 4 self.datamap = {} # 8
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()
def __init__(self): """ Create a new Repository instance. """ PrimaryObject.__init__(self) NoteBase.__init__(self) AddressBase.__init__(self) UrlBase.__init__(self) self.type = RepositoryType() self.name = ""
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()
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
def __init__(self): """Create a new Source instance.""" PrimaryObject.__init__(self) MediaBase.__init__(self) NoteBase.__init__(self) self.title = "" self.author = "" self.pubinfo = "" self.datamap = {} self.abbrev = "" self.reporef_list = []
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()
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 = ""
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''
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
def __init__(self): """ Create a new Family instance. After initialization, most data items have empty or null values, including the database handle. """ PrimaryObject.__init__(self) CitationBase.__init__(self) NoteBase.__init__(self) MediaBase.__init__(self) AttributeBase.__init__(self) LdsOrdBase.__init__(self) TagBase.__init__(self) self.father_handle = None self.mother_handle = None self.child_ref_list = [] self.type = FamilyRelType() self.event_ref_list = [] self.complete = 0
def __init__(self, source=None): """ Create 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) CitationBase.__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 = EventType(source.__type) else: self.__description = "" self.__type = EventType()
def __init__(self, source=None): """ Create 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) CitationBase.__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 = map(Location, source.alt_loc) else: self.long = "" self.lat = "" self.title = "" self.main_loc = None self.alt_loc = []