~ubuntu-branches/ubuntu/utopic/gramps/utopic

« back to all changes in this revision

Viewing changes to src/Filters/Rules/__init__.py

  • Committer: Package Import Robot
  • Author(s): James A. Treacy
  • Date: 2012-05-22 17:18:36 UTC
  • mfrom: (39.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120522171836-35fi62lp4w7jnrd7
Tags: 3.4.0-1
* New upstream version
* Updated desktop file. Closes: #667472

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Gramps - a GTK+/GNOME based genealogy program
3
3
#
4
4
# Copyright (C) 2002-2006  Donald N. Allingham
 
5
# Copyright (C) 2011       Tim G L Lyons
 
6
# Copyright (C) 2011       Doug Blank <doug.blank@gmail.com>
5
7
#
6
8
# This program is free software; you can redistribute it and/or modify
7
9
# it under the terms of the GNU General Public License as published by
18
20
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
21
#
20
22
 
21
 
# $Id:__init__.py 9912 2008-01-22 09:17:46Z acraphae $
 
23
# $Id: __init__.py 18571 2011-12-11 04:04:28Z dsblank $
22
24
 
23
25
"""
24
26
Package providing filter rules for GRAMPS.
 
27
 
 
28
The following filters are provided in Filters/Rules.
 
29
 
 
30
Match given values:
 
31
_HasCitationBase             Citation with a particular value (HasCitation)
 
32
                             also used for Person, Family and Event having a 
 
33
                             particular Citation
 
34
_HasEventBase                Event with a particular value (HasEvent)
 
35
                             also used for Family and Person having a particular
 
36
                             Event
 
37
_HasSourceBase               Source with a particular value (HasSource)
 
38
                             also used for Citation having a particular Source
 
39
 
 
40
Match on sub-objects
 
41
_ChangedSinceBase            Object changed since date
 
42
_HasAttributeBase            Object has particular attribute value
 
43
_HasGrampsId                 Object has a specific Gramps Id
 
44
_HasNoteRegexBase            Object has notes matching regular expression
 
45
_HasNoteSubstrBase           Object has note containing substring
 
46
_HasTagBase                  Object has a particular tag
 
47
_HasTextMatchingRegexpOf     Object has text matching regular expression
 
48
_HasTextMatchingSubstringOf  Object has text containing substring
 
49
_IsPrivate                   Object is marked as private
 
50
_IsPublic                    Object is not marked as private
 
51
_MatchesFilterBase           Object matches another filter
 
52
_RegExpldBase                Object has Gramps Id matching regular expression
 
53
 
 
54
Match on related objects
 
55
_MatchesFilterEventBase      Object has an event that matches another filter
 
56
_MatchesSourceConfidenceBase Object with specific confidence on direct sources
 
57
_MatchesSourceFilterBase     Object matches another filter on direct sources
 
58
 
 
59
Count based
 
60
_HasGalleryBase              Object has </>/= number of media objects
 
61
_HasLDSBase                  Object has </>/= number of LDS  sub-objects
 
62
_HasNoteBase                 Object has </>/= number of notes
 
63
_HasReferenceCountBase       Object has </>/= number of references
 
64
_HasSourceCountBase          Object has </>/= number of sources
 
65
 
 
66
_Rule                        Base rule class
 
67
_Everything                  Match every object in the database
25
68
"""
26
69
 
27
70
# Need to expose this to be available for filter plugins:
31
74
from Filters.Rules._Everything import Everything
32
75
from Filters.Rules._HasGrampsId import HasGrampsId
33
76
from Filters.Rules._IsPrivate import IsPrivate
 
77
from Filters.Rules._IsPublic import IsPublic
34
78
from Filters.Rules._HasTextMatchingSubstringOf import HasTextMatchingSubstringOf
35
79
from Filters.Rules._HasTextMatchingRegexpOf import HasTextMatchingRegexpOf
36
80
from Filters.Rules._MatchesFilterBase import MatchesFilterBase
39
83
from Filters.Rules._MatchesSourceFilterBase import MatchesSourceFilterBase
40
84
from Filters.Rules._ChangedSinceBase import ChangedSinceBase
41
85
 
42
 
from Filters.Rules import (Person, Family, Event, Source, Place, MediaObject, 
43
 
                           Repository, Note)
 
86
from Filters.Rules import (Person, Family, Event, Source, Citation, Place, 
 
87
                           MediaObject, Repository, Note)