Package org.gedcom4j.query

Examples of org.gedcom4j.query.Finder


        assertNotNull(g);
        assertEquals("There are supposed to be 43 people in the gedcom - are you using the right file/file version?",
                43, g.individuals.size());
        assertEquals("There are supposed to be 18 families in the gedcom - are you using the right file/file version?",
                18, g.families.size());
        finder = new Finder(g);
    }
View Full Code Here


        gp.load("sample/john_of_sea_20101009.ged");
        assertTrue(gp.errors.isEmpty());
        assertTrue("There should be a warning because the file says it's 5.5 but has 5.5.1 tags in it",
                !gp.warnings.isEmpty());
        Gedcom g = gp.gedcom;
        Finder f = new Finder(g);
        List<Individual> found = f.findByName("Moor", "Mary");
        assertNotNull(found);
        assertEquals(1, found.size());
        Individual mary = found.get(0);
        assertNotNull(mary);
        List<IndividualAttribute> facts = mary.getAttributesOfType(IndividualAttributeType.FACT);
View Full Code Here

        gp.load("sample/5.5.1 sample 2.ged");
        assertTrue(gp.errors.isEmpty());
        assertTrue("There should be a warning because the file says it's 5.5 but has 5.5.1 tags in it",
                !gp.warnings.isEmpty());
        Gedcom g = gp.gedcom;
        Finder f = new Finder(g);
        List<Individual> found = f.findByName("Pinter", "Anonymus" /* sic */);
        assertNotNull(found);
        assertEquals(1, found.size());
        Individual dude = found.get(0);
        assertNotNull(dude);
        assertEquals(1, dude.names.size());
View Full Code Here

        assertNotNull(g);
        assertEquals("There are supposed to be 43 people in the gedcom - are you using the right file/file version?",
                43, g.individuals.size());
        assertEquals("There are supposed to be 18 families in the gedcom - are you using the right file/file version?",
                18, g.families.size());
        finder = new Finder(g);
    }
View Full Code Here

     * @param givenName
     *            the given name of the person we want
     * @return the person
     */
    private Individual getPerson(Gedcom gedcom, String surname, String givenName) {
        Individual result = new Finder(gedcom).findByName(surname, givenName).get(0);
        assertNotNull("Couldn't find " + givenName + " " + surname + " by name in the gedcom", result);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.gedcom4j.query.Finder

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.