Class GenealogyDB
java.lang.Object
|
+----GenealogyDB
- public class GenealogyDB
- extends Object
This class holds an internal representation of a GEDCOM file.
The data are held in two hashtables, one for people and one for families.
These hashtables can be accessed directly, but there are also utility
functions available to find e.g. the parents of a given individual.
- Author:
- Vegard Brox
-
GenealogyDB(Hashtable, Hashtable)
- Constructs a new genealogy database initialised with the
given hashtables.
-
getChildren(String)
- Finds the children in a given family.
-
getFamilies()
- Returns the hashtable with families.
-
getFather(String)
- Finds the father of a given individual.
-
getHusband(String)
- Finds the husband in a given family.
-
getMother(String)
- Finds the mother of a given individual.
-
getPeople()
- Returns the hashtable with people.
-
getSFamilies(String)
- Finds the families in which the given individual is a spouse.
-
getWife(String)
- Finds the wife in a given family.
GenealogyDB
public GenealogyDB(Hashtable people,
Hashtable families)
- Constructs a new genealogy database initialised with the
given hashtables.
- Parameters:
- people - A hashtable initialised with Person objects
- families - A hastable initialised with Family objects
getPeople
public Hashtable getPeople()
- Returns the hashtable with people.
- Returns:
- A hashtable with Person objects
getFamilies
public Hashtable getFamilies()
- Returns the hashtable with families.
- Returns:
- A hashtable with Family objects
getFather
public Person getFather(String personID)
- Finds the father of a given individual.
- Parameters:
- personID - ID of the person to find the father for
- Returns:
- A Person object representing the father
getMother
public Person getMother(String personID)
- Finds the mother of a given individual.
- Parameters:
- personID - ID of the person to find the mother for
- Returns:
- A Person object representing the mother
getSFamilies
public Enumeration getSFamilies(String personID)
- Finds the families in which the given individual is a spouse.
- Parameters:
- personID - ID of the person to find families for
- Returns:
- An enumeration of Family objects representing the families
getChildren
public Enumeration getChildren(String familyID)
- Finds the children in a given family.
- Parameters:
- familyID - ID of the family to find the children for
- Returns:
- An enumeration of Person objects representing the children
getHusband
public Person getHusband(String familyID)
- Finds the husband in a given family.
- Parameters:
- familyID - ID of the family to find husband for
- Returns:
- A Person object representing the husband
getWife
public Person getWife(String familyID)
- Finds the wife in a given family.
- Parameters:
- familyID - ID of the family to find the wife for
- Returns:
- A Person object representing the wife