frizbog / gedcom4j

Java library for reading/writing genealogy files in GEDCOM format
http://gedcom4j.org
53 stars 36 forks source link

add CONT to individual attribute [patch] #192

Open JPT77 opened 6 years ago

JPT77 commented 6 years ago

I added this because gedcom4j complained on CONT in DSCR not sure if this is standard, but CONCATENATION already is implemented.

index 1afd877..171d48a 100644
--- a/src/main/java/org/gedcom4j/parser/IndividualAttributeParser.java
+++ b/src/main/java/org/gedcom4j/parser/IndividualAttributeParser.java
@@ -126,6 +126,13 @@
                     } else {
                         loadInto.getDescription().setValue(loadInto.getDescription().getValue() + ch.getValue());
                     }
+                } else if (Tag.CONTINUATION.equalsText(ch.getTag())) {
+                    if (loadInto.getDescription() == null) {
+                        loadInto.setDescription(parseStringWithCustomFacts(ch));
+                    } else {
+                        loadInto.getDescription().setValue(loadInto.getDescription().getValue() + "\n" + ch.getValue());
+                    }
                 } else {
                     unknownTag(ch, loadInto);
                 }