public class Family extends Marriage implements java.io.Serializable, Locatable
Individual
s.Marriage.BirthGroup
Modifier and Type | Field and Description |
---|---|
int |
serialNmbr
A unique, system-assigned ID for this family unit.
|
java.util.ArrayList<java.lang.String> |
specialItems |
Constructor and Description |
---|
Family()
Constructor with 0 arguments: for use ONLY by Serialization.
|
Family(Context ctxt,
boolean newFam)
Constructor with a context and a boolean: for use by birth-family-creation screen.
|
Family(Context ctxt,
Individual person1,
Individual person2)
Constructor with a context & the 2 persons who are married.
|
Family(Individual person1)
Constructor provided for un-remembered, long-ago partners OR generic parents.
|
Family(Individual person1,
Individual person2,
java.lang.String date)
Constructor with 3 arguments: the persons who are married & date of marriage.
|
Family(java.awt.Point loc) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Individual kid)
Add the Individual
kid as a child of this Family. |
void |
addChild2(Individual kid)
Add the Individual
kid as a child of this Family. |
void |
addNote(java.lang.String not)
Append the String
not to the 'comment' field for this Family. |
void |
addParent(Individual mate)
Add the Individual
mate as a parent in this Family. |
void |
checkFamDOBs()
Set dates of birth for all family members, if possible, via internal consistency checks.
|
void |
computeBirthGrps()
To allow for multiple births (whose descent lines should all drop from a common point) we maintain "birth groups".
|
void |
delete()
Delete this Family.
|
void |
deleteChild(Individual kid)
Delete the Individual
kid as a child of this Family. |
void |
deleteSpouse(Individual mate)
Remove the Individual
mate as a parent in this Family. |
void |
exportGEDCOM(java.io.PrintWriter out)
Write out one Family record in GEDCOM 5.5 format.
|
java.util.ArrayList<ParserGEDCOM.GEDCOMitem> |
findKidsInGEDCOM() |
void |
generateMarriageDate()
Generate a
marriageDate for this family based on the ages of the husband and wife
and the dates of any prior marriages, childbirths, divorces & widowhoods. |
java.lang.String |
getDivorceDate() |
java.lang.String |
getDivorceDD() |
java.lang.String |
getDivorceMM() |
java.lang.String |
getDivorceYr() |
java.lang.String |
getHomeChart() |
ParserGEDCOM.GEDCOMitem |
getItem(java.lang.String key,
java.util.TreeMap<java.lang.String,ParserGEDCOM.GEDCOMitem> tree) |
java.lang.String |
getMarriageDate() |
java.lang.String |
getMarriageDD() |
java.lang.String |
getMarriageMM() |
java.lang.String |
getMarriageYr() |
int |
getSerialNmbr() |
boolean |
hasDivorceDate() |
boolean |
hasNoDivorceDate() |
static java.util.ArrayList<java.lang.Object> |
listMinus(java.util.ArrayList<java.lang.Object> list,
java.lang.Object element)
Return an ArrayList
|
static java.lang.String |
newDOB(java.lang.String dadDOB,
int offset,
Individual recipient)
For use in constructing hypotheticals: return a date-of-birth (yyyy-mm-dd) for
recipient . |
void |
setDivorceDate(java.lang.String date) |
void |
setMarriageDate(java.lang.String date)
Make the
marriageDate of this family date . |
boolean |
subForDummyParent(Individual parent)
If we can substitute
parent for one of the spouses in this family (who
has no ties to the outside world) then do the switch and return 'true'. |
java.lang.String |
toSILKString()
This method builds a string that represents a family in a SILKin data (_.silk) file.
|
java.lang.String |
toString()
Create a String with summary information about the Family.
|
void |
updateFrom(Family newRec)
Update data for this Family from later information.
|
addSib, addSpouse, bounds, delMarriage, delSib, delSpouse, deltaMove, divorced, drawLines, drawSibLines, drawSpouseLines, drawSymbol, drawSymbol, eligibleSpouse, getLocation, getLocationX, getLocationY, getSibset, getSize, getSpouses, hasBegun, hasEnded, isSib, isSpouse, isSpouse, lineageDeltaMove, readXML, setLocation, setLocation, setLocationX, setLocationY, setSibset, setSize, setSpouses, unionsToXML, unionToXML
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
bounds, getLocation, getLocationX, getLocationY, setLocation, setLocation, setLocationX, setLocationY
public int serialNmbr
public java.util.ArrayList<java.lang.String> specialItems
public Family()
public Family(java.awt.Point loc)
public Family(Context ctxt, boolean newFam)
public Family(Context ctxt, Individual person1, Individual person2)
ctxt
- the context (society) in which the marriage is to be placedperson1
- one person in the marriageperson2
- the other onepublic Family(Individual person1, Individual person2, java.lang.String date)
person1
- person2
- date
- String: the date as we want it to appear in marriageDate
public Family(Individual person1)
person1
- public int getSerialNmbr()
getSerialNmbr
in interface Locatable
public java.lang.String getHomeChart()
getHomeChart
in interface Locatable
public java.lang.String getMarriageYr()
public java.lang.String getMarriageMM()
public java.lang.String getMarriageDD()
public java.lang.String getMarriageDate()
public java.lang.String getDivorceYr()
public java.lang.String getDivorceMM()
public java.lang.String getDivorceDD()
public java.lang.String getDivorceDate()
public boolean hasDivorceDate()
public boolean hasNoDivorceDate()
public void setMarriageDate(java.lang.String date)
marriageDate
of this family date
.date
- Example: '2003-06-10'public void setDivorceDate(java.lang.String date)
public static java.lang.String newDOB(java.lang.String dadDOB, int offset, Individual recipient)
recipient
.
Starting year is father's birth year plus 20 years plus offset
.
However, yyyy is increased by offset
(age is reduced)
if that birth year will collide with the birth year of a sibling of recipient
; adjust by as
many years as it takes to avoid collisions, in the direction of offset
.dadDOB
- date of birth of father of recipient
offset
- number of years to add to a birthyear to avoid collisions with sibling birth yearsrecipient
- person whose birth year is being constructedpublic static java.util.ArrayList<java.lang.Object> listMinus(java.util.ArrayList<java.lang.Object> list, java.lang.Object element)
public void updateFrom(Family newRec)
newRec
- a Family with later data.public void generateMarriageDate()
marriageDate
for this family based on the ages of the husband and wife
and the dates of any prior marriages, childbirths, divorces & widowhoods.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toSILKString() throws KSDateParseException
KSDateParseException
public void addNote(java.lang.String not)
not
to the 'comment' field for this Family.not
- the String to be added.public ParserGEDCOM.GEDCOMitem getItem(java.lang.String key, java.util.TreeMap<java.lang.String,ParserGEDCOM.GEDCOMitem> tree)
public java.util.ArrayList<ParserGEDCOM.GEDCOMitem> findKidsInGEDCOM()
public void checkFamDOBs()
public void addParent(Individual mate) throws KSInternalErrorException
mate
as a parent in this Family.mate
- Individual to be added.KSInternalErrorException
public void deleteSpouse(Individual mate) throws KSInternalErrorException
mate
as a parent in this Family.mate
- Individual to be deleted.KSInternalErrorException
public void addChild(Individual kid)
kid
as a child of this Family.kid
- Individual to be added.public void addChild2(Individual kid)
kid
as a child of this Family.
But do not alter the data change date. (for use in parsing)kid
- Individual to be added.public void computeBirthGrps()
public void deleteChild(Individual kid) throws KSInternalErrorException
kid
as a child of this Family.kid
- Individual to be dropped.KSInternalErrorException
public void delete()
public boolean subForDummyParent(Individual parent)
parent
for one of the spouses in this family (who
has no ties to the outside world) then do the switch and return 'true'.
Used only for Example-Generation.parent
- Individual we'd like to inject into this family.public void exportGEDCOM(java.io.PrintWriter out)
Record will contain:
out
- a PrintWriter to write to.