FamilySearch / gedcom5-java

Gedcom parsers
Apache License 2.0
68 stars 41 forks source link

Cause is EventFact instead of String #7

Closed michelesalvador closed 6 years ago

michelesalvador commented 6 years ago

I can't understand why EventFact.caus is of class EventFact instead of String.

In GEDCOM 5.5 Cause is defined as

EVENT_STRUCTURE
n  <EVENT_TAG>          {1:1}
...
+1 CAUS <CAUSE_OF_DEATH>    {0:1}

And in GEDCOM 5.5.1

EVENT_DETAIL
...
n CAUS <CAUSE_OF_EVENT>     {0:1}

Both <CAUSE_OF_DEATH> and <CAUSE_OF_EVENT> are simple values of {Size=1:90}. No trace of another event nested inside.

Should EventFact.caus be of class String?

michelesalvador commented 6 years ago

There is a comment in EventFact that suggests the reason why caus tag is of class EventFact:

so it can have source citations

It's a noble intent, but in my opinion it's not GEDCOM standard.

stoicflame commented 6 years ago

Agreed.

I'm happy to merge a pull request.

michelesalvador commented 6 years ago

Opened pull request #12.

stoicflame commented 6 years ago

Closed with #12.