jimmc.roots
Class RootsUnion

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

public class RootsUnion
extends RootsRecord

RootsUnion represents a marriage or other pairing.


Fields inherited from class jimmc.roots.RootsRecord
base, comment, editDate, key, keyComment, note1, note2, note2d, sources, sourceString
 
Constructor Summary
RootsUnion(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 RootsUnion[] FindRecordList(RootsBase base, java.lang.String s)
           
 RootsRecord[] findReference(java.lang.String what)
          Find a referenced record.
 java.lang.String formatBrief(PrintOptions po)
          Format a brief listing of the record
 java.lang.String formatBriefBody()
           
 void formatBriefBody(java.lang.StringBuffer sb)
           
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.
 void formatNcvBody(java.lang.StringBuffer sb)
          Format the remainder of this 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 information for a ctree.
 void layoutCtree(Layout layout, PrintOptions po)
          Fill in the layout information for a ctree, including all other boxes 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 RootsUnion ParseNcvLines(RootsBase base, java.lang.String[] lines)
           
 void println(java.lang.String s)
          Print a line to the default output.
 
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

RootsUnion

public RootsUnion(RootsBase base)
Method Detail

ParseNcvLines

public static RootsUnion 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 RootsUnion[] 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)
Description copied from class: RootsRecord
Format the remainder of this 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

formatBriefBody

public java.lang.String formatBriefBody()

formatBriefBody

public void formatBriefBody(java.lang.StringBuffer sb)

layoutCtree

public void layoutCtree(Layout layout,
                        PrintOptions po)
Fill in the layout information for a ctree, including all other boxes 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 information for a ctree.
Overrides:
layoutBox in class RootsRecord
Parameters:
layout - The layout to which we add our box or boxes.
po - Options.
markKey - Put a marker by the record with this key. This can be either this union or a child.

findReference

public RootsRecord[] findReference(java.lang.String what)
Description copied from class: RootsRecord
Find a referenced record.
Overrides:
findReference in class RootsRecord
Following copied from class: jimmc.roots.RootsRecord
Parameters:
what - the name of the reference item to follow
Returns:
the referenced record, or null if not found

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
  • "place" to match the name of any locations (marriage, marriageEnd) against the pattern.
pattern - the pattern to match against.

println

public void println(java.lang.String s)
Print a line to the default output.
Overrides:
println in class RootsRecord