public class ParserGEDCOM
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ParserGEDCOM.AdoptionRecords
This inner class is just a convenience for recording adoptions in a GEDCOM
file.
|
static class |
ParserGEDCOM.GEDCOMitem
In the GEDCOM 5.5 protocol, dozens of specialized data may be recorded
in XML-style blocks; because these have no value to SILKin, they are
simply stored as a
GEDCOMitem and held until the file is
written out in GEDCOM format. |
Constructor and Description |
---|
ParserGEDCOM(Context myCtxt)
Alternate constructor used to make the Layout Algorithm available
to other classes.
|
ParserGEDCOM(TokenizerGEDCOM tok)
Standard constructor for parsing a GEDCOM file
|
Modifier and Type | Method and Description |
---|---|
void |
assignChartAndLevel()
This method is the first step in the LAYOUT ALGORITHM FOR GEDCOM IMPORTS.
|
void |
error(java.lang.String msgOut)
Assemble information about a parsing error encountered, then throw a
KSParsingErrorException . |
void |
expandToGridUnits(java.util.TreeMap<java.lang.String,java.lang.Integer> tmap)
This method is used only by a LibBrowser to place horizontal spacing
on a chart of generated examples.
|
ParserGEDCOM.GEDCOMitem |
getItem(java.lang.String key,
java.util.TreeMap<java.lang.String,ParserGEDCOM.GEDCOMitem> tree) |
int |
getSerial(java.lang.String ref) |
void |
parseBody() |
void |
parseFAM(Family fam) |
void |
parseFamily(Family fam) |
void |
parseFile(java.io.File f)
Create a new context to hold this data, do basic validity checks on the
file's contents, then parse the data in 2 passes.
|
void |
parseHeader() |
void |
parseINDI(Individual ind) |
void |
parseIndividual(Individual ind) |
void |
parseSecondPass() |
void |
processChartRows()
This method is called when people and families have been created for this
context and we want to determine the horizontal order of each row in a
family tree chart.
|
ParserGEDCOM.GEDCOMitem |
readLine() |
public ParserGEDCOM(TokenizerGEDCOM tok)
public ParserGEDCOM(Context myCtxt)
public void error(java.lang.String msgOut) throws KSParsingErrorException
KSParsingErrorException
.msgOut
- a String describing the exact error found.a
- KSParsingErrorException
.KSParsingErrorException
public void parseFile(java.io.File f) throws KSParsingErrorException
f
- the file containing GEDCOM format dataKSParsingErrorException
public void parseHeader() throws KSParsingErrorException
KSParsingErrorException
public void parseBody() throws KSParsingErrorException
KSParsingErrorException
public void parseINDI(Individual ind) throws KSParsingErrorException
KSParsingErrorException
public void parseFAM(Family fam) throws KSParsingErrorException
KSParsingErrorException
public void parseSecondPass() throws KSParsingErrorException
KSParsingErrorException
public void parseIndividual(Individual ind) throws KSParsingErrorException
KSParsingErrorException
public ParserGEDCOM.GEDCOMitem getItem(java.lang.String key, java.util.TreeMap<java.lang.String,ParserGEDCOM.GEDCOMitem> tree)
public void parseFamily(Family fam) throws KSParsingErrorException
KSParsingErrorException
public ParserGEDCOM.GEDCOMitem readLine() throws KSParsingErrorException
KSParsingErrorException
public int getSerial(java.lang.String ref) throws KSParsingErrorException
KSParsingErrorException
public void assignChartAndLevel()
public void processChartRows()
assignChartAndLevel
has
been completed.insertFamSymbols
.insertFamsWithLinks
.assignHorizontalPositions
.public void expandToGridUnits(java.util.TreeMap<java.lang.String,java.lang.Integer> tmap)
tmap
- A map from chartID to an Integer = horizontal spacer.