Class GEDCOMLocater

java.lang.Object
   |
   +----GEDCOMLocater

public class GEDCOMLocater
extends Object
This class locates and picks out relevant lines from a file of GEDCOM code. The lines are then passed on to the GEDCOMInterpreter class and initialised person or family objects are returned to the user.

Author:
Vegard Brox

Variable Index

 o BIRTH
GEDCOM code for birth
 o BURIAL
GEDCOM code for burial
 o CFAMILY
GEDCOM code for family where this person was child
 o CHILD
GEDCOM code for child
 o CHRISTENING
GEDCOM code for christening
 o DATE
GEDCOM code for date
 o DEATH
GEDCOM code for death
 o FAMILY
GEDCOM code for family
 o HUSBAND
GEDCOM code for husband
 o INDIVIDUAL
GEDCOM code for individual
 o MARRIAGE
GEDCOM code for marriage
 o SEX
GEDCOM code for sex
 o SFAMILY
GEDCOM code for family where this person was spouse
 o TRAILER
GEDCOM code for trailer (end of file)
 o WIFE
GEDCOM code for wife

Constructor Index

 o GEDCOMLocater(File)
Constructor that prepares for reading from the specified file.

Method Index

 o getElementType(String)
Finds the element type from a line of GEDCOM code.
 o nextFamily()
Reads information for the next family in the GEDCOM file and returns it as a family object.
 o nextPerson()
Reads information for the next person in the GEDCOM file and returns it as a person object.

Variables

 o INDIVIDUAL
 public static final String INDIVIDUAL
GEDCOM code for individual

 o FAMILY
 public static final String FAMILY
GEDCOM code for family

 o BIRTH
 public static final String BIRTH
GEDCOM code for birth

 o DEATH
 public static final String DEATH
GEDCOM code for death

 o CHRISTENING
 public static final String CHRISTENING
GEDCOM code for christening

 o BURIAL
 public static final String BURIAL
GEDCOM code for burial

 o SEX
 public static final String SEX
GEDCOM code for sex

 o DATE
 public static final String DATE
GEDCOM code for date

 o CFAMILY
 public static final String CFAMILY
GEDCOM code for family where this person was child

 o SFAMILY
 public static final String SFAMILY
GEDCOM code for family where this person was spouse

 o HUSBAND
 public static final String HUSBAND
GEDCOM code for husband

 o WIFE
 public static final String WIFE
GEDCOM code for wife

 o CHILD
 public static final String CHILD
GEDCOM code for child

 o MARRIAGE
 public static final String MARRIAGE
GEDCOM code for marriage

 o TRAILER
 public static final String TRAILER
GEDCOM code for trailer (end of file)

Constructors

 o GEDCOMLocater
 public GEDCOMLocater(File file) throws FileNotFoundException
Constructor that prepares for reading from the specified file.

Parameters:
file - The GEDCOM file to read from
Throws: FileNotFoundException
If the specified file could not be found

Methods

 o nextPerson
 public Person nextPerson()
Reads information for the next person in the GEDCOM file and returns it as a person object. If no more persons exist, null is returned.

Returns:
A person object for the next individual in the file
 o nextFamily
 public Family nextFamily()
Reads information for the next family in the GEDCOM file and returns it as a family object. If no more families exist, null is returned.

Returns:
A family object for the next family in the file
 o getElementType
 public static String getElementType(String line)
Finds the element type from a line of GEDCOM code. The element type is e.g. birth, death, wife, child.

Parameters:
line - The line of GEDCOM code
Returns:
The element type for this line, or an empty string if no element type could be found