Package org.gedcom4j.model

Examples of org.gedcom4j.model.IndividualEvent


        Individual iBefore = gBefore.individuals.get("@I1@");
        assertNotNull(iBefore);

        assertNotNull(iBefore.events);
        assertEquals(4, iBefore.events.size());
        IndividualEvent eBefore = iBefore.events.get(0); // The birth event
        assertNotNull(eBefore);
        assertEquals(IndividualEventType.BIRTH, eBefore.type);
        assertNull(eBefore.yNull);
        assertNotNull(eBefore.description);

        // Write the file back out in standard format
        String fn = "tmp/" + this.getClass().getName() + ".ged";
        GedcomWriter gw = new GedcomWriter(gBefore);
        gw.validationSuppressed = true;
        gw.write(fn);

        // Read the file we just wrote back in. The non-standard part should be removed.
        gp = new GedcomParser();
        gp.load(fn);
        Gedcom gAfter = gp.gedcom;
        assertNotNull(gBefore);

        assertEquals(1, gAfter.individuals.size());
        Individual iAfter = gAfter.individuals.get("@I1@");
        assertNotNull(iAfter);

        assertNotNull(iAfter.events);
        assertEquals(4, iAfter.events.size());
        IndividualEvent eAfter = iAfter.events.get(0); // The birth event
        assertNotNull(eAfter);
        assertEquals(IndividualEventType.BIRTH, eAfter.type);
        assertNull(eAfter.yNull);

        // And the big payoff...
View Full Code Here


        Individual iBefore = gBefore.individuals.get("@I1@");
        assertNotNull(iBefore);

        assertNotNull(iBefore.events);
        assertEquals(4, iBefore.events.size());
        IndividualEvent eBefore = iBefore.events.get(0); // The birth event
        assertNotNull(eBefore);
        assertEquals(IndividualEventType.BIRTH, eBefore.type);
        assertNull(eBefore.yNull);
        assertNotNull(eBefore.description);
View Full Code Here

TOP

Related Classes of org.gedcom4j.model.IndividualEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.