jimmc.roots
Class SingleModel

java.lang.Object
  |
  +--jimmc.roots.SingleModel

public class SingleModel
extends java.lang.Object

A model for a single record from the database.


Field Summary
protected  RootsBase base
          Our base database.
protected  DatabaseModel db
          Our database model.
protected  java.lang.String key
          Our key.
protected  RootsRecord record
          Our record.
 
Constructor Summary
SingleModel(DatabaseModel db, java.lang.String key)
          Create a new model.
 
Method Summary
protected  void fillLayout(Layout layout)
          Debug - Fill in the layout with boxes.
 java.lang.String getDisplayCommand(java.lang.String format, boolean includeKeys)
          Get the command we use to generate the display info.
 java.lang.String getKey()
          Get the key for this model.
protected  Layout getOutputLayout(java.lang.String format, boolean includeKeys)
          Get the layout and route it.
 java.lang.String getOutputText(java.lang.String format, boolean includeKeys)
          Get the long text string based on format.
 java.lang.String[] getSelection(java.lang.String what)
          Get a selection relative to this selection.
 java.lang.String getSummary()
          Get the summary line to display for this model.
protected  java.lang.String getTreeparText(java.lang.String format, boolean includeKeys)
          Get the text dump of a treepar layout.
 java.lang.String getType()
          Get the type for this model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected DatabaseModel db
Our database model.

key

protected java.lang.String key
Our key.

base

protected RootsBase base
Our base database.

record

protected RootsRecord record
Our record.
Constructor Detail

SingleModel

public SingleModel(DatabaseModel db,
                   java.lang.String key)
Create a new model.
Method Detail

getSelection

public java.lang.String[] getSelection(java.lang.String what)
Get a selection relative to this selection.
Parameters:
what - the selction, such as father, mother, or children.

getKey

public java.lang.String getKey()
Get the key for this model.

getType

public java.lang.String getType()
Get the type for this model.

getSummary

public java.lang.String getSummary()
Get the summary line to display for this model.

getDisplayCommand

public java.lang.String getDisplayCommand(java.lang.String format,
                                          boolean includeKeys)
Get the command we use to generate the display info.

getOutputText

public java.lang.String getOutputText(java.lang.String format,
                                      boolean includeKeys)
Get the long text string based on format.

getTreeparText

protected java.lang.String getTreeparText(java.lang.String format,
                                          boolean includeKeys)
Get the text dump of a treepar layout.

getOutputLayout

protected Layout getOutputLayout(java.lang.String format,
                                 boolean includeKeys)
Get the layout and route it.

fillLayout

protected void fillLayout(Layout layout)
Debug - Fill in the layout with boxes.