FamilySearch/gedcom5-java

Many Submitters or only one?

michelesalvador opened this issue · 4 comments

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:

  • the deprecated method Header.getSubmitter() always returns null
  • Gedcom.getSubmitter() always returns the first submitter

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>.

Okay, thanks for the report.

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 .

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.

Version 1.9.0 has been released.