jimmc.roots
Class RootsPerson

java.lang.Object
  |
  +--jimmc.roots.RootsRecord
        |
        +--jimmc.roots.RootsPerson

public class RootsPerson
extends RootsRecord

RootsPerson represents one individual.


Fields inherited from class jimmc.roots.RootsRecord
base, comment, editDate, key, keyComment, note1, note2, note2d, sources, sourceString
 
Constructor Summary
RootsPerson(RootsBase base)
           
 
Method Summary
protected  boolean addNcv(Ncv nv)
           
 boolean fieldMatches(java.lang.String fieldName, java.lang.String pattern)
          Return true if the specified field matches the given pattern.
static RootsPerson[] FindRecordList(RootsBase base, java.lang.String s)
           
 RootsRecord[] findReference(java.lang.String what)
          Find the specified reference relative to this record.
 java.lang.String formatBrief(PrintOptions po)
          Format a brief listing of the record
 java.lang.String formatFamily(PrintOptions po)
          Return a string with the family name and an underline.
protected  void formatGedcomBody(java.lang.StringBuffer sb, int level)
          Format the body of a Gedcom record
protected  void formatGedcomKey(java.lang.StringBuffer sb, int level)
          Format the key line for a Gedcom record.
 java.lang.String formatName()
           
 void formatName(java.lang.StringBuffer sb)
           
 void formatNcvBody(java.lang.StringBuffer sb)
          Print out the body of a person record
 java.lang.String formatNcvType()
          Format the type of this record; subclass must override
 java.lang.String formatOneLine(PrintOptions po)
          Format a one-line summary.
protected  void layoutBox(Layout layout, PrintOptions po, java.lang.String markKey)
          Fill in the layout for a ctree for just this record.
 void layoutCtree(Layout layout, PrintOptions po)
          Fill in the layout with information for a ctree for this record plus other required for the ctree layout.
protected  void link()
          Fix up the links in a record that point to another record.
protected  void parseDates()
          Check and parse any dates in this record into individual fields.
static RootsPerson ParseNcvLines(RootsBase base, java.lang.String[] lines)
           
 void println(java.lang.String s)
          Print a line of text to the output stream associated with our base.
 
Methods inherited from class jimmc.roots.RootsRecord
asArray, findListReference, formatGedcom, formatGedcomEvent, formatGedcomItem, formatGedcomKey, formatGedcomReference, formatKey, formatKey, formatKeyLine, formatLabeledItem, formatLabeledItem, formatLabeledItems, formatLabeledItems, formatMedium, formatMultiLine, formatNcv, formatNcvItem, formatNote1, layoutBoxReference, parseDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootsPerson

public RootsPerson(RootsBase base)
Method Detail

ParseNcvLines

public static RootsPerson ParseNcvLines(RootsBase base,
                                        java.lang.String[] lines)

addNcv

protected boolean addNcv(Ncv nv)
Overrides:
addNcv in class RootsRecord

link

protected void link()
Description copied from class: RootsRecord
Fix up the links in a record that point to another record.
Overrides:
link in class RootsRecord

parseDates

protected void parseDates()
Description copied from class: RootsRecord
Check and parse any dates in this record into individual fields.
Overrides:
parseDates in class RootsRecord

FindRecordList

public static RootsPerson[] FindRecordList(RootsBase base,
                                           java.lang.String s)

formatGedcomKey

protected void formatGedcomKey(java.lang.StringBuffer sb,
                               int level)
Format the key line for a Gedcom record.
Overrides:
formatGedcomKey in class RootsRecord

formatGedcomBody

protected void formatGedcomBody(java.lang.StringBuffer sb,
                                int level)
Format the body of a Gedcom record
Overrides:
formatGedcomBody in class RootsRecord

formatNcvType

public java.lang.String formatNcvType()
Description copied from class: RootsRecord
Format the type of this record; subclass must override
Overrides:
formatNcvType in class RootsRecord

formatNcvBody

public void formatNcvBody(java.lang.StringBuffer sb)
Print out the body of a person record
Overrides:
formatNcvBody in class RootsRecord

formatOneLine

public java.lang.String formatOneLine(PrintOptions po)
Description copied from class: RootsRecord
Format a one-line summary.
Overrides:
formatOneLine in class RootsRecord

formatBrief

public java.lang.String formatBrief(PrintOptions po)
Description copied from class: RootsRecord
Format a brief listing of the record
Overrides:
formatBrief in class RootsRecord

formatName

public java.lang.String formatName()

formatName

public void formatName(java.lang.StringBuffer sb)

formatFamily

public java.lang.String formatFamily(PrintOptions po)
Return a string with the family name and an underline.

layoutCtree

public void layoutCtree(Layout layout,
                        PrintOptions po)
Fill in the layout with information for a ctree for this record plus other required for the ctree layout.
Overrides:
layoutCtree in class RootsRecord

layoutBox

protected void layoutBox(Layout layout,
                         PrintOptions po,
                         java.lang.String markKey)
Fill in the layout for a ctree for just this record.
Overrides:
layoutBox in class RootsRecord

findReference

public RootsRecord[] findReference(java.lang.String what)
Find the specified reference relative to this record.
Overrides:
findReference in class RootsRecord
Parameters:
what - Relative reference name:
  • parentunion or punion
  • parents - father and mother
  • father
  • mother
  • address
  • marriage
  • union - same as marriage
  • husband - all husbands
  • wife - all wives
  • children or child - all children
  • marriageN, unionN, husbandN, wifeN - the Nth marriage or spouse, where N starts at 0.
  • childN or childrenN - the Nth child from every union, where N starts at 0.

fieldMatches

public boolean fieldMatches(java.lang.String fieldName,
                            java.lang.String pattern)
Return true if the specified field matches the given pattern.
Overrides:
fieldMatches in class RootsRecord
Parameters:
fieldName - the name of the field to match
  • "name" to match the full name against the pattern.
  • "place" to match the name of any locations (birth, death, etc) against the pattern.
pattern - the pattern to match against.

println

public void println(java.lang.String s)
Description copied from class: RootsRecord
Print a line of text to the output stream associated with our base.
Overrides:
println in class RootsRecord