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

Constructor Index

 o GenealogyDB(Hashtable, Hashtable)
Constructs a new genealogy database initialised with the given hashtables.

Method Index

 o getChildren(String)
Finds the children in a given family.
 o getFamilies()
Returns the hashtable with families.
 o getFather(String)
Finds the father of a given individual.
 o getHusband(String)
Finds the husband in a given family.
 o getMother(String)
Finds the mother of a given individual.
 o getPeople()
Returns the hashtable with people.
 o getSFamilies(String)
Finds the families in which the given individual is a spouse.
 o getWife(String)
Finds the wife in a given family.

Constructors

 o 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

Methods

 o getPeople
 public Hashtable getPeople()
Returns the hashtable with people.

Returns:
A hashtable with Person objects
 o getFamilies
 public Hashtable getFamilies()
Returns the hashtable with families.

Returns:
A hashtable with Family objects
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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