edu.upenn.crimson
Class Partition

java.lang.Object
  extended by edu.upenn.crimson.Partition

public class Partition
extends java.lang.Object

Partition header info.

Version:
$Id: Partition.java,v 1.16 2007/05/16 18:55:58 fisher Exp $

Field Summary
private  java.lang.String id
          This is a unique name for the partition object.
private  int length
          Total length of the partition's sequence.
private  java.lang.String modelID
          Model specific to this partition object.
private  java.lang.String notes
          Notes specific to this partition object.
private  java.lang.String treeID
          This is the tree structure for this partition.
 
Constructor Summary
Partition(java.lang.String id, Tree tree)
           
Partition(java.lang.String id, Tree tree, Model model, int length, java.lang.String notes)
           
 
Method Summary
 java.lang.String getID()
           
 int getLength()
           
 java.lang.String getModelID()
          Returns the ID for the model underlying this partition.
 java.lang.String getNotes()
           
 java.lang.String getTreeID()
          Get the ID for the tree containing this partition.
 void setModelID(Model model)
          Sets the ID for the model underlying this partition.
 void setNotes(java.lang.String notes)
          Updates the notes field in the partition object and the PARTITIONS table.
 java.lang.String toString()
          Returns Partition information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private java.lang.String id
This is a unique name for the partition object.


treeID

private java.lang.String treeID
This is the tree structure for this partition.


modelID

private java.lang.String modelID
Model specific to this partition object.


notes

private java.lang.String notes
Notes specific to this partition object.


length

private int length
Total length of the partition's sequence. This shouldn't be changed after the partition is created.

Constructor Detail

Partition

public Partition(java.lang.String id,
                 Tree tree)

Partition

public Partition(java.lang.String id,
                 Tree tree,
                 Model model,
                 int length,
                 java.lang.String notes)
          throws InvalidIDException
Throws:
InvalidIDException
Method Detail

getID

public java.lang.String getID()

getTreeID

public java.lang.String getTreeID()
Get the ID for the tree containing this partition.


setModelID

public void setModelID(Model model)
Sets the ID for the model underlying this partition. We require a model object rather than an ID, to make sure that the model really exists.


getModelID

public java.lang.String getModelID()
Returns the ID for the model underlying this partition.


setNotes

public void setNotes(java.lang.String notes)
Updates the notes field in the partition object and the PARTITIONS table.


getNotes

public java.lang.String getNotes()

getLength

public int getLength()

toString

public java.lang.String toString()
Returns Partition information.

Overrides:
toString in class java.lang.Object



Copyright 2006 Stephen Fisher, Susan Davidson, and Junhyong Kim, University of Pennsylvania.