2006-06-13 Don Allingham <don@gramps-project.org>

* src/Editors/_EditLdsOrd.py: LDS confirmation support
	* src/GrampsDb/_ReadGedcom.py: LDS confirmation support
	* src/GrampsDb/_WriteGedcom.py: LDS confirmation support
	* src/GrampsDb/_GedTokens.py: LDS confirmation support
	* src/GrampsDb/_LdsOrdd.py: LDS confirmation support



svn: r6887
This commit is contained in:
Don Allingham 2006-06-13 23:51:24 +00:00
parent e858a54456
commit cb2cebd7e9
6 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-06-13 Don Allingham <don@gramps-project.org>
* src/Editors/_EditLdsOrd.py: LDS confirmation support
* src/GrampsDb/_ReadGedcom.py: LDS confirmation support
* src/GrampsDb/_WriteGedcom.py: LDS confirmation support
* src/GrampsDb/_GedTokens.py: LDS confirmation support
* src/GrampsDb/_LdsOrdd.py: LDS confirmation support
2006-06-13 Alex Roitman <shura@gramps-project.org> 2006-06-13 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Avoid using * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Avoid using
secondary index when upgrading events; manually resolve duplicate IDs. secondary index when upgrading events; manually resolve duplicate IDs.

View File

@ -71,6 +71,18 @@ _DATA_MAP = {
RelLib.LdsOrd.STATUS_SUBMITTED, RelLib.LdsOrd.STATUS_SUBMITTED,
RelLib.LdsOrd.STATUS_UNCLEARED, RelLib.LdsOrd.STATUS_UNCLEARED,
], ],
RelLib.LdsOrd.CONFIRMATION : [
RelLib.LdsOrd.STATUS_NONE,
RelLib.LdsOrd.STATUS_CHILD,
RelLib.LdsOrd.STATUS_CLEARED,
RelLib.LdsOrd.STATUS_COMPLETED,
RelLib.LdsOrd.STATUS_INFANT,
RelLib.LdsOrd.STATUS_PRE_1970,
RelLib.LdsOrd.STATUS_QUALIFIED,
RelLib.LdsOrd.STATUS_STILLBORN,
RelLib.LdsOrd.STATUS_SUBMITTED,
RelLib.LdsOrd.STATUS_UNCLEARED,
],
RelLib.LdsOrd.ENDOWMENT: [ RelLib.LdsOrd.ENDOWMENT: [
RelLib.LdsOrd.STATUS_NONE, RelLib.LdsOrd.STATUS_NONE,
RelLib.LdsOrd.STATUS_CHILD, RelLib.LdsOrd.STATUS_CHILD,
@ -148,6 +160,7 @@ class EditLdsOrd(EditSecondary):
def _get_types(self): def _get_types(self):
return (RelLib.LdsOrd.BAPTISM, return (RelLib.LdsOrd.BAPTISM,
RelLib.LdsOrd.ENDOWMENT, RelLib.LdsOrd.ENDOWMENT,
RelLib.LdsOrd.CONFIRMATION,
RelLib.LdsOrd.SEAL_TO_PARENTS) RelLib.LdsOrd.SEAL_TO_PARENTS)
def _setup_fields(self): def _setup_fields(self):

View File

@ -127,6 +127,7 @@ TOKEN_MEDI = 107
TOKEN_RELA = 108 TOKEN_RELA = 108
TOKEN__LKD = 109 TOKEN__LKD = 109
TOKEN_BLOB = 110 TOKEN_BLOB = 110
TOKEN_CONL = 111
tokens = { tokens = {
"HEAD" : TOKEN_HEAD, "MEDI" : TOKEN_MEDI, "HEAD" : TOKEN_HEAD, "MEDI" : TOKEN_MEDI,
@ -218,4 +219,5 @@ tokens = {
"_SCBK" : TOKEN_IGNORE,"_TYPE" : TOKEN_IGNORE, "_SCBK" : TOKEN_IGNORE,"_TYPE" : TOKEN_IGNORE,
"_PRIM" : TOKEN_IGNORE,"_SSHOW" : TOKEN_IGNORE, "_PRIM" : TOKEN_IGNORE,"_SSHOW" : TOKEN_IGNORE,
"_PAREN" : TOKEN_IGNORE,"BLOB" : TOKEN_BLOB, "_PAREN" : TOKEN_IGNORE,"BLOB" : TOKEN_BLOB,
"CONL" : TOKEN_CONL,
} }

View File

@ -603,6 +603,7 @@ class GedcomParser(UpdateCallback):
TOKEN__COMM : self.func_person_note, TOKEN__COMM : self.func_person_note,
TOKEN_SEX : self.func_person_sex, TOKEN_SEX : self.func_person_sex,
TOKEN_BAPL : self.func_person_bapl, TOKEN_BAPL : self.func_person_bapl,
TOKEN_CONL : self.func_person_conl,
TOKEN_ENDL : self.func_person_endl, TOKEN_ENDL : self.func_person_endl,
TOKEN_SLGC : self.func_person_slgc, TOKEN_SLGC : self.func_person_slgc,
TOKEN_FAMS : self.func_person_fams, TOKEN_FAMS : self.func_person_fams,
@ -2632,6 +2633,12 @@ class GedcomParser(UpdateCallback):
state.person.lds_ord_list.append(lds_ord) state.person.lds_ord_list.append(lds_ord)
self.parse_ord(lds_ord,2) self.parse_ord(lds_ord,2)
def func_person_conl(self,matches,state):
lds_ord = RelLib.LdsOrd()
lds_ord.set_type(RelLib.LdsOrd.CONFIRMATION)
state.person.lds_ord_list.append(lds_ord)
self.parse_ord(lds_ord,2)
def func_person_endl(self,matches,state): def func_person_endl(self,matches,state):
lds_ord = RelLib.LdsOrd() lds_ord = RelLib.LdsOrd()
lds_ord.set_type(RelLib.LdsOrd.ENDOWMENT) lds_ord.set_type(RelLib.LdsOrd.ENDOWMENT)

View File

@ -120,6 +120,7 @@ lds_ord_name = {
RelLib.LdsOrd.ENDOWMENT : 'ENDL', RelLib.LdsOrd.ENDOWMENT : 'ENDL',
RelLib.LdsOrd.SEAL_TO_PARENTS : 'SLGC', RelLib.LdsOrd.SEAL_TO_PARENTS : 'SLGC',
RelLib.LdsOrd.SEAL_TO_SPOUSE : 'SGLS', RelLib.LdsOrd.SEAL_TO_SPOUSE : 'SGLS',
RelLib.LdsOrd.CONFIRMATION : 'CONL',
} }
lds_status = { lds_status = {

View File

@ -63,6 +63,7 @@ class LdsOrd(SecondaryObject,SourceBase,NoteBase,
ENDOWMENT = 1 ENDOWMENT = 1
SEAL_TO_PARENTS = 2 SEAL_TO_PARENTS = 2
SEAL_TO_SPOUSE = 3 SEAL_TO_SPOUSE = 3
CONFIRMATION = 4
DEFAULT_TYPE = BAPTISM DEFAULT_TYPE = BAPTISM
@ -88,6 +89,7 @@ class LdsOrd(SecondaryObject,SourceBase,NoteBase,
_TYPE_MAP = [ _TYPE_MAP = [
(BAPTISM, _('Baptism'), 'baptism'), (BAPTISM, _('Baptism'), 'baptism'),
(ENDOWMENT, _('Endowment'), 'endowment'), (ENDOWMENT, _('Endowment'), 'endowment'),
(CONFIRMATION, _('Confirmation'), 'confirmation'),
(SEAL_TO_PARENTS, _('Sealed to Parents'), 'sealed_to_parents'), (SEAL_TO_PARENTS, _('Sealed to Parents'), 'sealed_to_parents'),
(SEAL_TO_SPOUSE, _('Sealed to Spouse'), 'sealed_to_spouse' ), (SEAL_TO_SPOUSE, _('Sealed to Spouse'), 'sealed_to_spouse' ),
] ]