Package gen :: Package proxy :: Module dbbase
[frames] | no frames]

Source Code for Module gen.proxy.dbbase

   1  # 
   2  # Gramps - a GTK+/GNOME based genealogy program 
   3  # 
   4  # Copyright (C) 2007       Brian G. Matherly 
   5  # 
   6  # This program is free software; you can redistribute it and/or modify 
   7  # it under the terms of the GNU General Public License as published by 
   8  # the Free Software Foundation; either version 2 of the License, or 
   9  # (at your option) any later version. 
  10  # 
  11  # This program is distributed in the hope that it will be useful,  
  12  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
  13  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  14  # GNU General Public License for more details. 
  15  # 
  16  # You should have received a copy of the GNU General Public License 
  17  # along with this program; if not, write to the Free Software 
  18  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
  19  # 
  20   
  21  # $Id: dbbase.py 10103 2008-02-24 13:55:55Z acraphae $ 
  22   
  23  """ 
  24  Proxy class for the GRAMPS databases. Filter out all data marked private. 
  25  """ 
  26   
  27  from gettext import gettext as _ 
  28   
  29   
  30  #------------------------------------------------------------------------- 
  31  # 
  32  # GRAMPS libraries 
  33  # 
  34  #------------------------------------------------------------------------- 
  35  from gen.lib import * 
  36   
