
/**
 * DyeSpectra.java
 * This defines a DyeSpectra objects.
 * Created: May 30, 2006
 *
 * @author Nathan Stevens
 * @version 0.1 6/15/2006
 */
import java.util.*;
import java.io.*;

public class DyeSpectra implements Serializable, Comparable {
  private SpectraData abs; // absorption data
  private SpectraData ems; // emission data
  private String name = null; // the name of this object
  private float QY = 0.0f; // the quantum yield
  private float EC = 1.0f; // the extintion coefficient
  private float lifetime = 1.0f; // lifetimie
  private String lifetime_unit = "picosecond"; // lifetime units
  private String notes = null; // the notes
  
  // default constructor
  public DyeSpectra() { }
  
  // the main constructor
  public DyeSpectra(String name, SpectraData abs, SpectraData ems) {
    this.name = name;
    this.abs = abs;
    this.ems = ems;
  }
  
  // Antoher constructor method
  public DyeSpectra(String name, SpectraData abs, SpectraData ems, float EC, float QY) {
    this.name = name;
    this.abs = abs;
    this.ems = ems;
    this.EC = EC;
    this.QY = QY;
  }
  
  // Method to return the name
  public String getName() {
    return name;
  }
  
  // Method to set the name
  public void setName(String name) {
    this.name = name;
    abs.setName(name);
    ems.setName(name);
  }
  
  // Method to return the absorption spectra
  public SpectraData getAbsorption() {
    return abs;
  }
  
  // Method to set the absorption spectra
  public void setAbsorption(SpectraData abs) {
    this.abs = abs;
  }
  
  // Method to return the emission spectra
  public SpectraData getEmission() {
    return ems;
  }
  
  // Method to set the emission spectra
  public void setEmission(SpectraData ems) {
    this.ems = ems;
  }
  
  // Method to return the QY
  public float getQY() {
    return QY;
  }
  
  // Method to set the QY
  public void setQY(float QY) {
    this.QY = QY;
  }
  
  // Method to return the EC
  public float getEC() {
    return EC;
  }
  
  // Method to set the EC
  public void setEC(float EC) {
    this.EC = EC;
  }
  
  // Method to return the lifetime
  public float getLifetime() {
    return lifetime;
  }
  
  // Method to set the lifetime
  public void setLifetime(float lifetime) {
    this.lifetime = lifetime;
  }
  
  // Method to set the lifetime units
  public String getLifetimeUnit() {
    return lifetime_unit;
  }
  
  // Method to set the lifetime
  public void setLifetimeUnit(String lifetime_unit) {
    this.lifetime_unit = lifetime_unit;
  }
  
  // Method to set a note
  public String getNotes() {
    return notes;
  }
  
  // Method to set the lifetime
  public void setNotes(String notes) {
    this.notes = notes;
  }
  
  // Method to compare with another dye spectra
  public int compareTo(Object object) {
    return name.compareTo(object.toString());
  }
  // Method to return the name
  public String toString() {
    return name;
  }
}//--end class DyeSpectra
