TableHorizonCalculations.java [src/soils/db/tables] Revision: default  Date:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package soils.db.tables;

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
public class TableHorizonCalculations extends Table {

  public static final String FRAGVOL_R_NAME = "fragvol_r";
  public static final String LSFACT_NAME = "lsfact";
  public static final String DEPT_R_IN = "hzdept_r_in";
  public static final String DEPB_R_IN = "hzdepb_r_in";

  static final String[] FRAGVOL_R = {FRAGVOL_R_NAME, "Calculated for this horizon:  The volume percentage of the horizon occupied by the 2 mm or larger fraction (20 mm or larger for wood fragments), on a whole soil base.", "Percent", "%.2f"};
  static final String[] LSFACT = {LSFACT_NAME, "Calculated for this horizon:  Based on slopelenusle_r or Lightle-Weesie Slope Length and slope_r", null, "%.2f"};
  static final String[] DEPT_R_IN_DATA = {DEPT_R_IN, "Horizon depth top in inches", "Inches", "%.0f"};
  static final String[] DEPB_R_IN_DATA = {DEPB_R_IN, "Horizon depth bottom in inches", "Inches", "%.0f"};

  public TableHorizonCalculations() {
    addDataColumn(FRAGVOL_R_NAME, new TableColumnDouble(FRAGVOL_R));
    addDataColumn(LSFACT_NAME, new TableColumnDouble(LSFACT));
    addDataColumn(DEPT_R_IN, new TableColumnDouble(DEPT_R_IN_DATA));
    addDataColumn(DEPB_R_IN, new TableColumnDouble(DEPB_R_IN_DATA));
  }

  public double hzdepb_r_in() {
    return ((double) columns.get(DEPB_R_IN).getValue());
  }

  public void hzdepb_r_in(double value) {
    columns.get(DEPB_R_IN).setValue(value);
  }

  public double hzdept_r_in() {
    return ((double) columns.get(DEPT_R_IN).getValue());
  }

  public void hzdept_r_in(double value) {
    columns.get(DEPT_R_IN).setValue(value);
  }

  public double fragvol_r() {
    return ((double) columns.get(FRAGVOL_R_NAME).getValue());
  }

  public void fragvol_r(double value) {
    columns.get(FRAGVOL_R_NAME).setValue(value);
  }

  public double lsfact() {
    return ((double) columns.get(LSFACT_NAME).getValue());
  }

  public void lsfact(double value) {
    columns.get(LSFACT_NAME).setValue(value);
  }

}