* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
#
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
2007-02-20 06:09:10 +05:30
|
|
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
2006-04-07 10:24:51 +05:30
|
|
|
# This program is distributed in the hope that it will be useful,
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Person object for GRAMPS.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2007-08-30 04:31:16 +05:30
|
|
|
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# GRAMPS modules
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2008-02-24 19:25:55 +05:30
|
|
|
from gen.lib.primaryobj import PrimaryObject
|
|
|
|
from gen.lib.srcbase import SourceBase
|
|
|
|
from gen.lib.notebase import NoteBase
|
|
|
|
from gen.lib.mediabase import MediaBase
|
|
|
|
from gen.lib.attrbase import AttributeBase
|
|
|
|
from gen.lib.addressbase import AddressBase
|
|
|
|
from gen.lib.ldsordbase import LdsOrdBase
|
|
|
|
from gen.lib.urlbase import UrlBase
|
|
|
|
from gen.lib.name import Name
|
|
|
|
from gen.lib.eventref import EventRef
|
|
|
|
from gen.lib.personref import PersonRef
|
|
|
|
from gen.lib.attrtype import AttributeType
|
|
|
|
from gen.lib.eventroletype import EventRoleType
|
|
|
|
from gen.lib.markertype import MarkerType
|
2006-04-14 10:06:25 +05:30
|
|
|
|
2005-12-21 02:18:18 +05:30
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Person class
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2007-01-25 10:56:22 +05:30
|
|
|
class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
|
|
|
|
AddressBase, UrlBase, LdsOrdBase, PrimaryObject):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
The Person record is the GRAMPS in-memory representation of an
|
|
|
|
individual person. It contains all the information related to
|
|
|
|
an individual.
|
|
|
|
|
|
|
|
Person objects are usually created in one of two ways.
|
|
|
|
|
2008-02-24 19:25:55 +05:30
|
|
|
1. Creating a new person object, which is then initialized and added to
|
|
|
|
the database.
|
|
|
|
2. Retrieving an object from the database using the records handle.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
Once a Person object has been modified, it must be committed
|
2006-04-07 10:24:51 +05:30
|
|
|
to the database using the database object's commit_person function,
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
or the changes will be lost.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
UNKNOWN = 2
|
|
|
|
MALE = 1
|
|
|
|
FEMALE = 0
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def __init__(self, data=None):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Create a new Person instance.
|
|
|
|
|
|
|
|
After initialization, most data items have empty or null values,
|
|
|
|
including the database
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
handle.
|
|
|
|
"""
|
2007-08-28 17:17:22 +05:30
|
|
|
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()
|
2007-08-30 04:31:16 +05:30
|
|
|
self.marker = MarkerType()
|
2007-08-28 17:17:22 +05:30
|
|
|
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
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
if data:
|
|
|
|
self.unserialize(data)
|
|
|
|
|
|
|
|
# We hold a reference to the GrampsDB so that we can maintain
|
|
|
|
# its genderStats. It doesn't get set here, but from
|
|
|
|
# GenderStats.count_person.
|
|
|
|
|
|
|
|
def serialize(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Convert the data held in the Person to a Python tuple that
|
|
|
|
represents all the data elements.
|
|
|
|
|
|
|
|
This method is used to convert the object into a form that can easily
|
|
|
|
be saved to a database.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
These elements may be primative Python types (string, integers),
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
complex Python types (lists or tuples, or Python objects. If the
|
|
|
|
target database cannot handle complex types (such as objectes or
|
|
|
|
lists), the database is responsible for converting the data into
|
|
|
|
a form that it can use.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns a python tuple containing the data that should
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
be considered persistent.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: tuple
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-12 12:27:14 +05:30
|
|
|
return (
|
|
|
|
self.handle, # 0
|
|
|
|
self.gramps_id, # 1
|
|
|
|
self.gender, # 2
|
|
|
|
self.primary_name.serialize(), # 3
|
|
|
|
[name.serialize() for name in self.alternate_names], # 4
|
2006-05-24 01:25:35 +05:30
|
|
|
self.death_ref_index, # 5
|
|
|
|
self.birth_ref_index, # 6
|
2006-05-06 02:46:24 +05:30
|
|
|
[er.serialize() for er in self.event_ref_list], # 7
|
|
|
|
self.family_list, # 8
|
|
|
|
self.parent_family_list, # 9
|
|
|
|
MediaBase.serialize(self), # 10
|
|
|
|
AddressBase.serialize(self), # 11
|
|
|
|
AttributeBase.serialize(self), # 12
|
|
|
|
UrlBase.serialize(self), # 13
|
|
|
|
LdsOrdBase.serialize(self), # 14
|
|
|
|
SourceBase.serialize(self), # 15
|
|
|
|
NoteBase.serialize(self), # 16
|
|
|
|
self.change, # 17
|
|
|
|
self.marker.serialize(), # 18
|
|
|
|
self.private, # 19
|
|
|
|
[pr.serialize() for pr in self.person_ref_list] # 20
|
2006-04-12 12:27:14 +05:30
|
|
|
)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def unserialize(self, data):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Convert the data held in a tuple created by the serialize method
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
back into the data in a Person object.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param data: tuple containing the persistent data associated the
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
Person object
|
2009-06-25 03:26:07 +05:30
|
|
|
:type data: tuple
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2007-01-08 07:19:33 +05:30
|
|
|
(self.handle, # 0
|
|
|
|
self.gramps_id, # 1
|
|
|
|
self.gender, # 2
|
|
|
|
primary_name, # 3
|
|
|
|
alternate_names, # 4
|
|
|
|
self.death_ref_index, # 5
|
|
|
|
self.birth_ref_index, # 6
|
|
|
|
event_ref_list, # 7
|
|
|
|
self.family_list, # 8
|
|
|
|
self.parent_family_list, # 9
|
|
|
|
media_list, # 10
|
|
|
|
address_list, # 11
|
|
|
|
attribute_list, # 12
|
|
|
|
urls, # 13
|
|
|
|
lds_ord_list, # 14
|
|
|
|
source_list, # 15
|
2007-02-20 06:09:10 +05:30
|
|
|
note_list, # 16
|
2007-01-08 07:19:33 +05:30
|
|
|
self.change, # 17
|
|
|
|
marker, # 18
|
|
|
|
self.private, # 19
|
|
|
|
person_ref_list, # 20
|
|
|
|
) = data
|
2006-02-04 03:33:53 +05:30
|
|
|
|
2008-03-26 05:08:24 +05:30
|
|
|
self.marker = MarkerType()
|
2006-04-20 23:50:55 +05:30
|
|
|
self.marker.unserialize(marker)
|
2008-03-26 05:08:24 +05:30
|
|
|
self.primary_name = Name()
|
2006-02-04 03:33:53 +05:30
|
|
|
self.primary_name.unserialize(primary_name)
|
2008-03-27 00:15:58 +05:30
|
|
|
self.alternate_names = [Name().unserialize(name)
|
|
|
|
for name in alternate_names]
|
|
|
|
self.event_ref_list = [EventRef().unserialize(er)
|
|
|
|
for er in event_ref_list]
|
|
|
|
self.person_ref_list = [PersonRef().unserialize(pr)
|
|
|
|
for pr in person_ref_list]
|
2006-04-07 10:24:51 +05:30
|
|
|
MediaBase.unserialize(self, media_list)
|
|
|
|
LdsOrdBase.unserialize(self, lds_ord_list)
|
|
|
|
AddressBase.unserialize(self, address_list)
|
|
|
|
AttributeBase.unserialize(self, attribute_list)
|
|
|
|
UrlBase.unserialize(self, urls)
|
2006-04-13 08:45:22 +05:30
|
|
|
SourceBase.unserialize(self, source_list)
|
2007-02-20 06:09:10 +05:30
|
|
|
NoteBase.unserialize(self, note_list)
|
2009-12-29 08:54:38 +05:30
|
|
|
return self
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def _has_handle_reference(self, classname, handle):
|
2007-01-09 10:02:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return True if the object has reference to a given handle of given
|
|
|
|
primary object type.
|
2007-01-09 10:02:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param classname: The name of the primary object class.
|
|
|
|
:type classname: str
|
|
|
|
:param handle: The handle to be checked.
|
|
|
|
:type handle: str
|
|
|
|
:returns: Returns whether the object has reference to this handle of
|
2008-02-24 19:25:55 +05:30
|
|
|
this object type.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: bool
|
2007-01-09 10:02:07 +05:30
|
|
|
"""
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
if classname == 'Event':
|
2009-06-05 00:30:51 +05:30
|
|
|
return any(ref.ref == handle for ref in self.event_ref_list)
|
2006-04-12 12:27:14 +05:30
|
|
|
elif classname == 'Person':
|
2009-06-05 00:30:51 +05:30
|
|
|
return any(ref.ref == handle for ref in self.person_ref_list)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
elif classname == 'Family':
|
2009-06-05 00:30:51 +05:30
|
|
|
return any(ref == handle
|
|
|
|
for ref in self.family_list + self.parent_family_list)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
elif classname == 'Place':
|
2009-06-05 00:30:51 +05:30
|
|
|
return any(ordinance.place == handle
|
|
|
|
for ordinance in self.lds_ord_list)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
return False
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def _remove_handle_references(self, classname, handle_list):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
if classname == 'Event':
|
2007-10-30 04:05:52 +05:30
|
|
|
# Keep a copy of the birth and death references
|
|
|
|
birth_ref = self.get_birth_ref()
|
|
|
|
death_ref = self.get_death_ref()
|
|
|
|
|
2006-05-24 01:25:35 +05:30
|
|
|
new_list = [ref for ref in self.event_ref_list
|
|
|
|
if ref.ref not in handle_list]
|
|
|
|
# If deleting removing the reference to the event
|
|
|
|
# to which birth or death ref_index points, unset the index
|
|
|
|
if (self.birth_ref_index != -1) \
|
2008-10-25 17:06:56 +05:30
|
|
|
and (self.event_ref_list[self.birth_ref_index].ref
|
2006-05-24 01:25:35 +05:30
|
|
|
in handle_list):
|
2008-10-25 17:06:56 +05:30
|
|
|
self.set_birth_ref(None)
|
2006-05-24 01:25:35 +05:30
|
|
|
if (self.death_ref_index != -1) \
|
2008-10-25 17:06:56 +05:30
|
|
|
and (self.event_ref_list[self.death_ref_index].ref
|
2006-05-24 01:25:35 +05:30
|
|
|
in handle_list):
|
2008-10-25 17:06:56 +05:30
|
|
|
self.set_death_ref(None)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
self.event_ref_list = new_list
|
2007-10-30 04:05:52 +05:30
|
|
|
|
|
|
|
# Reset the indexes after deleting the event from even_ref_list
|
|
|
|
if (self.birth_ref_index != -1):
|
|
|
|
self.set_birth_ref(birth_ref)
|
|
|
|
if (self.death_ref_index != -1):
|
2007-10-30 20:37:46 +05:30
|
|
|
self.set_death_ref(death_ref)
|
2006-04-12 12:27:14 +05:30
|
|
|
elif classname == 'Person':
|
2006-05-24 01:25:35 +05:30
|
|
|
new_list = [ref for ref in self.person_ref_list
|
2006-11-11 02:57:08 +05:30
|
|
|
if ref.ref not in handle_list]
|
2006-04-12 12:27:14 +05:30
|
|
|
self.person_ref_list = new_list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
elif classname == 'Family':
|
2006-05-24 01:25:35 +05:30
|
|
|
new_list = [ handle for handle in self.family_list
|
|
|
|
if handle not in handle_list ]
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
self.family_list = new_list
|
2006-04-13 08:45:22 +05:30
|
|
|
new_list = [ handle for handle in self.parent_family_list \
|
|
|
|
if handle not in handle_list ]
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
self.parent_family_list = new_list
|
|
|
|
elif classname == 'Place':
|
2006-11-20 20:56:38 +05:30
|
|
|
for ordinance in self.lds_ord_list:
|
|
|
|
if ordinance.place in handle_list:
|
|
|
|
ordinance.place = None
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def _replace_handle_reference(self, classname, old_handle, new_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
if classname == 'Event':
|
|
|
|
handle_list = [ref.ref for ref in self.event_ref_list]
|
|
|
|
while old_handle in handle_list:
|
|
|
|
ix = handle_list.index(old_handle)
|
|
|
|
self.event_ref_list[ix].ref = new_handle
|
|
|
|
handle_list[ix] = ''
|
2006-04-12 12:27:14 +05:30
|
|
|
elif classname == 'Person':
|
|
|
|
handle_list = [ref.ref for ref in self.person_ref_list]
|
|
|
|
while old_handle in handle_list:
|
|
|
|
ix = handle_list.index(old_handle)
|
|
|
|
self.person_ref_list[ix].ref = new_handle
|
|
|
|
handle_list[ix] = ''
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
elif classname == 'Family':
|
|
|
|
while old_handle in self.family_list:
|
|
|
|
ix = self.family_list.index(old_handle)
|
|
|
|
self.family_list[ix] = new_handle
|
|
|
|
|
2006-04-13 08:45:22 +05:30
|
|
|
while old_handle in self.parent_family_list:
|
|
|
|
ix = self.parent_family_list.index(old_handle)
|
|
|
|
self.parent_family_list[ix] = new_handle
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
elif classname == 'Place':
|
2006-05-02 02:41:26 +05:30
|
|
|
handle_list = [ordinance.place for ordinance in self.lds_ord_list]
|
|
|
|
while old_handle in handle_list:
|
|
|
|
ix = handle_list.index(old_handle)
|
|
|
|
self.lds_ord_list[ix].place = new_handle
|
|
|
|
handle_list[ix] = ''
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_text_data_list(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of all textual attributes of the object.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of all textual attributes of the object.
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-05-06 02:46:24 +05:30
|
|
|
return [self.gramps_id]
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_text_data_child_list(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of child objects that may carry textual data.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of child objects that may carry textual data.
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2007-07-18 07:24:43 +05:30
|
|
|
check_list = self.lds_ord_list
|
2010-01-22 00:12:53 +05:30
|
|
|
add_list = filter(None, check_list)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
return [self.primary_name] + self.media_list + \
|
|
|
|
self.alternate_names + self.address_list + \
|
|
|
|
self.attribute_list + self.urls + \
|
2006-04-12 12:27:14 +05:30
|
|
|
self.source_list + self.event_ref_list + add_list + \
|
|
|
|
self.person_ref_list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_sourcref_child_list(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of child secondary objects that may refer sources.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of child secondary child objects that may
|
2008-02-24 19:25:55 +05:30
|
|
|
refer sources.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return [self.primary_name] + self.media_list + \
|
|
|
|
self.alternate_names + self.address_list + \
|
2006-11-11 02:57:08 +05:30
|
|
|
self.attribute_list + self.lds_ord_list + \
|
2007-12-19 15:17:17 +05:30
|
|
|
self.person_ref_list + self.event_ref_list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2007-12-15 03:48:19 +05:30
|
|
|
def get_note_child_list(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of child secondary objects that may refer notes.
|
2007-12-15 03:48:19 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of child secondary child objects that may
|
2008-02-24 19:25:55 +05:30
|
|
|
refer notes.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: list
|
2007-12-15 03:48:19 +05:30
|
|
|
"""
|
|
|
|
return [self.primary_name] + self.media_list + \
|
|
|
|
self.alternate_names + self.address_list + \
|
|
|
|
self.attribute_list + self.lds_ord_list + \
|
2007-12-19 15:17:17 +05:30
|
|
|
self.person_ref_list + self.source_list + \
|
|
|
|
self.event_ref_list
|
2007-12-15 03:48:19 +05:30
|
|
|
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
def get_referenced_handles(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of (classname, handle) tuples for all directly
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
referenced primary objects.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: List of (classname, handle) tuples for referenced objects.
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-13 08:45:22 +05:30
|
|
|
return [('Family', handle) for handle in
|
2007-02-20 06:09:10 +05:30
|
|
|
(self.family_list + self.parent_family_list)] \
|
|
|
|
+ self.get_referenced_note_handles()
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_handle_referents(self):
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the list of child objects which may, directly or through
|
|
|
|
their children, reference primary objects.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-08-13 14:22:05 +05:30
|
|
|
:returns: Returns the list of objects referencing primary objects.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2007-12-11 03:14:09 +05:30
|
|
|
#don't count double, notes can be found in sourcref
|
2007-12-19 15:17:17 +05:30
|
|
|
return self.get_sourcref_child_list() + self.source_list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_primary_name(self, name):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Set the primary name of the Person to the specified :class:`~gen.lib.name.Name` instance.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param name: :class:`~gen.lib.name.Name` to be assigned to the person
|
|
|
|
:type name: :class:`~gen.lib.name.Name`
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.primary_name = name
|
|
|
|
|
|
|
|
def get_primary_name(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the :class:`~gen.lib.name.Name` instance marked as the Person's primary name.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the primary name
|
|
|
|
:rtype: :class:`~gen.lib.name.Name`
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.primary_name
|
|
|
|
|
|
|
|
def get_alternate_names(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of alternate :class:`~gen.lib.name.Name` instances.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: List of :class:`~gen.lib.name.Name` instances
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.alternate_names
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_alternate_names(self, alt_name_list):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Change the list of alternate names to the passed list.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param alt_name_list: List of :class:`~gen.lib.name.Name` instances
|
|
|
|
:type alt_name_list: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.alternate_names = alt_name_list
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def add_alternate_name(self, name):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Add a :class:`~gen.lib.name.Name` instance to the list of alternative names.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param name: :class:`~gen.lib.name.Name` to add to the list
|
|
|
|
:type name: :class:`~gen.lib.name.Name`
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.alternate_names.append(name)
|
|
|
|
|
2006-05-06 02:46:24 +05:30
|
|
|
def get_nick_name(self):
|
2009-06-05 00:30:51 +05:30
|
|
|
for attr in self.attribute_list:
|
|
|
|
if int(attr.type) == AttributeType.NICKNAME:
|
|
|
|
return attr.get_value()
|
2006-05-06 02:46:24 +05:30
|
|
|
else:
|
2009-06-05 00:30:51 +05:30
|
|
|
return u''
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_gender(self, gender) :
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Set the gender of the Person.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param gender: Assigns the Person's gender to one of the
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
following constants::
|
|
|
|
Person.MALE
|
|
|
|
Person.FEMALE
|
|
|
|
Person.UNKNOWN
|
2009-06-25 03:26:07 +05:30
|
|
|
:type gender: int
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.gender = gender
|
|
|
|
|
|
|
|
def get_gender(self) :
|
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Return the gender of the Person.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns one of the following constants::
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
Person.MALE
|
|
|
|
Person.FEMALE
|
|
|
|
Person.UNKNOWN
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: int
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.gender
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_birth_ref(self, event_ref):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Assign the birth event to the Person object.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This is accomplished by assigning the :class:`~gen.lib.eventref.EventRef` of the birth event
|
2008-02-24 19:25:55 +05:30
|
|
|
in the current database.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param event_ref: the :class:`~gen.lib.eventref.EventRef` object associated with
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
the Person's birth.
|
2009-06-25 03:26:07 +05:30
|
|
|
:type event_ref: EventRef
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-07 10:24:51 +05:30
|
|
|
if event_ref and not isinstance(event_ref, EventRef):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
raise ValueError("Expecting EventRef instance")
|
2007-10-30 04:05:52 +05:30
|
|
|
if event_ref is None:
|
2006-11-22 20:57:31 +05:30
|
|
|
self.birth_ref_index = -1
|
|
|
|
return
|
2009-06-05 00:30:51 +05:30
|
|
|
|
2006-05-24 01:25:35 +05:30
|
|
|
# check whether we already have this ref in the list
|
2009-06-05 00:30:51 +05:30
|
|
|
for self.birth_ref_index, ref in enumerate(self.event_ref_list):
|
|
|
|
if event_ref.is_equal(ref):
|
|
|
|
return # Note: self.birth_ref_index already set
|
|
|
|
else:
|
2006-05-24 01:25:35 +05:30
|
|
|
self.event_ref_list.append(event_ref)
|
|
|
|
self.birth_ref_index = len(self.event_ref_list)-1
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_death_ref(self, event_ref):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Assign the death event to the Person object.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This is accomplished by assigning the :class:`~gen.lib.eventref.EventRef` of the death event
|
2008-02-24 19:25:55 +05:30
|
|
|
in the current database.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param event_ref: the :class:`~gen.lib.eventref.EventRef` object associated with
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
the Person's death.
|
2009-06-25 03:26:07 +05:30
|
|
|
:type event_ref: EventRef
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-07 10:24:51 +05:30
|
|
|
if event_ref and not isinstance(event_ref, EventRef):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
raise ValueError("Expecting EventRef instance")
|
2007-10-30 04:05:52 +05:30
|
|
|
if event_ref is None:
|
2006-11-22 20:57:31 +05:30
|
|
|
self.death_ref_index = -1
|
|
|
|
return
|
2009-06-05 00:30:51 +05:30
|
|
|
|
2006-05-24 01:25:35 +05:30
|
|
|
# check whether we already have this ref in the list
|
2009-06-05 00:30:51 +05:30
|
|
|
for self.death_ref_index, ref in enumerate(self.event_ref_list):
|
|
|
|
if event_ref.is_equal(ref):
|
|
|
|
return # Note: self.death_ref_index already set
|
|
|
|
else:
|
2006-05-24 01:25:35 +05:30
|
|
|
self.event_ref_list.append(event_ref)
|
|
|
|
self.death_ref_index = len(self.event_ref_list)-1
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_birth_ref(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the :class:`~gen.lib.eventref.EventRef` for Person's birth event.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This should correspond to an :class:`~gen.lib.event.Event` in the database's :class:`~gen.lib.event.Event` list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the birth :class:`~gen.lib.eventref.EventRef` or None if no birth
|
|
|
|
:class:`~gen.lib.event.Event` has been assigned.
|
|
|
|
:rtype: EventRef
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-05 00:30:51 +05:30
|
|
|
|
|
|
|
if 0 <= self.birth_ref_index < len(self.event_ref_list):
|
|
|
|
return self.event_ref_list[self.birth_ref_index]
|
2006-05-24 01:25:35 +05:30
|
|
|
else:
|
2009-06-05 00:30:51 +05:30
|
|
|
return None
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_death_ref(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the :class:`~gen.lib.eventref.EventRef` for the Person's death event.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This should correspond to an :class:`~gen.lib.event.Event` in the database's :class:`~gen.lib.event.Event` list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the death :class:`~gen.lib.eventref.EventRef` or None if no death
|
|
|
|
:class:`~gen.lib.event.Event` has been assigned.
|
|
|
|
:rtype: event_ref
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-05 00:30:51 +05:30
|
|
|
|
|
|
|
if 0 <= self.death_ref_index < len(self.event_ref_list):
|
|
|
|
return self.event_ref_list[self.death_ref_index]
|
2006-05-24 01:25:35 +05:30
|
|
|
else:
|
2009-06-05 00:30:51 +05:30
|
|
|
return None
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def add_event_ref(self, event_ref):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Add the :class:`~gen.lib.eventref.EventRef` to the Person instance's :class:`~gen.lib.eventref.EventRef` list.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This is accomplished by assigning the :class:`~gen.lib.eventref.EventRef` of a valid
|
|
|
|
:class:`~gen.lib.event.Event` in the current database.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param event_ref: the :class:`~gen.lib.eventref.EventRef` to be added to the
|
|
|
|
Person's :class:`~gen.lib.eventref.EventRef` list.
|
|
|
|
:type event_ref: EventRef
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-07 10:24:51 +05:30
|
|
|
if event_ref and not isinstance(event_ref, EventRef):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
raise ValueError("Expecting EventRef instance")
|
2009-06-05 00:30:51 +05:30
|
|
|
|
2006-05-24 01:25:35 +05:30
|
|
|
# check whether we already have this ref in the list
|
2009-06-05 00:30:51 +05:30
|
|
|
if not any(event_ref.is_equal(ref) for ref in self.event_ref_list):
|
2006-05-24 01:25:35 +05:30
|
|
|
self.event_ref_list.append(event_ref)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def get_event_ref_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.eventref.EventRef` objects associated with :class:`~gen.lib.event.Event`
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
instances.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of :class:`~gen.lib.eventref.EventRef` objects associated with
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
the Person instance.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.event_ref_list
|
|
|
|
|
2006-11-21 21:50:35 +05:30
|
|
|
def get_primary_event_ref_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.eventref.EventRef` objects associated with :class:`~gen.lib.event.Event`
|
2006-11-21 21:50:35 +05:30
|
|
|
instances that have been marked as primary events.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns generator of :class:`~gen.lib.eventref.EventRef` objects associated with
|
2006-11-21 21:50:35 +05:30
|
|
|
the Person instance.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: generator
|
2006-11-21 21:50:35 +05:30
|
|
|
"""
|
2009-06-05 00:30:51 +05:30
|
|
|
return (ref for ref in self.event_ref_list
|
|
|
|
if ref.get_role() == EventRoleType.PRIMARY
|
|
|
|
)
|
2006-11-21 21:50:35 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_event_ref_list(self, event_ref_list):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Set the Person instance's :class:`~gen.lib.eventref.EventRef` list to the passed list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param event_ref_list: List of valid :class:`~gen.lib.eventref.EventRef` objects
|
|
|
|
:type event_ref_list: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.event_ref_list = event_ref_list
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def add_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Add the :class:`~gen.lib.family.Family` handle to the Person instance's :class:`~gen.lib.family.Family` list.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This is accomplished by assigning the handle of a valid :class:`~gen.lib.family.Family`
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
in the current database.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
Adding a :class:`~gen.lib.family.Family` handle to a Person does not automatically update
|
|
|
|
the corresponding :class:`~gen.lib.family.Family`. The developer is responsible to make
|
|
|
|
sure that when a :class:`~gen.lib.family.Family` is added to Person, that the Person is
|
|
|
|
assigned to either the father or mother role in the :class:`~gen.lib.family.Family`.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: handle of the :class:`~gen.lib.family.Family` to be added to the
|
|
|
|
Person's :class:`~gen.lib.family.Family` list.
|
|
|
|
:type family_handle: str
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-05-01 02:15:49 +05:30
|
|
|
if family_handle not in self.family_list:
|
|
|
|
self.family_list.append(family_handle)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_preferred_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Set the family_handle specified to be the preferred :class:`~gen.lib.family.Family`.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
The preferred :class:`~gen.lib.family.Family` is determined by the first :class:`~gen.lib.family.Family` in the
|
|
|
|
:class:`~gen.lib.family.Family` list, and is typically used to indicate the preferred
|
|
|
|
:class:`~gen.lib.family.Family` for navigation or reporting.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
The family_handle must already be in the list, or the function
|
|
|
|
call has no effect.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: Handle of the :class:`~gen.lib.family.Family` to make the preferred
|
|
|
|
:class:`~gen.lib.family.Family`.
|
|
|
|
:type family_handle: str
|
|
|
|
:returns: True if the call succeeded, False if the family_handle
|
|
|
|
was not already in the :class:`~gen.lib.family.Family` list
|
|
|
|
:rtype: bool
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
if family_handle in self.family_list:
|
|
|
|
self.family_list.remove(family_handle)
|
|
|
|
self.family_list = [family_handle] + self.family_list
|
|
|
|
return True
|
|
|
|
else:
|
|
|
|
return False
|
|
|
|
|
|
|
|
def get_family_handle_list(self) :
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.family.Family` handles in which the person is a parent
|
2008-02-24 19:25:55 +05:30
|
|
|
or spouse.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of handles corresponding to the
|
|
|
|
:class:`~gen.lib.family.Family` records with which the person
|
|
|
|
is associated.
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.family_list
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_family_handle_list(self, family_list) :
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2008-02-24 19:25:55 +05:30
|
|
|
Assign the passed list to the Person's list of families in which it is
|
|
|
|
a parent or spouse.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_list: List of :class:`~gen.lib.family.Family` handles to be associated
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
with the Person
|
2009-06-25 03:26:07 +05:30
|
|
|
:type family_list: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.family_list = family_list
|
|
|
|
|
|
|
|
def clear_family_handle_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Remove all :class:`~gen.lib.family.Family` handles from the :class:`~gen.lib.family.Family` list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.family_list = []
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def remove_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Remove the specified :class:`~gen.lib.family.Family` handle from the list of
|
2008-02-24 19:25:55 +05:30
|
|
|
marriages/partnerships.
|
|
|
|
|
|
|
|
If the handle does not exist in the list, the operation has no effect.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: :class:`~gen.lib.family.Family` handle to remove from the list
|
|
|
|
:type family_handle: str
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: True if the handle was removed, False if it was not
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
in the list.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: bool
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
if family_handle in self.family_list:
|
|
|
|
self.family_list.remove(family_handle)
|
|
|
|
return True
|
|
|
|
else:
|
|
|
|
return False
|
|
|
|
|
|
|
|
def get_parent_family_handle_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.family.Family` handles in which the person is a child.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of handles corresponding to the
|
|
|
|
:class:`~gen.lib.family.Family` records with which the person is a child.
|
|
|
|
:rtype: list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
return self.parent_family_list
|
|
|
|
|
2007-01-03 08:07:34 +05:30
|
|
|
def set_parent_family_handle_list(self, family_list):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.family.Family` handles in which the person is a child.
|
2007-01-03 08:07:34 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of handles corresponding to the
|
|
|
|
:class:`~gen.lib.family.Family` records with which the person is a child.
|
|
|
|
:rtype: list
|
2007-01-03 08:07:34 +05:30
|
|
|
"""
|
|
|
|
self.parent_family_list = family_list
|
|
|
|
|
2006-04-13 08:45:22 +05:30
|
|
|
def add_parent_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Add the :class:`~gen.lib.family.Family` handle to the Person instance's list of families in
|
2008-02-24 19:25:55 +05:30
|
|
|
which it is a child.
|
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
This is accomplished by assigning the handle of a valid :class:`~gen.lib.family.Family` in
|
2008-02-24 19:25:55 +05:30
|
|
|
the current database.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
Adding a :class:`~gen.lib.family.Family` handle to a Person does not automatically update
|
|
|
|
the corresponding :class:`~gen.lib.family.Family`. The developer is responsible to make
|
|
|
|
sure that when a :class:`~gen.lib.family.Family` is added to Person, that the Person is
|
|
|
|
added to the :class:`~gen.lib.family.Family` instance's child list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: handle of the :class:`~gen.lib.family.Family` to be added to the
|
|
|
|
Person's :class:`~gen.lib.family.Family` list.
|
|
|
|
:type family_handle: str
|
2006-04-13 08:45:22 +05:30
|
|
|
"""
|
2008-05-26 01:25:47 +05:30
|
|
|
if not isinstance(family_handle, basestring):
|
2006-04-13 09:07:41 +05:30
|
|
|
raise ValueError("expecting handle")
|
2006-05-01 02:15:49 +05:30
|
|
|
if family_handle not in self.parent_family_list:
|
|
|
|
self.parent_family_list.append(family_handle)
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
|
|
|
def clear_parent_family_handle_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Remove all :class:`~gen.lib.family.Family` handles from the parent :class:`~gen.lib.family.Family` list.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
|
|
|
self.parent_family_list = []
|
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def remove_parent_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Remove the specified :class:`~gen.lib.family.Family` handle from the list of parent
|
2008-02-24 19:25:55 +05:30
|
|
|
families (families in which the parent is a child).
|
|
|
|
|
|
|
|
If the handle does not exist in the list, the operation has no effect.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: :class:`~gen.lib.family.Family` handle to remove from the list
|
|
|
|
:type family_handle: str
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns a tuple of three strings, consisting of the
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
removed handle, relationship to mother, and relationship
|
|
|
|
to father. None is returned if the handle is not in the
|
|
|
|
list.
|
2009-06-25 03:26:07 +05:30
|
|
|
:rtype: tuple
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-13 08:45:22 +05:30
|
|
|
if family_handle in self.parent_family_list:
|
|
|
|
self.parent_family_list.remove(family_handle)
|
|
|
|
return True
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
else:
|
2006-04-13 08:45:22 +05:30
|
|
|
return False
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2006-04-07 10:24:51 +05:30
|
|
|
def set_main_parent_family_handle(self, family_handle):
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Set the main :class:`~gen.lib.family.Family` in which the Person is a child.
|
2008-02-24 19:25:55 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
The main :class:`~gen.lib.family.Family` is the :class:`~gen.lib.family.Family` typically used for reports and
|
|
|
|
navigation. This is accomplished by moving the :class:`~gen.lib.family.Family` to the
|
2008-02-24 19:25:55 +05:30
|
|
|
beginning of the list. The family_handle must be in the list for this
|
|
|
|
to have any effect.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param family_handle: handle of the :class:`~gen.lib.family.Family` to be marked
|
|
|
|
as the main :class:`~gen.lib.family.Family`
|
|
|
|
:type family_handle: str
|
|
|
|
:returns: Returns True if the assignment has successful
|
|
|
|
:rtype: bool
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2006-04-13 08:45:22 +05:30
|
|
|
if family_handle in self.parent_family_list:
|
|
|
|
self.parent_family_list.remove(family_handle)
|
|
|
|
self.parent_family_list = [family_handle] + self.parent_family_list
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
return True
|
|
|
|
else:
|
|
|
|
return False
|
|
|
|
|
|
|
|
def get_main_parents_family_handle(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the handle of the :class:`~gen.lib.family.Family` considered to be the main :class:`~gen.lib.family.Family`
|
2008-02-24 19:25:55 +05:30
|
|
|
in which the Person is a child.
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the family_handle if a family_handle exists,
|
|
|
|
If no :class:`~gen.lib.family.Family` is assigned, None is returned
|
|
|
|
:rtype: str
|
* src/RelLib.py: Remove file (replaced by the package dir).
* src/RelLib: Add directory.
* src/RelLib/__init__.py, src/RelLib/_helper.py,
src/RelLib/_secondary.py, src/RelLib/Researcher.py,
src/RelLib/GenderStats.py, src/RelLib/Person.py,
src/RelLib/Family.py, src/RelLib/Event.py, src/RelLib/Place.py,
src/RelLib/Source.py, src/RelLib/MediaObject.py,
src/RelLib/Repository.py, src/RelLib/Makefile.am,
src/RelLib/.cvsignore: Add to CVS.
* src/configure.in: Create Makefile in src/RelLib.
svn: r5587
2005-12-20 08:08:07 +05:30
|
|
|
"""
|
2009-06-05 00:30:51 +05:30
|
|
|
if self.parent_family_list:
|
2006-04-13 08:45:22 +05:30
|
|
|
return self.parent_family_list[0]
|
2009-06-05 00:30:51 +05:30
|
|
|
else:
|
|
|
|
return None
|
2006-04-12 12:27:14 +05:30
|
|
|
|
2007-01-08 07:19:33 +05:30
|
|
|
def add_person_ref(self, person_ref):
|
2006-04-12 12:27:14 +05:30
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Add the :class:`~gen.lib.personref.PersonRef` to the Person instance's :class:`~gen.lib.personref.PersonRef` list.
|
2006-04-12 12:27:14 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param person_ref: the :class:`~gen.lib.personref.PersonRef` to be added to the
|
|
|
|
Person's :class:`~gen.lib.personref.PersonRef` list.
|
|
|
|
:type person_ref: PersonRef
|
2006-04-12 12:27:14 +05:30
|
|
|
"""
|
|
|
|
if person_ref and not isinstance(person_ref, PersonRef):
|
|
|
|
raise ValueError("Expecting PersonRef instance")
|
|
|
|
self.person_ref_list.append(person_ref)
|
|
|
|
|
|
|
|
def get_person_ref_list(self):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Return the list of :class:`~gen.lib.personref.PersonRef` objects.
|
2006-04-12 12:27:14 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:returns: Returns the list of :class:`~gen.lib.personref.PersonRef` objects.
|
|
|
|
:rtype: list
|
2006-04-12 12:27:14 +05:30
|
|
|
"""
|
|
|
|
return self.person_ref_list
|
|
|
|
|
|
|
|
def set_person_ref_list(self, person_ref_list):
|
|
|
|
"""
|
2009-06-25 03:26:07 +05:30
|
|
|
Set the Person instance's :class:`~gen.lib.personref.PersonRef` list to the passed list.
|
2006-04-12 12:27:14 +05:30
|
|
|
|
2009-06-25 03:26:07 +05:30
|
|
|
:param person_ref_list: List of valid :class:`~gen.lib.personref.PersonRef` objects
|
|
|
|
:type person_ref_list: list
|
2006-04-12 12:27:14 +05:30
|
|
|
"""
|
|
|
|
self.person_ref_list = person_ref_list
|