Skip to content

Commit

Permalink
Merge pull request #10 from EPICSGroup/Evan
Browse files Browse the repository at this point in the history
merging
  • Loading branch information
will2312 authored Mar 22, 2021
2 parents af97e12 + f19c6c6 commit da40069
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ public class DryWeatherScreening extends AppCompatActivity{

private FormBuilder formBuilder;
private RecyclerView recyclerView;

String flowVal = "";
String odorVal = "";
String colorVal = "";
String polutantsVal = "";
String obstructionVal = "";
String maintenanceVal = "";
String screenVal = "";

FormElementTextEmail element11;
//I assume onCreate is important so I will leave it unchanged
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -43,24 +52,31 @@ private void setupForm() {
//Outfall --> Question: How do you do a subheading?
FormElementTextSingleLine flow = new FormElementTextSingleLine().setTitle("Presence of Flow");
FormElementTextNumber flowData = FormElementTextNumber.createInstance(); //what data type is this?
flowVal = flowData.getValue();

FormElementTextSingleLine odor = new FormElementTextSingleLine().setTitle("Unusual Odor");
FormElementTextNumber odorData = FormElementTextNumber.createInstance();
odorVal = odorData.getValue();

FormElementTextSingleLine color = new FormElementTextSingleLine().setTitle("Unusual Color");
FormElementTextNumber colorData = FormElementTextNumber.createInstance();
colorVal = colorData.getValue();

FormElementTextSingleLine polutants = new FormElementTextSingleLine().setTitle("Polutants Nearby");
FormElementTextNumber polutantsData = FormElementTextNumber.createInstance();
polutantsVal = polutantsData.getValue();

FormElementTextSingleLine obstruction = new FormElementTextSingleLine().setTitle("Obstruction");
FormElementTextNumber obstructionData = FormElementTextNumber.createInstance();
obstructionVal = obstructionData.getValue();

FormElementTextSingleLine maintenance = new FormElementTextSingleLine().setTitle("Needs Maintenance");
FormElementTextNumber maintenanceData = FormElementTextNumber.createInstance();
maintenanceVal = maintenanceData.getValue();

FormElementTextSingleLine screen = new FormElementTextSingleLine().setTitle("Screen OK");
FormElementTextNumber screenData = FormElementTextNumber.createInstance();
screenVal = screenData.getValue();

List<BaseFormElement> formItems = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,22 @@
public class ChemicalTesting extends AppCompatActivity{
private FormBuilder formBuilder;
private RecyclerView recyclerView;

double tempVal = 0.0;
double turbidityVal = 0.0;
double phVal = 0.0;
double nitrateVal = 0.0;
double phosphateVal = 0.0;
double oxygenVal = 0.0;
double coliVal = 0.0;
double other1Val = 0.0;
double other2Val = 0.0;

FormElementTextEmail element11;
@Override
//I assume onCreate is important so I will leave it unchanged


protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample_fordm);
Expand All @@ -45,30 +58,39 @@ private void setupForm() {
FormElementTextSingleLine temperature = new FormElementTextSingleLine().setTitle("Temperature (C) Change");
//FormHeader temp = FormHeader.createInstance("Temperature (C) Change");
FormElementTextNumber tempData = FormElementTextNumber.createInstance(); //what data type is this?
tempVal = Double.parseDouble(tempData.getValue());

FormElementTextSingleLine tubidity = new FormElementTextSingleLine().setTitle("Tubidity (NTU)");
FormElementTextNumber tubidityData = FormElementTextNumber.createInstance();
turbidityVal = Double.parseDouble(tubidityData.getValue());

FormElementTextSingleLine pH = new FormElementTextSingleLine().setTitle("pH");
FormElementTextNumber pHData = FormElementTextNumber.createInstance();
phVal = Double.parseDouble(pHData.getValue());

FormElementTextSingleLine nitrate = new FormElementTextSingleLine().setTitle("Nitrate (mg/L)");
FormElementTextNumber nitrateData = FormElementTextNumber.createInstance();
nitrateVal = Double.parseDouble(nitrateData.getValue());

FormElementTextSingleLine phosphate = new FormElementTextSingleLine().setTitle("Total Phosphate (mg/L)");
FormElementTextNumber phosphateData = FormElementTextNumber.createInstance();
phosphateVal = Double.parseDouble(nitrateData.getValue());

FormElementTextSingleLine oxygen = new FormElementTextSingleLine().setTitle("Dissolved Oxygen (mg/L)");
FormElementTextNumber oxygenData = FormElementTextNumber.createInstance();
oxygenVal = Double.parseDouble(oxygenData.getValue());

FormElementTextSingleLine coli = new FormElementTextSingleLine().setTitle("E Coli (col/100mL)");
FormElementTextNumber coliData = FormElementTextNumber.createInstance();
coliVal = Double.parseDouble(coliData.getValue());

FormElementTextSingleLine other1 = new FormElementTextSingleLine().setTitle("Other 1");
FormElementTextNumber other1Data = FormElementTextNumber.createInstance();
other1Val = Double.parseDouble(other1Data.getValue());

FormElementTextSingleLine other2 = new FormElementTextSingleLine().setTitle("Other 2");
FormElementTextNumber other2Data = FormElementTextNumber.createInstance();
other2Val = Double.parseDouble(other2.getValue());

List<BaseFormElement> formItems = new ArrayList<>();

Expand All @@ -93,6 +115,5 @@ private void setupForm() {
formItems.add(other2Data);

formBuilder.addFormElements(formItems);

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package com.sf.stormwaterutilityandroid.WaterWay;

import java.util.Map;
import java.util.HashMap;

public class WaterWay {

private Map<String, Double> WaterWayDoubleFields = new HashMap<String, Double>();
private Map<String, Boolean> WaterWayBoolFields = new HashMap<String, Boolean>();
private Map<String, String> WaterWayStringFields = new HashMap<String, String>();

public WaterWay() {
//Water Quality Index Data
WaterWayDoubleFields.put("CT_temperature_change", new Double(0.0));
WaterWayDoubleFields.put("CT_turbidity", new Double(0.0));
WaterWayDoubleFields.put("CT_pH", new Double(0.0));
WaterWayDoubleFields.put("CT_nitrate", new Double(0.0));
WaterWayDoubleFields.put("CT_total_phosphate", new Double(0.0));
WaterWayDoubleFields.put("CT_dissolved_oxygen", new Double(0.0));
//PTI Data
WaterWayDoubleFields.put("BM_intolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_moderately_tolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_fairly_tolerant", new Double(0.0));
WaterWayDoubleFields.put("BM_very_tolerant", new Double(0.0));

WaterWayDoubleFields.put("WQI", new Double(0.0));
WaterWayDoubleFields.put("HEI", new Double(0.0));
WaterWayDoubleFields.put("PTI", new Double(0.0));

//Boolean Fields
WaterWayBoolFields.put("DWS_needs_maintenance", new Boolean(false));
WaterWayBoolFields.put("DWS_obstruction", new Boolean(false));
WaterWayBoolFields.put("DWS_polutants", new Boolean(false));
WaterWayBoolFields.put("DWS_presence_of_flow", new Boolean(false));
WaterWayBoolFields.put("DWS_screened_OK", new Boolean(false));
WaterWayBoolFields.put("DWS_unusual_color", new Boolean(false));
WaterWayBoolFields.put("DWS_unusual_odor", new Boolean(false));
WaterWayBoolFields.put("FC_complaint_investigation", new Boolean(false));
WaterWayBoolFields.put("FC_further_action_needed", new Boolean(false));
WaterWayBoolFields.put("FC_illicit_discharge_detected", new Boolean(false));
WaterWayBoolFields.put("FC_no_illicit_discharge_detected", new Boolean(false));
WaterWayBoolFields.put("FC_routine_evaluation", new Boolean(false));

//String Fields
//HEI Data
WaterWayStringFields.put("QHEI_substrate_size", "");
WaterWayStringFields.put("QHEI_smothering", "");
WaterWayStringFields.put("QHEI_silting", "");
WaterWayStringFields.put("QHEI_rootwads", "");
WaterWayStringFields.put("QHEI_overhanging_veg", "");
WaterWayStringFields.put("QHEI_oxbowsblack_waters", "");
WaterWayStringFields.put("QHEI_downed_treeslogs","");
WaterWayStringFields.put("QHEI_shallows", "");
WaterWayStringFields.put("QHEI_water_plants", "");
WaterWayStringFields.put("QHEI_deep_pools", "");
WaterWayStringFields.put("QHEI_logswoody_debris", "");
WaterWayStringFields.put("QHEI_boulders", "");
WaterWayStringFields.put("QHEI_undercut_banks", "");
WaterWayStringFields.put("QHEI_sinuosity", "");
WaterWayStringFields.put("QHEI_riparian_width", "");
WaterWayStringFields.put("QHEI_land_use", "");
WaterWayStringFields.put("QHEI_bank_erosion", "");
WaterWayStringFields.put("QHEI_stream_shading", "");
WaterWayStringFields.put("QHEI_deepest_pool", "");
WaterWayStringFields.put("QHEI_velocity", "");
WaterWayStringFields.put("QHEI_rifflerun_depth", "");
WaterWayStringFields.put("QHEI_rifflerun_substrate", "");

WaterWayStringFields.put("GOD_channel_bottom_width", "");
WaterWayStringFields.put("GOD_invert_elevation", "");
WaterWayStringFields.put("GOD_latitude", "");
WaterWayStringFields.put("GOD_longitude", "");
WaterWayStringFields.put("GOD_outfall", "");
WaterWayStringFields.put("GOD_pipe_size", "");
WaterWayStringFields.put("GOD_receiving_water", "");
WaterWayStringFields.put("GOD_type", "");

//Comments
WaterWayStringFields.put("CS_comments", "");
WaterWayStringFields.put("CT_other_1", "");
WaterWayStringFields.put("CT_other_2", "");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ protected void onCreate(Bundle savedInstanceState) {

private void setupForm() {


formBuilder = new FormBuilder(this, recyclerView);
FormElementTextNumber element2 = FormElementTextNumber.createInstance().setTitle("Substrate Size").setValue("0");
FormElementTextNumber element3 = FormElementTextNumber.createInstance().setTitle("Smothering").setValue("0");
Expand Down Expand Up @@ -70,6 +69,7 @@ private void setupForm() {
formItems.add(element17);
formItems.add(element18);
formItems.add(element19);

formBuilder.addFormElements(formItems);

}
Expand Down

0 comments on commit da40069

Please sign in to comment.