FamilySearch / gedcomx

An open data model and an open serialization format for exchanging genealogical data.
http://www.gedcomx.org
Apache License 2.0
355 stars 67 forks source link

collapse couple, parent/child, other relationship #6

Closed carpentermp closed 13 years ago

carpentermp commented 13 years ago

I guess this is me contradicting myself or changing my tune, but, if Relationships are going to be entities, maybe it would be best if there weren’t different root elements like CoupleRelationship, ParentChildRelationship, etc. It might be better to have a single root element “Relationship” that has a type, “ParentChild”, “Couple”, etc. The type would define the roles of the two people involved in the relationship e.g. “ParentChild” would mean that person 1 is the parent and person 2 is the child. OF course, I guess I would then need to argue that we need to make this change in the “Record” world as well, because I hate it when they are different. Let’s discuss this.

stoicflame commented 13 years ago

Ya, I'm kinda sitting on the fence with this issue, too.

The current consensus (and the reason that the different classes exist today) is that Couple and ParentChild are the 99% case and therefore it's especially useful to have accessors named for the different roles in the relationship (e.g. "parent" and "child" for ParentChild instead of "person1" and "person2").

carpentermp commented 13 years ago

Yes, the "getParent" and "getChild" are nice. Unfortunately, the genderless nature of our couple relationships means that we don't have "getHusband/getMan" or "getWife/getWoman" methods anymore. So we are stuck with getPerson1 and getPerson2 methods for couples. My biggest reason in favor of the change is to avoid having "ParentChildRelationship", "CoupleRelationship", and "OtherRelationship" root elements/entities. It's not the end of the world to have so many, but it seems a little simpler to have just a "Relationship" root element.

jeffph commented 13 years ago

+1

While I'm ok with the current ParentChild/Couple/Other approach, it would be a little easier to code and persist Relationships if they were a single class.

stoicflame commented 13 years ago

Hi.

Take a look at the pull request at issue #41 and add your comments.

https://github.com/FamilySearch/gedcomx/pull/41

The stickiest part is the question of what to do with the lineage of a parent-child relationship. Note that #41 has collapsed lineage to a characteristic on a relationship.

FWIW, I really like this change. I think it greatly simplifies things.

stoicflame commented 13 years ago

Closing this with the merge at Issue #41. I like the result.