Continuing with my reverse engineering of Gramps, I have sketched the relationships between “genealogical objects”, namely what is desgnated as “array” in the JSON schemas. My drawings do not include “scalar” fields which are usually “integer” or “string”.
Here are the two main “objects”, Person and Family:
At left, there are the specifics of the object. At right, we find the annotation tools, attributes, citations, media, notes and tags. These annotation tools are offered as a way to explain, prove and illustrate the facts recorded in the specifics. Conceptually, they are so general that they come “naturally” as complement to any object.
This is the case for the next important object, Event:
However, when you consider Place objects, there is no provision for attributes (boxes and arrows shown in dark gold are missing components – drawings were created by copy/paste of a generic object model). I don’t see why there couldn’t be attributes on a place.
Similarly, no event can be attached to a place. Presently, I must use a note which is semantically not the same and is perhaps less flexible. This is a real nuisance when you try to follow a village history in addition to its inhabitants (events such as fire, flooding, drought, battle, plague, … are not related to people in particular but to the place itself). Is this a shortsighting?
Similarly a Repository has no attribute. I understand it has no Media (though we could record a photo of the building or location) as a repository is a store for media.
Also Source has no Citation because it is a “descendant” of a citation. But why was a specific SrcAttribute class ever created? It has the exact same definition as Attribute. The only consequence is to segregate attributes into distinct name spaces. I don’t think this is necessary.
When it comes to Location and Address, they are nearly identical (see this question). Address can be annotated but many tools are not allowed:
I don’t see the reason.
Regarding the existence of Location, I assume it was kept from earlier releases before the present nesting feature of Places (Enclosed by). Documentation does not mention locations nor how to use them. It is likely it can be dropped safely.
Would a unified approach to object annotation bring a substantial improvement to Gramps usage? Note it is quite easy to implement it by modifying the JSON schemas and adating the serialize() and unserialize() methods.