FamilySearch / gedcom5-java

Gedcom parsers
Apache License 2.0
68 stars 41 forks source link

Many Submitters or only one? #2

Closed michelesalvador closed 6 years ago

michelesalvador commented 6 years ago

If my comprehension is correct, in a Gedcom file as many SUBM records can be used, not only one: http://wiki-en.genealogy.net/GEDCOM/SUBM-Tag#Use_of_SUBM_Records

So this Gedcom structure should be valid:

0 HEAD
1 SUBM @U2@
...
0 @U1@ SUBM
1 NAME Less Important Submitter
0 @U2@ SUBM
1 NAME Submitter Linked in Head

But the Gedcom parser seems to assume that only one submitter exists:

In my opinion Header.getSubmitter() should return the submitter pointed by the SUBM tag in HEAD, and Gedcom.getSubmitter() should be replaced by a Gedcom.getSubmitters() returning a List<Submitter>.

stoicflame commented 6 years ago

Okay, thanks for the report.

apokalipsys commented 6 years ago

I modified the ModelParser to support multiple submitters. Following @michelesalvador suggestions, there is a getSubmitters() method in Gedcom. You can check the modifications made in this commit d4586ae .

stoicflame commented 6 years ago

Thanks for the commit. If you'd like to submit a pull request, we can work with you to get it merged. It currently doesn't build with mvn clean install command.

stoicflame commented 6 years ago

Version 1.9.0 has been released.