TableLegend.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;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author scase
*/
public class TableLegend extends Table {
public static final String TABLE_NAME = "legend";
//Table Column Names
public static final String AREA_TYPE_NAME = "areatypename";
public static final String AREASYMBOL_NAME = "areasymbol";
public static final String AREA_NAME = "areaname";
public static final String AREA_ACRES = "areaacres";
public static final String MLRA_OFFICE = "mlraoffice";
public static final String LEGEND_DESC = "legenddesc";
public static final String SSA_STATUS = "ssastatus";
public static final String MOU_AGENCY_RESP = "mouagncyresp";
public static final String PROJECT_SCALE = "projectscale";
public static final String COR_DATE = "cordate";
public static final String SSURGO_ARCHIVED = "ssurgoarchived";
public static final String LEGEND_SUIT_USE_PUBLIC = "legendsuitusepublic";
public static final String LEGEND_CERT_STAT = "legendcertstat";
public static final String LKEY_NAME = "lkey";
public static final String TABULAR_VERSION = "tabularversion";
//Table Column Details
private static final String[] AREA_TYPENAME_DATA = {AREA_TYPE_NAME, "The name of a particular type of area. Area type names include \"state\", \"county\", \"mlra\", etc."};
private static final String[] AREASYMBOL = {AREASYMBOL_NAME, "A symbol that uniquely identifies a single occurrence of a particular type of area (e.g. Lancaster Co., Nebraska is NE109)"};
private static final String[] AREA_NAME_DATA = {AREA_NAME, "The name given to the specified geographic area."};
private static final String[] AREA_ACRES_DATA = {AREA_ACRES, "The acreage total of all land and water areas in the specified geographic area."};
private static final String[] MLRA_OFFICE_DATA = {MLRA_OFFICE, "An NRCS business unit responsible for oversight of soil survey production activities of a particular soil survey area."};
private static final String[] LEGEND_DESC_DATA = {LEGEND_DESC, "A short text field used to describe a particular soil survey area legend."};
private static final String[] SSA_STATUS_DATA = {SSA_STATUS, "Identifies the operational activity of a soil survey area and currency of published soil information. Examples are Non-Project, Update and Published."};
private static final String[] MOU_AGENCY_RESP_DATA = {MOU_AGENCY_RESP, "The lead agency designated as responsible for a particular soil survey."};
private static final String[] PROJECT_SCALE_DATA = {PROJECT_SCALE, "The map scale in which the final map products will be published, expressed as the denominator of the scale, i.e. 24000 = 1:24000."};
private static final String[] COR_DATE_DATA = {COR_DATE, "The date the final correlation document for a soil survey is signed, expressed as month, year (e.g. 07/1999)."};
private static final String[] SSURGO_ARCHIVED_DATA = {SSURGO_ARCHIVED, "The date on which the SSURGO product for a particular soil survey is actually archived, expressed as month, day, year -- xx/xx/xxxx."};
private static final String[] LEGEND_SUIT_USE_PUBLIC_DATA = {LEGEND_SUIT_USE_PUBLIC, "Identifies the relative geographic extent over which a legend has the most up-to-date soil survey data."};
private static final String[] LEGEND_CERT_STAT_DATA = {LEGEND_CERT_STAT, "The level of certification assigned to a legend. Intended to indicate whether or not the legend should be used and the degree of confidence with which it may be used."};
private static final String[] LKEY_NAME_DATA = {LKEY_NAME, "A non-connotative string of characters used to uniquely identify a record in the Legend table."};
private static final String[] TABULAR_VERSION_DATA = {TABULAR_VERSION, "A sequential integer number used to denote the serial version of the tabular data for a soil survey area."};
/**
* This ArrayList contains a static list of columns for this table that are
* required regardless of the calling program's preferences. This columns
* typically identify indexes and foreign keys and other relational aspects
* of a table that must be maintained for data integrity.
*
* @see Table#getMandatoryColumns()
* @see #getMandatoryColumns()
*/
protected static ArrayList<String> MANDATORY_COLUMNS = new ArrayList<String>(Arrays.asList(LKEY_NAME));
/**
* Constructor
*/
public TableLegend() {
tableName = TABLE_NAME;
addDataColumn(AREA_TYPE_NAME, new TableColumnString(AREA_TYPENAME_DATA));
addDataColumn(AREASYMBOL_NAME, new TableColumnString(AREASYMBOL));
addDataColumn(AREA_NAME, new TableColumnString(AREA_NAME_DATA));
addDataColumn(AREA_ACRES, new TableColumnDouble(AREA_ACRES_DATA));
addDataColumn(MLRA_OFFICE, new TableColumnString(MLRA_OFFICE_DATA));
addDataColumn(LEGEND_DESC, new TableColumnString(LEGEND_DESC_DATA));
addDataColumn(SSA_STATUS, new TableColumnString(SSA_STATUS_DATA));
addDataColumn(MOU_AGENCY_RESP, new TableColumnString(MOU_AGENCY_RESP_DATA));
addDataColumn(PROJECT_SCALE, new TableColumnInteger(PROJECT_SCALE_DATA));
addDataColumn(COR_DATE, new TableColumnDate(COR_DATE_DATA));
addDataColumn(SSURGO_ARCHIVED, new TableColumnDate(SSURGO_ARCHIVED_DATA));
addDataColumn(LEGEND_SUIT_USE_PUBLIC, new TableColumnString(LEGEND_SUIT_USE_PUBLIC_DATA));
addDataColumn(LEGEND_CERT_STAT, new TableColumnString(LEGEND_CERT_STAT_DATA));
addDataColumn(LKEY_NAME, new TableColumnInteger(LKEY_NAME_DATA));
addDataColumn(TABULAR_VERSION, new TableColumnInteger(TABULAR_VERSION_DATA));
}
@Override
protected ArrayList<String> getMandatoryColumns() {
return MANDATORY_COLUMNS;
}
/**
*
* @return
*/
public String areaname() {
return ((String) columns.get(AREA_NAME).getValue());
}
/**
*
* @param value
*/
public void areaname(String value) {
columns.get(AREA_NAME).setValue(value);
}
/**
*
* @return
*/
public String areatypename() {
return ((String) columns.get(AREA_TYPE_NAME).getValue());
}
/**
*
* @param value
*/
public void areatypename(String value) {
columns.get(AREA_TYPE_NAME).setValue(value);
}
/**
*
* @return
*/
public String areasymbol() {
return ((String) columns.get(AREASYMBOL).getValue());
}
/**
*
* @param value
*/
public void areasymbol(String value) {
columns.get(AREASYMBOL).setValue(value);
}
/**
*
* @return
*/
public double areaacres() {
return ((double) columns.get(AREA_ACRES).getValue());
}
/**
*
* @param value
*/
public void areaacres(double value) {
columns.get(AREA_ACRES).setValue(value);
}
/**
*
* @return
*/
public String mlraoffice() {
return ((String) columns.get(MLRA_OFFICE).getValue());
}
/**
*
* @param value
*/
public void mlraoffice(String value) {
columns.get(MLRA_OFFICE).setValue(value);
}
/**
*
* @return
*/
public String legenddesc() {
return ((String) columns.get(LEGEND_DESC).getValue());
}
/**
*
* @param value
*/
public void legenddesc(String value) {
columns.get(LEGEND_DESC).setValue(value);
}
/**
*
* @return
*/
public String ssastatus() {
return ((String) columns.get(SSA_STATUS).getValue());
}
/**
*
* @param value
*/
public void ssastatus(String value) {
columns.get(LEGEND_DESC).setValue(value);
}
/**
*
* @return
*/
public String mouagencyresp() {
return ((String) columns.get(MOU_AGENCY_RESP).getValue());
}
/**
*
* @param value
*/
public void mouagencyresp(String value) {
columns.get(MOU_AGENCY_RESP).setValue(value);
}
/**
*
* @return
*/
public int projectscale() {
return ((int) columns.get(PROJECT_SCALE).getValue());
}
/**
*
* @param value
*/
public void projectscale(int value) {
columns.get(PROJECT_SCALE).setValue(value);
}
/**
*
* @return
*/
public LocalDate cordate() {
return ((LocalDate) columns.get(COR_DATE).getValue());
}
/**
*
* @param value
*/
public void cordate(LocalDate value) {
columns.get(COR_DATE).setValue(value);
}
/**
*
* @return
*/
public LocalDate ssurgoarchived() {
return ((LocalDate) columns.get(SSURGO_ARCHIVED).getValue());
}
/**
*
* @param value
*/
public void ssurgoarchived(LocalDate value) {
columns.get(SSURGO_ARCHIVED).setValue(value);
}
/**
*
* @return
*/
public String legendsuitusepublic() {
return ((String) columns.get(LEGEND_SUIT_USE_PUBLIC).getValue());
}
/**
*
* @param value
*/
public void legendsuitusepublic(String value) {
columns.get(LEGEND_SUIT_USE_PUBLIC).setValue(value);
}
/**
*
* @return
*/
public String legendcertstat() {
return ((String) columns.get(LEGEND_CERT_STAT).getValue());
}
/**
*
* @param value
*/
public void legendcertstat(String value) {
columns.get(LEGEND_CERT_STAT).setValue(value);
}
/**
*
* @return
*/
public int lkey() {
return ((int) columns.get(LKEY_NAME).getValue());
}
/**
*
* @param value
*/
public void lkey(int value) {
columns.get(LKEY_NAME).setValue(value);
}
/**
*
* @return
*/
public int tabularversion() {
return ((int) columns.get(TABULAR_VERSION).getValue());
}
/**
*
* @param value
*/
public void tabularversion(int value) {
columns.get(TABULAR_VERSION).setValue(value);
}
}