FamilySearch / gedcom5-java

Gedcom parsers
Apache License 2.0
68 stars 41 forks source link

How to include source DATA in the object model #19

Open michelesalvador opened 3 years ago

michelesalvador commented 3 years ago

According to the GEDCOM 5.5.1 standard a source can have a subordinate DATA tag storing additional informations:

n @<XREF:SOUR>@ SOUR            {1:1}
+1 DATA                 {0:1}
+2 EVEN <EVENTS_RECORDED>       {0:M}
+3 DATE <DATE_PERIOD>           {0:1}
+3 PLAC <SOURCE_JURISDICTION_PLACE> {0:1}
+2 AGNC <RESPONSIBLE_AGENCY>        {0:1}
+2 <<NOTE_STRUCTURE>>           {0:M}
...

At the moment this DATA tag and its subordinates are not included in the object model. I'd like to submit a pull request to fix.

I have created a SourceData class and a DataEvent class. But now I have a doubt: in SourceData is it better to define a single DataEvent or a List<DataEvent>?

In the real world of GEDCOMs is there usually only one EVEN under DATA? Or is it actually common to have multiple EVEN, in accordance to the standard?

michelesalvador commented 3 years ago

Receiving no response I will opt for what I think is best. I will follow the GEDCOM 5.5.1 standard, that is the possibility to add multiple EVEN under DATA.