DefaultConfigStorage.java [src/java/d/util] Revision: default Date:
/*
* $Id$
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API, and application suite.
*
* 2012-2017, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package d.util;
import static d.util.ConfigData.*;
import java.util.HashMap;
/**
*
* @author brad
*/
//special storage that has all the default values, sits at the bottom of the stack
public class DefaultConfigStorage extends ConfigStorage {
//@Override not going to implement this in the base class for now
protected void load(ConfigData cData) { // have to pass ConfigData now because DefaultConfigStorage is not in ConfigData anymore.
c_data = new HashMap<String, String>();
set(Units, Utils.SIUnits);
// set(OutputFreq, "2");
// set(windDecNum, "5");
//
// set(OPHydroDet, "0");
// set(OPSoilDet, "0");
// set(OPManageDet, "0");
// set(OPCropDet, "0");
// set(OPDecompDet, "0");
// set(OPErosionDet, "0");
//
// set(OPHydroDbg, "0");
// set(OPSoilDbg, "0");
// set(OPManageDbg, "0");
// set(OPCropDbg, "0");
// set(OPDecompDbg, "0");
// set(OPErosionDbg, "0");
//
// set(WinExe, "");
// set(WinCmd, "");
// set(WinData, "${weps.databases}/db/windgen/wind_gen_his_upper_US.wdb");
// set(WindgenInterpolationBoundaryFile, "${weps.databases}/db/windgen/interpolation_boundary.pol");
// set(CliExe, "");
// set(CliCmd, "");
// set(CliData, "${weps.databases}/db/cligen/US_cligen_stations.par");
// set(WepsExe, "");
// set(WepsCmd, "");
// set(CalWepsCmd, "");
// set(EmailSender, "");
// set(MailHost, "");
// set(CommentAddr, "");
// set(BugsAddr, "");
// set(ManTemp, "");
// set(ManTempSaveAs, "");
// set(ManSkel, "");
// set(CropDB, "");
// set(ManDB, "");
// set(SoilDB, "");
// set(SoilOrganicFile, "${weps.databases}/db/soil/NRCS Generic Soils/Organic Soil.ifc");
set(SoilMaxOrganicDepth, "101.6");
set(SoilTestOrganic, "1");
// set(ProjDir, "");
// set(MCREW, "mcrew_cfg");
// set(McrewDataConfigFile, "dataconfig.xml");
// set(TimeSteps, "24");
// set(WindFlag, "0");
// set(ClimateFlag, "0");
// set(SubDailyFlag, "0");
// set(DefaultRunMode, ConfigData.Cycle);
// set(TTInit, "2000"); // set to more reasonable defaults if not
// set(TTDismiss, "2000"); // set in cfg file (or cfg file is missing)
// set(ReadonlySlope, "1");
// set(ReadonlyRockFragments, "1");
//
// //Formats
// set(FormatOperationDate, "MMM dd, y");
//
// //Purge run files
// set(PurgeRunFilesFlg, "0");
// set(PurgeRunFiles, "win_gen.win:cli_gen.cli");
//
// //Default runs location template
// set(DefaultRunsLocationTemplate, "${PROJECT_DIRECTORY}");
//
// //Mcrew's skel translastion file
// set(SkelTranslationFile, "${weps.databases}/db/RUSLE2_Translation.txt");
//
// set(DoNotWarnAboutSystemLocale, "0");
//
// set(DoNotEstimateMissingSurgoValues, "0");
//
// set(UseDefaultMailClient, "0");
//
// set(DoNotReviewWarningsWhenRestoringRun, "0");
// set(SoilEstimate, "1");
// set(SoilAverageStratifiedLayers, "0");
// set(OMFractionThreshold, "0.20");
//
// set(DetailTableFilterFile, "tables/detail_filters.xml");
//
// set(HideProjectFileButtons, "0");
// set(HideTemplatetFileButtons, "0");
// set(DaysToKeepLogs, "2");
//
// //reports
// set(ReportsView, "run");
// set(ReportsGeneratePDF, "run,management,cropdetail,cropsummary,cropintervalsum,stir,covercropsummary,covercropdetail,ci");
// set(ReportsDirectory, "reports/");
// set(ReportsCustomized, null);
// set(ReportsConfidenceIntervalEnabled, "1");
// set(ReportsCropIntPerDetEnabled, "1");
//
// //bash script
// set(AllowScriptCreation, "1");
//
// //nrcs install
// set(CompatibilityNRCS, "0");
//
// //default barriers
// set(BarriersFile, "${weps.databases}/db/barriers/barrier.dat");
//
// //barriers readonly, false
// set(BarriersReadonly, "0");
//
// //show the checkboxes that allow switching between weather files or station lists on a per project basis
// set(ShowWeatheFilerCheckboxes, "1");
//
// //LocationPanel rewrite
// set(WindgenAllowedModes, "choice,file,interpolated,gis,nearest,nrcs");
// set(CligenAllowedModes, "choice,nearest,gis,file,nrcs");
cData.setData(SoilAverageStratifiedLayers, "0");
cData.setData(SoilSkipOrganicSurfaceLayers, "0");
// setData(SiteChooserShowCountry, "0");
// setData(CollapseOp, "0");
//
// set(GISData, "db/gis");
//
// set(SoilReadonly, "0");
//
// //default to not allowing xml format
// set(FormatsXML, "0");
//
// //fuels
// set(FuelDatabase, "${weps.databases}/db/fuels/fuels.xml");
// set(FuelDefault, "diesel");
//
// //NRMV
// set(NRMVMode, "off");
//
// //Submodel Outputs
// set(SubmodelOutputs, "notVisible");
//
// setAccessLevel(windDecNum, ConfigData.AccessLevel.Hidden);
//
// //NRMV Outputs
// set(CropOutput, "Read Write");
// set(DAboveOutput, "Read Write");
// set(DBelowOutput, "Read Write");
// set(DecompOutput, "Read Write");
// set(HLayersOutput, "Read Write");
// set(HydroOutput, "Read Write");
// set(PlotOutput, "Read Write");
// set(SeasonOutput, "Read Write");
// set(ShootOutput, "Read Write");
// set(SoilLayOutput, "Read Write");
}
//@Override
protected void save() {
//do nothing
}
}