37 -class DbBase:
38 """ 39 A proxy to a Gramps database. This proxy will act like a Gramps database, 40 but all data marked private will be hidden from the user. 41 """ 42
43 - def set_prefixes(self, person, media, family, source, place, event, 44 repository, note):
45 raise NotImplementedError
46
47 - def rebuild_secondary(self, callback):
48 raise NotImplementedError
49
50 - def version_supported(self):
51 """ Return True when the file has a supported version""" 52 raise NotImplementedError
53
54 - def need_upgrade(self):
55 raise NotImplementedError
56
57 - def gramps_upgrade(self):
58 raise NotImplementedError
59
60 - def del_person(self, handle):
61 raise NotImplementedError
62
63 - def del_source(self, handle):
64 raise NotImplementedError
65
66 - def del_repository(self, handle):
67 raise NotImplementedError
68
69 - def del_note(self, handle):
70 raise NotImplementedError
71
72 - def del_place(self, handle):
73 raise NotImplementedError
74
75 - def del_media(self, handle):
76 raise NotImplementedError
77
78 - def del_family(self, handle):
79 raise NotImplementedError
80
81 - def del_event(self, handle):
82 raise NotImplementedError
83
84 - def create_id(self):
85 raise NotImplementedError
86
87 - def get_person_cursor(self):
88 raise NotImplementedError
89
90 - def get_person_cursor_iter(self, msg=_("Processing Person records")):
91 raise NotImplementedError
92
93 - def get_family_cursor(self):
94 raise NotImplementedError
95
96 - def get_family_cursor_iter(self, msg=_("Processing Family records")):
97 raise NotImplementedError
98
99 - def get_event_cursor(self):
100 raise NotImplementedError
101
102 - def get_event_cursor_iter(self, msg=_("Processing Event records")):
103 raise NotImplementedError
104
105 - def get_place_cursor(self):
106 raise NotImplementedError
107
108 - def get_place_cursor_iter(self, msg=_("Processing Place records")):
109 raise NotImplementedError
110
111 - def get_source_cursor(self):
112 raise NotImplementedError
113
114 - def get_source_cursor_iter(self, msg=_("Processing Source records")):
115 raise NotImplementedError
116
117 - def get_media_cursor(self):
118 raise NotImplementedError
119
120 - def get_media_cursor_iter(self, msg=_("Processing Media records")):
121 raise NotImplementedError
122
123 - def get_repository_cursor(self):
124 raise NotImplementedError
125
126 - def get_repository_cursor_iter(self, msg=_("Processing Repository records")):
127 raise NotImplementedError
128
129 - def get_note_cursor(self):
130 raise NotImplementedError
131
132 - def get_note_cursor_iter(self, msg=_("Processing Note records")):
133 raise NotImplementedError
134
135 - def open_undodb(self):
136 raise NotImplementedError
137
138 - def close_undodb(self):
139 raise NotImplementedError
140
141 - def load(self, name, callback, mode="w"):
142 """ 143 Opens the specified database. The method needs to be overridden 144 in the derived class. 145 """ 146 raise NotImplementedError
147
148 - def load_from(self, other_database, filename, callback):
149 """ 150 Loads data from the other database into itself. 151 The filename is the name of the file for the newly created database. 152 The method needs to be overridden in the derived class. 153 """ 154 raise NotImplementedError
155
156 - def close(self):
157 """ 158 Closes the specified database. The method needs to be overridden 159 in the derived class. 160 """ 161 raise NotImplementedError
162
163 - def is_open(self):
164 """ 165 Return 1 if the database has been opened. 166 """ 167 raise NotImplementedError
168
169 - def request_rebuild(self):
170 raise NotImplementedError
171
172 - def commit_base(self, obj, data_map, key, update_list, add_list, 173 transaction, change_time):
174 raise NotImplementedError
175
176 - def commit_person(self, person, transaction, change_time=None):
177 raise NotImplementedError
178
179 - def commit_media_object(self, obj, transaction, change_time=None):
180 raise NotImplementedError
181
182 - def commit_source(self, source, transaction, change_time=None):
183 raise NotImplementedError
184
185 - def commit_place(self, place, transaction, change_time=None):
186 raise NotImplementedError
187
188 - def commit_personal_event(self, event, transaction, change_time=None):
189 raise NotImplementedError
190
191 - def commit_family_event(self, event, transaction, change_time=None):
192 raise NotImplementedError
193
194 - def commit_event(self, event, transaction, change_time=None):
195 raise NotImplementedError
196
197 - def commit_family(self, family, transaction, change_time=None):
198 raise NotImplementedError
199
200 - def commit_repository(self, repository, transaction, change_time=None):
201 raise NotImplementedError
202
203 - def commit_note(self, note, transaction, change_time=None):
204 raise NotImplementedError
205
206 - def find_next_person_gramps_id(self):
207 raise NotImplementedError
208
209 - def find_next_place_gramps_id(self):
210 raise NotImplementedError
211
212 - def find_next_event_gramps_id(self):
213 raise NotImplementedError
214
215 - def find_next_object_gramps_id(self):
216 raise NotImplementedError
217
218 - def find_next_source_gramps_id(self):
219 raise NotImplementedError
220
221 - def find_next_family_gramps_id(self):
222 raise NotImplementedError
223
225 raise NotImplementedError
226
227 - def find_next_note_gramps_id(self):
228 raise NotImplementedError
229
230 - def get_person_from_handle(self, handle):
231 """ 232 Finds a Person in the database from the passed gramps' ID. 233 If no such Person exists, None is returned. 234 """ 235 raise NotImplementedError
236
237 - def get_source_from_handle(self, handle):
238 """ 239 Finds a Source in the database from the passed gramps' ID. 240 If no such Source exists, None is returned. 241 """ 242 raise NotImplementedError
243
244 - def get_object_from_handle(self, handle):
245 """ 246 Finds an Object in the database from the passed gramps' ID. 247 If no such Object exists, None is returned. 248 """ 249 raise NotImplementedError
250
251 - def get_place_from_handle(self, handle):
252 """ 253 Finds a Place in the database from the passed gramps' ID. 254 If no such Place exists, None is returned. 255 """ 256 raise NotImplementedError
257
258 - def get_event_from_handle(self, handle):
259 """ 260 Finds a Event in the database from the passed gramps' ID. 261 If no such Event exists, None is returned. 262 """ 263 raise NotImplementedError
264
265 - def get_family_from_handle(self, handle):
266 """ 267 Finds a Family in the database from the passed gramps' ID. 268 If no such Family exists, None is returned. 269 """ 270 raise NotImplementedError
271
272 - def get_repository_from_handle(self, handle):
273 """ 274 Finds a Repository in the database from the passed gramps' ID. 275 If no such Repository exists, None is returned. 276 """ 277 raise NotImplementedError
278
279 - def get_note_from_handle(self, handle):
280 """ 281 Finds a Note in the database from the passed gramps' ID. 282 If no such Note exists, None is returned. 283 """ 284 raise NotImplementedError
285
286 - def find_person_from_handle(self, handle, transaction):
287 """ 288 Finds a Person in the database from the passed GRAMPS ID. 289 If no such Person exists, a new Person is added to the database. 290 """ 291 raise NotImplementedError
292
293 - def find_source_from_handle(self, handle, transaction):
294 """ 295 Finds a Source in the database from the passed handle. 296 If no such Source exists, a new Source is added to the database. 297 """ 298 raise NotImplementedError
299
300 - def find_event_from_handle(self, handle, transaction):
301 """ 302 Finds a Event in the database from the passed handle. 303 If no such Event exists, a new Event is added to the database. 304 """ 305 raise NotImplementedError
306
307 - def find_object_from_handle(self, handle, transaction):
308 """ 309 Finds an MediaObject in the database from the passed handle. 310 If no such MediaObject exists, a new Object is added to the database. 311 """ 312 raise NotImplementedError
313
314 - def find_place_from_handle(self, handle, transaction):
315 """ 316 Finds a Place in the database from the passed handle. 317 If no such Place exists, a new Place is added to the database. 318 """ 319 raise NotImplementedError
320
321 - def find_family_from_handle(self, handle, transaction):
322 """ 323 Finds a Family in the database from the passed handle. 324 If no such Family exists, a new Family is added to the database. 325 """ 326 raise NotImplementedError
327
328 - def find_repository_from_handle(self, handle, transaction):
329 """ 330 Finds a Repository in the database from the passed handle. 331 If no such Repository exists, a new Repository is added to the database. 332 """ 333 raise NotImplementedError
334
335 - def find_note_from_handle(self, handle, transaction):
336 """ 337 Finds a Note in the database from the passed handle. 338 If no such Note exists, a new Note is added to the database. 339 """ 340 raise NotImplementedError
341
342 - def check_person_from_handle(self, handle, transaction):
343 """ 344 Checks whether a Person with the passed handle exists in the database. 345 If no such Person exists, a new Person is added to the database. 346 """ 347 raise NotImplementedError
348
349 - def check_source_from_handle(self, handle, transaction):
350 """ 351 Checks whether a Source with the passed handle exists in the database. 352 If no such Source exists, a new Source is added to the database. 353 """ 354 raise NotImplementedError
355
356 - def check_event_from_handle(self, handle, transaction):
357 """ 358 Checks whether an Event with the passed handle exists in the database. 359 If no such Event exists, a new Event is added to the database. 360 """ 361 raise NotImplementedError
362
363 - def check_object_from_handle(self, handle, transaction):
364 """ 365 Checks whether a MediaObject with the passed handle exists in 366 the database. If no such MediaObject exists, a new Object is 367 added to the database. 368 """ 369 raise NotImplementedError
370
371 - def check_place_from_handle(self, handle, transaction):
372 """ 373 Checks whether a Place with the passed handle exists in the database. 374 If no such Place exists, a new Place is added to the database. 375 """ 376 raise NotImplementedError
377
378 - def check_family_from_handle(self, handle, transaction):
379 """ 380 Checks whether a Family with the passed handle exists in the database. 381 If no such Family exists, a new Family is added to the database. 382 """ 383 raise NotImplementedError
384
385 - def check_repository_from_handle(self, handle, transaction):
386 """ 387 Checks whether a Repository with the passed handle exists in the 388 database. If no such Repository exists, a new Repository is added 389 to the database. 390 """ 391 raise NotImplementedError
392
393 - def check_note_from_handle(self, handle, transaction):
394 """ 395 Checks whether a Note with the passed handle exists in the 396 database. If no such Note exists, a new Note is added 397 to the database. 398 """ 399 raise NotImplementedError
400
401 - def get_person_from_gramps_id(self, val):
402 """ 403 Finds a Person in the database from the passed GRAMPS ID. 404 If no such Person exists, None is returned. 405 """ 406 raise NotImplementedError
407
408 - def get_family_from_gramps_id(self, val):
409 """ 410 Finds a Family in the database from the passed GRAMPS ID. 411 If no such Family exists, None is returned. 412 """ 413 raise NotImplementedError
414
415 - def get_event_from_gramps_id(self, val):
416 """ 417 Finds an Event in the database from the passed GRAMPS ID. 418 If no such Event exists, None is returned. 419 """ 420 raise NotImplementedError
421
422 - def get_place_from_gramps_id(self, val):
423 """ 424 Finds a Place in the database from the passed gramps' ID. 425 If no such Place exists, None is returned. 426 """ 427 raise NotImplementedError
428
429 - def get_source_from_gramps_id(self, val):
430 """ 431 Finds a Source in the database from the passed gramps' ID. 432 If no such Source exists, None is returned. 433 """ 434 raise NotImplementedError
435
436 - def get_object_from_gramps_id(self, val):
437 """ 438 Finds a MediaObject in the database from the passed gramps' ID. 439 If no such MediaObject exists, None is returned. 440 """ 441 raise NotImplementedError
442
443 - def get_repository_from_gramps_id(self, val):
444 """ 445 Finds a Repository in the database from the passed gramps' ID. 446 If no such Repository exists, None is returned. 447 """ 448 raise NotImplementedError
449
450 - def get_note_from_gramps_id(self, val):
451 """ 452 Finds a Note in the database from the passed gramps' ID. 453 If no such Note exists, None is returned. 454 """ 455 raise NotImplementedError
456
457 - def add_person(self, person, transaction):
458 """ 459 Add a Person to the database, assigning internal IDs if they have 460 not already been defined. 461 """ 462 raise NotImplementedError
463
464 - def add_family(self, family, transaction):
465 """ 466 Add a Family to the database, assigning internal IDs if they have 467 not already been defined. 468 """ 469 raise NotImplementedError
470
471 - def add_source(self, source, transaction):
472 """ 473 Add a Source to the database, assigning internal IDs if they have 474 not already been defined. 475 """ 476 raise NotImplementedError
477
478 - def add_event(self, event, transaction):
479 """ 480 Add an Event to the database, assigning internal IDs if they have 481 not already been defined. 482 """ 483 raise NotImplementedError
484
485 - def add_person_event(self, event, transaction):
486 """ 487 Add an Event to the database, assigning internal IDs if they have 488 not already been defined. 489 """ 490 raise NotImplementedError
491
492 - def add_family_event(self, event, transaction):
493 """ 494 Add an Event to the database, assigning internal IDs if they have 495 not already been defined. 496 """ 497 raise NotImplementedError
498
499 - def add_place(self, place, transaction):
500 """ 501 Add a Place to the database, assigning internal IDs if they have 502 not already been defined. 503 """ 504 raise NotImplementedError
505
506 - def add_object(self, obj, transaction):
507 """ 508 Add a MediaObject to the database, assigning internal IDs if they have 509 not already been defined. 510 """ 511 raise NotImplementedError
512
513 - def add_repository(self, obj, transaction):
514 """ 515 Add a Repository to the database, assigning internal IDs if they have 516 not already been defined. 517 """ 518 raise NotImplementedError
519
520 - def add_note(self, obj, transaction):
521 """ 522 Add a Note to the database, assigning internal IDs if they have 523 not already been defined. 524 """ 525 raise NotImplementedError
526
527 - def get_name_group_mapping(self, name):
528 """ 529 Return the default grouping name for a surname 530 """ 531 raise NotImplementedError
532
533 - def has_name_group_key(self, name):
534 """ 535 Return if a key exists in the name_group table 536 """ 537 raise NotImplementedError
538
539 - def get_name_group_keys(self):
540 """ 541 Return the defined names that have been assigned to a default grouping 542 """ 543 raise NotImplementedError
544
545 - def set_name_group_mapping(self, name, group):
546 """ 547 Set the default grouping name for a surname. Needs to be overridden 548 in the derived class. 549 """ 550 raise NotImplementedError
551
552 - def get_number_of_people(self):
553 """ 554 Return the number of people currently in the databse. 555 """ 556 raise NotImplementedError
557
558 - def get_number_of_families(self):
559 """ 560 Return the number of families currently in the databse. 561 """ 562 raise NotImplementedError
563
564 - def get_number_of_events(self):
565 """ 566 Return the number of events currently in the databse. 567 """ 568 raise NotImplementedError
569
570 - def get_number_of_places(self):
571 """ 572 Return the number of places currently in the databse. 573 """ 574 raise NotImplementedError
575
576 - def get_number_of_sources(self):
577 """ 578 Return the number of sources currently in the databse. 579 """ 580 raise NotImplementedError
581
583 """ 584 Return the number of media objects currently in the databse. 585 """ 586 raise NotImplementedError
587
588 - def get_number_of_repositories(self):
589 """ 590 Return the number of source repositories currently in the databse. 591 """ 592 raise NotImplementedError
593
594 - def get_number_of_notes(self):
595 """ 596 Return the number of notes currently in the databse. 597 """ 598 raise NotImplementedError
599
600 - def get_person_handles(self, sort_handles=True):
601 """ 602 Return a list of database handles, one handle for each Person in 603 the database. If sort_handles is True, the list is sorted by surnames 604 """ 605 raise NotImplementedError
606
607 - def get_place_handles(self, sort_handles=True):
608 """ 609 Return a list of database handles, one handle for each Place in 610 the database. If sort_handles is True, the list is sorted by 611 Place title. 612 """ 613 raise NotImplementedError
614
615 - def get_source_handles(self, sort_handles=True):
616 """ 617 Return a list of database handles, one handle for each Source in 618 the database. If sort_handles is True, the list is sorted by 619 Source title. 620 """ 621 raise NotImplementedError
622
623 - def get_media_object_handles(self, sort_handles=True):
624 """ 625 Return a list of database handles, one handle for each MediaObject in 626 the database. If sort_handles is True, the list is sorted by title. 627 """ 628 raise NotImplementedError
629
630 - def get_event_handles(self):
631 """ 632 Return a list of database handles, one handle for each Event in 633 the database. 634 """ 635 raise NotImplementedError
636
637 - def get_family_handles(self):
638 """ 639 Return a list of database handles, one handle for each Family in 640 the database. 641 """ 642 raise NotImplementedError
643
644 - def get_repository_handles(self):
645 """ 646 Return a list of database handles, one handle for each Repository in 647 the database. 648 """ 649 raise NotImplementedError
650
651 - def get_note_handles(self):
652 """ 653 Return a list of database handles, one handle for each Note in 654 the database. 655 """ 656 raise NotImplementedError
657
658 - def get_gramps_ids(self, obj_key):
659 raise NotImplementedError
660
661 - def has_gramps_id(self, obj_key, gramps_id):
662 raise NotImplementedError
663
664 - def find_initial_person(self):
665 raise NotImplementedError
666
667 - def set_person_id_prefix(self, val):
668 """ 669 Set the naming template for GRAMPS Person ID values. The string is 670 expected to be in the form of a simple text string, or in a format 671 that contains a C/Python style format string using %d, such as I%d 672 or I%04d. 673 """ 674 raise NotImplementedError
675
676 - def set_source_id_prefix(self, val):
677 """ 678 Set the naming template for GRAMPS Source ID values. The string is 679 expected to be in the form of a simple text string, or in a format 680 that contains a C/Python style format string using %d, such as S%d 681 or S%04d. 682 """ 683 raise NotImplementedError
684
685 - def set_object_id_prefix(self, val):
686 """ 687 Set the naming template for GRAMPS MediaObject ID values. The string 688 is expected to be in the form of a simple text string, or in a format 689 that contains a C/Python style format string using %d, such as O%d 690 or O%04d. 691 """ 692 raise NotImplementedError
693
694 - def set_place_id_prefix(self, val):
695 """ 696 Set the naming template for GRAMPS Place ID values. The string is 697 expected to be in the form of a simple text string, or in a format 698 that contains a C/Python style format string using %d, such as P%d 699 or P%04d. 700 """ 701 raise NotImplementedError
702
703 - def set_family_id_prefix(self, val):
704 """ 705 Set the naming template for GRAMPS Family ID values. The string is 706 expected to be in the form of a simple text string, or in a format 707 that contains a C/Python style format string using %d, such as F%d 708 or F%04d. 709 """ 710 raise NotImplementedError
711
712 - def set_event_id_prefix(self, val):
713 """ 714 Set the naming template for GRAMPS Event ID values. The string is 715 expected to be in the form of a simple text string, or in a format 716 that contains a C/Python style format string using %d, such as E%d 717 or E%04d. 718 """ 719 raise NotImplementedError
720
721 - def set_repository_id_prefix(self, val):
722 """ 723 Set the naming template for GRAMPS Repository ID values. The string is 724 expected to be in the form of a simple text string, or in a format 725 that contains a C/Python style format string using %d, such as R%d 726 or R%04d. 727 """ 728 raise NotImplementedError
729
730 - def set_note_id_prefix(self, val):
731 """ 732 Set the naming template for GRAMPS Note ID values. The string is 733 expected to be in the form of a simple text string, or in a format 734 that contains a C/Python style format string using %d, such as N%d 735 or N%04d. 736 """ 737 raise NotImplementedError
738
739 - def transaction_begin(self, msg="", batch=False, no_magic=False):
740 """ 741 Create a new Transaction tied to the current UNDO database. The 742 transaction has no effect until it is committed using the 743 transaction_commit function of the this database object. 744 """ 745 raise NotImplementedError
746
747 - def transaction_commit(self, transaction, msg):
748 """ 749 Commits the transaction to the assocated UNDO database. 750 """ 751 raise NotImplementedError
752
753 - def do_commit(self, add_list, db_map):
754 raise NotImplementedError
755
756 - def undo_available(self):
757 """ 758 returns boolean of whether or not there's a possibility of undo 759 """ 760 raise NotImplementedError
761
762 - def redo_available(self):
763 """ 764 returns boolean of whether or not there's a possibility of redo 765 """ 766 raise NotImplementedError
767
768 - def undo(self, update_history=True):
769 """ 770 Accesses the last committed transaction, and reverts the data to 771 the state before the transaction was committed. 772 """ 773 raise NotImplementedError
774
775 - def redo(self, update_history=True):
776 """ 777 Accesses the last undone transaction, and reverts the data to 778 the state before the transaction was undone. 779 """ 780 raise NotImplementedError
781
782 - def undo_reference(self, data, handle):
783 raise NotImplementedError
784
785 - def set_undo_callback(self, callback):
786 """ 787 Defines the callback function that is called whenever an undo operation 788 is executed. The callback function recieves a single argument that is a 789 text string that defines the operation. 790 """ 791 raise NotImplementedError
792
793 - def set_redo_callback(self, callback):
794 """ 795 Defines the callback function that is called whenever an redo operation 796 is executed. The callback function recieves a single argument that is a 797 text string that defines the operation. 798 """ 799 raise NotImplementedError
800
801 - def get_surname_list(self):
802 """ 803 Return the list of locale-sorted surnames contained in the database. 804 """ 805 raise NotImplementedError
806
807 - def build_surname_list(self):
808 """ 809 Builds the list of locale-sorted surnames contained in the database. 810 The function must be overridden in the derived class. 811 """ 812 raise NotImplementedError
813
814 - def add_to_surname_list(self, person, batch_transaction):
815 raise NotImplementedError
816
817 - def remove_from_surname_list(self, person):
818 """ 819 Check whether there are persons with the same surname left in 820 the database. If not then we need to remove the name from the list. 821 The function must be overridden in the derived class. 822 """ 823 raise NotImplementedError
824
825 - def get_bookmarks(self):
826 """returns the list of Person handles in the bookmarks""" 827 raise NotImplementedError
828
829 - def get_family_bookmarks(self):
830 """returns the list of Person handles in the bookmarks""" 831 raise NotImplementedError
832
833 - def get_event_bookmarks(self):
834 """returns the list of Person handles in the bookmarks""" 835 raise NotImplementedError
836
837 - def get_place_bookmarks(self):
838 """returns the list of Person handles in the bookmarks""" 839 raise NotImplementedError
840
841 - def get_source_bookmarks(self):
842 """returns the list of Person handles in the bookmarks""" 843 raise NotImplementedError
844
845 - def get_media_bookmarks(self):
846 """returns the list of Person handles in the bookmarks""" 847 raise NotImplementedError
848
849 - def get_repo_bookmarks(self):
850 """returns the list of Person handles in the bookmarks""" 851 raise NotImplementedError
852
853 - def get_note_bookmarks(self):
854 """returns the list of Note handles in the bookmarks""" 855 raise NotImplementedError
856
857 - def set_researcher(self, owner):
858 """sets the information about the owner of the database""" 859 raise NotImplementedError
860
861 - def get_researcher(self):
862 """returns the Researcher instance, providing information about 863 the owner of the database""" 864 raise NotImplementedError
865
866 - def set_default_person_handle(self, handle):
867 """sets the default Person to the passed instance""" 868 raise NotImplementedError
869
870 - def get_default_person(self):
871 """returns the default Person of the database""" 872 raise NotImplementedError
873
874 - def get_default_handle(self):
875 """returns the default Person of the database""" 876 raise NotImplementedError
877
878 - def get_save_path(self):
879 """returns the save path of the file, or "" if one does not exist""" 880 raise NotImplementedError
881
882 - def set_save_path(self, path):
883 """sets the save path for the database""" 884 raise NotImplementedError
885
886 - def get_person_event_types(self):
887 """returns a list of all Event types assocated with Person 888 instances in the database""" 889 raise NotImplementedError
890
891 - def get_person_attribute_types(self):
892 """returns a list of all Attribute types assocated with Person 893 instances in the database""" 894 raise NotImplementedError
895
896 - def get_family_attribute_types(self):
897 """returns a list of all Attribute types assocated with Family 898 instances in the database""" 899 raise NotImplementedError
900
901 - def get_family_event_types(self):
902 """returns a list of all Event types assocated with Family 903 instances in the database""" 904 raise NotImplementedError
905
906 - def get_marker_types(self):
907 """return a list of all marker types available in the database""" 908 raise NotImplementedError
909
910 - def get_media_attribute_types(self):
911 """returns a list of all Attribute types assocated with Media 912 and MediaRef instances in the database""" 913 raise NotImplementedError
914
915 - def get_family_relation_types(self):
916 """returns a list of all relationship types assocated with Family 917 instances in the database""" 918 raise NotImplementedError
919
920 - def get_child_reference_types(self):
921 """returns a list of all child reference types assocated with Family 922 instances in the database""" 923 raise NotImplementedError
924
925 - def get_event_roles(self):
926 """returns a list of all custom event role names assocated with Event 927 instances in the database""" 928 raise NotImplementedError
929
930 - def get_name_types(self):
931 """returns a list of all custom names types assocated with Person 932 instances in the database""" 933 raise NotImplementedError
934
935 - def get_repository_types(self):
936 """returns a list of all custom repository types assocated with 937 Repository instances in the database""" 938 raise NotImplementedError
939
940 - def get_note_types(self):
941 """returns a list of all custom note types assocated with 942 Note instances in the database""" 943 raise NotImplementedError
944
945 - def get_source_media_types(self):
946 """returns a list of all custom source media types assocated with 947 Source instances in the database""" 948 raise NotImplementedError
949
950 - def get_url_types(self):
951 """returns a list of all custom names types assocated with Url 952 instances in the database""" 953 raise NotImplementedError
954
955 - def remove_person(self, handle, transaction):
956 """ 957 Remove the Person specified by the database handle from the 958 database, preserving the change in the passed transaction. This 959 method must be overridden in the derived class. 960 """ 961 raise NotImplementedError
962
963 - def remove_source(self, handle, transaction):
964 """ 965 Remove the Source specified by the database handle from the 966 database, preserving the change in the passed transaction. This 967 method must be overridden in the derived class. 968 """ 969 raise NotImplementedError
970
971 - def remove_event(self, handle, transaction):
972 """ 973 Remove the Event specified by the database handle from the 974 database, preserving the change in the passed transaction. This 975 method must be overridden in the derived class. 976 """ 977 raise NotImplementedError
978
979 - def remove_object(self, handle, transaction):
980 """ 981 Remove the MediaObjectPerson specified by the database handle from the 982 database, preserving the change in the passed transaction. This 983 method must be overridden in the derived class. 984 """ 985 raise NotImplementedError
986
987 - def remove_place(self, handle, transaction):
988 """ 989 Remove the Place specified by the database handle from the 990 database, preserving the change in the passed transaction. This 991 method must be overridden in the derived class. 992 """ 993 raise NotImplementedError
994
995 - def remove_family(self, handle, transaction):
996 """ 997 Remove the Family specified by the database handle from the 998 database, preserving the change in the passed transaction. This 999 method must be overridden in the derived class. 1000 """ 1001 raise NotImplementedError
1002
1003 - def remove_repository(self, handle, transaction):
1004 """ 1005 Remove the Repository specified by the database handle from the 1006 database, preserving the change in the passed transaction. This 1007 method must be overridden in the derived class. 1008 """ 1009 raise NotImplementedError
1010
1011 - def remove_note(self, handle, transaction):
1012 """ 1013 Remove the Note specified by the database handle from the 1014 database, preserving the change in the passed transaction. This 1015 method must be overridden in the derived class. 1016 """ 1017 raise NotImplementedError
1018
1019 - def get_raw_person_data(self, handle):
1020 raise NotImplementedError
1021
1022 - def get_raw_family_data(self, handle):
1023 raise NotImplementedError
1024
1025 - def get_raw_object_data(self, handle):
1026 raise NotImplementedError
1027
1028 - def get_raw_place_data(self, handle):
1029 raise NotImplementedError
1030
1031 - def get_raw_event_data(self, handle):
1032 raise NotImplementedError
1033
1034 - def get_raw_source_data(self, handle):
1035 raise NotImplementedError
1036
1037 - def get_raw_repository_data(self, handle):
1038 raise NotImplementedError
1039
1040 - def get_raw_note_data(self, handle):
1041 raise NotImplementedError
1042
1043 - def has_person_handle(self, handle):
1044 """ 1045 returns True if the handle exists in the current Person database. 1046 """ 1047 raise NotImplementedError
1048
1049 - def has_event_handle(self, handle):
1050 """ 1051 returns True if the handle exists in the current Event database. 1052 """ 1053 raise NotImplementedError
1054
1055 - def has_source_handle(self, handle):
1056 """ 1057 returns True if the handle exists in the current Source database. 1058 """ 1059 raise NotImplementedError
1060
1061 - def has_place_handle(self, handle):
1062 """ 1063 returns True if the handle exists in the current Place database. 1064 """ 1065 raise NotImplementedError
1066
1067 - def has_family_handle(self, handle):
1068 """ 1069 returns True if the handle exists in the current Family database. 1070 """ 1071 raise NotImplementedError
1072
1073 - def has_object_handle(self, handle):
1074 """ 1075 returns True if the handle exists in the current MediaObjectdatabase. 1076 """ 1077 raise NotImplementedError
1078
1079 - def has_repository_handle(self, handle):
1080 """ 1081 returns True if the handle exists in the current Repository database. 1082 """ 1083 raise NotImplementedError
1084
1085 - def has_note_handle(self, handle):
1086 """ 1087 returns True if the handle exists in the current Note database. 1088 """ 1089 raise NotImplementedError
1090
1091 - def set_mediapath(self, path):
1092 """sets the default media path for database, path should be utf-8""" 1093 raise NotImplementedError
1094
1095 - def get_mediapath(self):
1096 """returns the default media path of the database""" 1097 raise NotImplementedError
1098
1099 - def set_column_order(self, col_list, name):
1100 raise NotImplementedError
1101
1102 - def set_person_column_order(self, col_list):
1103 """ 1104 Stores the Person display common information in the 1105 database's metadata. 1106 """ 1107 raise NotImplementedError
1108
1109 - def set_family_list_column_order(self, col_list):
1110 """ 1111 Stores the Person display common information in the 1112 database's metadata. 1113 """ 1114 raise NotImplementedError
1115
1116 - def set_child_column_order(self, col_list):
1117 """ 1118 Stores the Person display common information in the 1119 database's metadata. 1120 """ 1121 raise NotImplementedError
1122
1123 - def set_place_column_order(self, col_list):
1124 """ 1125 Stores the Place display common information in the 1126 database's metadata. 1127 """ 1128 raise NotImplementedError
1129
1130 - def set_source_column_order(self, col_list):
1131 """ 1132 Stores the Source display common information in the 1133 database's metadata. 1134 """ 1135 raise NotImplementedError
1136
1137 - def set_media_column_order(self, col_list):
1138 """ 1139 Stores the Media display common information in the 1140 database's metadata. 1141 """ 1142 raise NotImplementedError
1143
1144 - def set_event_column_order(self, col_list):
1145 """ 1146 Stores the Event display common information in the 1147 database's metadata. 1148 """ 1149 raise NotImplementedError
1150
1151 - def set_repository_column_order(self, col_list):
1152 """ 1153 Stores the Repository display common information in the 1154 database's metadata. 1155 """ 1156 raise NotImplementedError
1157
1158 - def set_note_column_order(self, col_list):
1159 """ 1160 Stores the Note display common information in the 1161 database's metadata. 1162 """ 1163 raise NotImplementedError
1164
1165 - def get_person_column_order(self):
1166 """ 1167 Return the Person display common information stored in the 1168 database's metadata. 1169 """ 1170 raise NotImplementedError
1171
1172 - def get_family_list_column_order(self):
1173 """ 1174 Return the Person display common information stored in the 1175 database's metadata. 1176 """ 1177 raise NotImplementedError
1178
1179 - def get_child_column_order(self):
1180 """ 1181 Return the Person display common information stored in the 1182 database's metadata. 1183 """ 1184 raise NotImplementedError
1185
1186 - def get_place_column_order(self):
1187 """ 1188 Return the Place display common information stored in the 1189 database's metadata. 1190 """ 1191 raise NotImplementedError
1192
1193 - def get_source_column_order(self):
1194 """ 1195 Return the Source display common information stored in the 1196 database's metadata. 1197 """ 1198 raise NotImplementedError
1199
1200 - def get_media_column_order(self):
1201 """ 1202 Return the MediaObject display common information stored in the 1203 database's metadata. 1204 """ 1205 raise NotImplementedError
1206
1207 - def get_event_column_order(self):
1208 """ 1209 Return the Event display common information stored in the 1210 database's metadata. 1211 """ 1212 raise NotImplementedError
1213
1214 - def get_repository_column_order(self):
1215 """ 1216 Return the Repository display common information stored in the 1217 database's metadata. 1218 """ 1219 raise NotImplementedError
1220
1221 - def get_note_column_order(self):
1222 """ 1223 Return the Note display common information stored in the 1224 database's metadata. 1225 """ 1226 raise NotImplementedError
1227
1228 - def delete_primary_from_reference_map(self, handle, transaction):
1229 """Called each time an object is removed from the database. This can 1230 be used by subclasses to update any additional index tables that might 1231 need to be changed.""" 1232 raise NotImplementedError
1233
1234 - def update_reference_map(self, obj, transaction):
1235 """Called each time an object is writen to the database. This can 1236 be used by subclasses to update any additional index tables that might 1237 need to be changed.""" 1238 raise NotImplementedError
1239
1240 - def reindex_reference_map(self, callback):
1241 """ 1242 Reindex all primary records in the database. 1243 1244 """ 1245 raise NotImplementedError
1246 1270