Crops.java [src/java/m/ipat] 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 m.ipat;
import csip.ServiceException;
import data.table.Table;
import data.table.column.ColumnDouble;
import data.table.column.ColumnInteger;
import data.table.column.ColumnString;
import java.util.ArrayList;
import java.util.Arrays;
import utils.EvalResult;
/**
*
* @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
*/
public class Crops extends Table {
public static final String CROP_ID = "crop_id";
public static final String CRLMOD_CROP_ID = "crlmod_crop_id";
public static final String CROP_NAME = "crop_name";
public static final String APPLIATION_DEPTH = "application_depth";
//Calculated
public static final String WATER_REQUIREMENT = "water_requirement";
public static final String WATER_USE = "water_use";
public Crops() {
addDataColumn(CROP_ID, new ColumnInteger(CROP_ID, ""));
addDataColumn(CRLMOD_CROP_ID, new ColumnInteger(CRLMOD_CROP_ID, ""));
addDataColumn(CROP_NAME, new ColumnString(CROP_NAME, ""));
addDataColumn(APPLIATION_DEPTH, new ColumnInteger(APPLIATION_DEPTH, ""));
addDataColumn(WATER_REQUIREMENT, new ColumnDouble(WATER_REQUIREMENT, ""));
addDataColumn(WATER_USE, new ColumnDouble(WATER_USE, ""));
setRequiredColumns(new ArrayList<>(Arrays.asList(
CRLMOD_CROP_ID, CROP_NAME, APPLIATION_DEPTH
)));
}
}