Rearrange LeafInput data

This commit is contained in:
2016-02-17 11:11:25 -05:00
parent 5057d9b577
commit e6ad04cf2b
7 changed files with 203 additions and 188 deletions
+4 -3
View File
@@ -71,6 +71,7 @@
<Compile Include="DAL\DataService.cs" />
<Compile Include="DAL\LeafWebContext.cs" />
<Compile Include="DAL\LeafWebInitializer.cs" />
<Compile Include="Entities\LeafOutputFile.cs" />
<Compile Include="Entities\PhotosynthesisType.cs" />
<Compile Include="Remote\IPiscalClient.cs" />
<Compile Include="Entities\CntrlComparison.cs" />
@@ -78,11 +79,11 @@
<Compile Include="Entities\CntrlComparisonPhotosyntheticInfo.cs" />
<Compile Include="Entities\FluxnetSite.cs" />
<Compile Include="Entities\LeafInput.cs" />
<Compile Include="Entities\LeafInputInfo.cs" />
<Compile Include="Entities\LeafInputData.cs" />
<Compile Include="Entities\LeafInputDataCurve.cs" />
<Compile Include="Entities\LeafInputFile.cs" />
<Compile Include="Entities\LeafInputPhotosynthetic.cs" />
<Compile Include="Entities\LeafInputSite.cs" />
<Compile Include="Entities\LeafInputDataPhotosynthetic.cs" />
<Compile Include="Entities\LeafInputDataSite.cs" />
<Compile Include="Entities\LeafInputStatus.cs" />
<Compile Include="Parsers\FluxnetSiteCsvParser.cs" />
<Compile Include="Remote\PiscalLeafInputFile.cs" />
+34 -131
View File
@@ -1,147 +1,50 @@
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// A/Ci data for a variety of analyses, including photosynthesis, stomatal conductance, internal conductance, water use efficiency.
/// </summary>
public class LeafInputData
{
/// <summary>
/// Descriptive information about the investigator,
/// contact information, the site,the sample leaf and its general environmental condition
/// </summary>
public class LeafInputData
{
public int Id { get; set; }
public virtual LeafInputInfo LeafInputInfo { get; set; }
public virtual LeafInputDataSite Site { get; set; }
public virtual LeafInputDataPhotosynthetic Photosynthetic { get; set; }
public virtual ICollection<LeafInputDataCurve> Data { get; set; }
public int ListOrder { get; set; }
[ParseInfo(1, exampleValue: "First and last name")]
public string InvestigatorName { get; set; }
/// <summary>the data point No.</summary>
[ParseInfo(1, units: "no unit")]
public double? Obs { get; set; }
[ParseInfo(2, exampleValue: "Your email / mail addresses")]
public string ContactInformation { get; set; }
/// <summary>clock time</summary>
[StringLength(8)]
[ParseInfo(2, units: "hh:mm:ss")]
public string HHMMSS { get; set; }
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
public string SiteName { get; set; }
/// <summary>number of seconds since file opened</summary>
[ParseInfo(3, units: "seconds")]
public double? FTime { get; set; }
[ParseInfo(4, exampleValue: "Mixed forest / grasslands / croplands/ etc")]
public string VegetationType { get; set; }
/// <summary>photosynthetic rate</summary>
[ParseInfo(4, units: "umol/m2/s")]
public double? Photo { get; set; }
[ParseInfo(5, exampleValue: "Soil type at your site")]
public string SoilType { get; set; }
/// <summary>adjusted photosynthetic rate (leakage corrected)</summary>
/// <remarks>required</remarks>
[ParseInfo(5, alternateTitle: "!AdjPhoto", units: "umol/m2/s")]
public double? AdjPhoto { get; set; }
[ParseInfo(6, exampleValue: "List of major species at the site")]
public string MajorSpecies { get; set; }
/// <summary>stomatal conductance</summary>
/// <remarks>required</remarks>
[ParseInfo(6, alternateTitle: "!StomCond", units: "mol/m2/s")]
public double? StomCond { get; set; }
[ParseInfo(7,
alternateTitle: "Sample leaf light environment",
exampleValue: "The general light environment in which the leaf is in (e.g. heavily shaded from above)")]
public string SampleLeafLightEnv { get; set; }
/// <summary>intercellular CO2 concentration (umol CO2 / mol moist air)</summary>
[ParseInfo(7, alternateTitle: "!Ci", units: "umol/mol")]
public double? Ci { get; set; }
[ParseInfo(8, exampleValue: "Indicate whether there is water stress at the time of sampling")]
public string WaterStressAssessment { get; set; }
/// <summary>transpiration rate</summary>
/// <remarks>must provide</remarks>
[ParseInfo(8, alternateTitle: "!Trmmol", units:"mmol/m2/s")]
public double? Trmmol { get; set; }
[ParseInfo(9, exampleValue: "For example - Licor-6400")]
public string InstrumentUsed { get; set; }
/// <summary>water vapor pressure deficit based on leaf temperature, must provide</summary>
[ParseInfo(9, alternateTitle: "!VpdL", units: "KPa")]
public double? VpdL { get; set; }
/// <summary>leaf area</summary>
[ParseInfo(10, units:"cm2")]
public double? Area { get; set; }
/// <summary>estimate of the ratio of stomatal conductances of one side of the leaf to the other</summary>
[ParseInfo(11, units: "NA")]
public double? StmRat { get; set; }
/// <summary>total boundary layer conductance</summary>
[ParseInfo(12, units: "mol/m2/s")]
public double? BLCond { get; set; }
/// <summary>temperature in sample cell</summary>
[ParseInfo(13, units: "oC")]
public double? Tair { get; set; }
/// <summary>temperature of leaf thermocouple</summary>
/// <remarks>required</remarks>
[ParseInfo(14, alternateTitle: "!Tleaf", units: "oC")]
public double? Tleaf { get; set; }
/// <summary>IRGA Block temperature</summary>
[ParseInfo(15, units: "oC")]
public double? TBlk { get; set; }
/// <summary>reference CO2 concentration</summary>
[ParseInfo(16, units: "umol/mol")]
public double? CO2R { get; set; }
/// <summary>Sample CO2 concentration</summary>
[ParseInfo(17, units: "umol/mol")]
public double? CO2S { get; set; }
/// <summary>reference cell water vapor concentration</summary>
[ParseInfo(18, units: "mmol/mol")]
public double? H2OR { get; set; }
/// <summary>sample cell water vapor concentration</summary>
[ParseInfo(19, units: "mmol/mol")]
public double? H2OS { get; set; }
/// <summary>(%) Reference cell relative humidity</summary>
[ParseInfo(20)]
public double? RH_R { get; set; }
/// <summary>(%) sample cell relative humidity</summary>
[ParseInfo(21)]
public double? RH_S { get; set; }
/// <summary>(umol/s) molar flow rate of air entering the leaf chamber</summary>
[ParseInfo(22)]
public double? Flow { get; set; }
/// <summary> PAR measured by the in-chamber quantum sensor</summary>
/// <remarks>required</remarks>
[ParseInfo(23, alternateTitle: "!PARi", units: "umol/m2/s")]
public double? PARi { get; set; }
/// <summary>PAR measured by the external quantum sensor</summary>
[ParseInfo(24, units: "umol/m2/s")]
public double? PARo { get; set; }
/// <summary>atmospheric pressure</summary>
[ParseInfo(25, units: "KPa")]
public double? Press { get; set; }
/// <summary>sample CO2 offset</summary>
[ParseInfo(26, units: "umol/mol")]
public double? CsMch { get; set; }
/// <summary>sample H2O offset</summary>
[ParseInfo(27, units: "mmol/mol")]
public double? HsMch { get; set; }
/// <summary>a stability indicator as a decimal value</summary>
[ParseInfo(28, units: "NA")]
public double? StableF { get; set; }
/// <summary>status flag</summary>
[ParseInfo(29, units: "NA")]
public string Status { get; set; }
/// <summary>DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
[ParseInfo(30, units: "NA")]
public double? PhiPS2 { get; set; }
/// <summary>atmospheric O2 partial pressure</summary>
[ParseInfo(31, units: "Pa")]
public double? OxygenPress { get; set; }
}
}
[ParseInfo(10, exampleValue: "Any extra information you feel would be helpful to put the sampled leaf in context")]
public string ExtraInfo { get; set; }
}
}
+147
View File
@@ -0,0 +1,147 @@
using System.ComponentModel.DataAnnotations;
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// A/Ci data for a variety of analyses, including photosynthesis, stomatal conductance, internal conductance, water use efficiency.
/// </summary>
public class LeafInputDataCurve
{
public int Id { get; set; }
public virtual LeafInputData LeafInputInfo { get; set; }
public int ListOrder { get; set; }
/// <summary>the data point No.</summary>
[ParseInfo(1, units: "no unit")]
public double? Obs { get; set; }
/// <summary>clock time</summary>
[StringLength(8)]
[ParseInfo(2, units: "hh:mm:ss")]
public string HHMMSS { get; set; }
/// <summary>number of seconds since file opened</summary>
[ParseInfo(3, units: "seconds")]
public double? FTime { get; set; }
/// <summary>photosynthetic rate</summary>
[ParseInfo(4, units: "umol/m2/s")]
public double? Photo { get; set; }
/// <summary>adjusted photosynthetic rate (leakage corrected)</summary>
/// <remarks>required</remarks>
[ParseInfo(5, alternateTitle: "!AdjPhoto", units: "umol/m2/s")]
public double? AdjPhoto { get; set; }
/// <summary>stomatal conductance</summary>
/// <remarks>required</remarks>
[ParseInfo(6, alternateTitle: "!StomCond", units: "mol/m2/s")]
public double? StomCond { get; set; }
/// <summary>intercellular CO2 concentration (umol CO2 / mol moist air)</summary>
[ParseInfo(7, alternateTitle: "!Ci", units: "umol/mol")]
public double? Ci { get; set; }
/// <summary>transpiration rate</summary>
/// <remarks>must provide</remarks>
[ParseInfo(8, alternateTitle: "!Trmmol", units:"mmol/m2/s")]
public double? Trmmol { get; set; }
/// <summary>water vapor pressure deficit based on leaf temperature, must provide</summary>
[ParseInfo(9, alternateTitle: "!VpdL", units: "KPa")]
public double? VpdL { get; set; }
/// <summary>leaf area</summary>
[ParseInfo(10, units:"cm2")]
public double? Area { get; set; }
/// <summary>estimate of the ratio of stomatal conductances of one side of the leaf to the other</summary>
[ParseInfo(11, units: "NA")]
public double? StmRat { get; set; }
/// <summary>total boundary layer conductance</summary>
[ParseInfo(12, units: "mol/m2/s")]
public double? BLCond { get; set; }
/// <summary>temperature in sample cell</summary>
[ParseInfo(13, units: "oC")]
public double? Tair { get; set; }
/// <summary>temperature of leaf thermocouple</summary>
/// <remarks>required</remarks>
[ParseInfo(14, alternateTitle: "!Tleaf", units: "oC")]
public double? Tleaf { get; set; }
/// <summary>IRGA Block temperature</summary>
[ParseInfo(15, units: "oC")]
public double? TBlk { get; set; }
/// <summary>reference CO2 concentration</summary>
[ParseInfo(16, units: "umol/mol")]
public double? CO2R { get; set; }
/// <summary>Sample CO2 concentration</summary>
[ParseInfo(17, units: "umol/mol")]
public double? CO2S { get; set; }
/// <summary>reference cell water vapor concentration</summary>
[ParseInfo(18, units: "mmol/mol")]
public double? H2OR { get; set; }
/// <summary>sample cell water vapor concentration</summary>
[ParseInfo(19, units: "mmol/mol")]
public double? H2OS { get; set; }
/// <summary>(%) Reference cell relative humidity</summary>
[ParseInfo(20)]
public double? RH_R { get; set; }
/// <summary>(%) sample cell relative humidity</summary>
[ParseInfo(21)]
public double? RH_S { get; set; }
/// <summary>(umol/s) molar flow rate of air entering the leaf chamber</summary>
[ParseInfo(22)]
public double? Flow { get; set; }
/// <summary> PAR measured by the in-chamber quantum sensor</summary>
/// <remarks>required</remarks>
[ParseInfo(23, alternateTitle: "!PARi", units: "umol/m2/s")]
public double? PARi { get; set; }
/// <summary>PAR measured by the external quantum sensor</summary>
[ParseInfo(24, units: "umol/m2/s")]
public double? PARo { get; set; }
/// <summary>atmospheric pressure</summary>
[ParseInfo(25, units: "KPa")]
public double? Press { get; set; }
/// <summary>sample CO2 offset</summary>
[ParseInfo(26, units: "umol/mol")]
public double? CsMch { get; set; }
/// <summary>sample H2O offset</summary>
[ParseInfo(27, units: "mmol/mol")]
public double? HsMch { get; set; }
/// <summary>a stability indicator as a decimal value</summary>
[ParseInfo(28, units: "NA")]
public double? StableF { get; set; }
/// <summary>status flag</summary>
[ParseInfo(29, units: "NA")]
public string Status { get; set; }
/// <summary>DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
[ParseInfo(30, units: "NA")]
public double? PhiPS2 { get; set; }
/// <summary>atmospheric O2 partial pressure</summary>
[ParseInfo(31, units: "Pa")]
public double? OxygenPress { get; set; }
}
}
@@ -5,11 +5,11 @@ namespace LeafWeb.Core.Entities
/// <summary>
/// Photosynthetic parameters of Leaf Input
/// </summary>
public class LeafInputPhotosynthetic
public class LeafInputDataPhotosynthetic
{
public int Id { get; set; }
public virtual LeafInputInfo LeafInputInfo { get; set; }
public virtual LeafInputData LeafInputInfo { get; set; }
/// <summary>chloroplastic CO2 photocompensation point</summary>
/// <remarks>must be positive</remarks>
@@ -5,11 +5,11 @@ namespace LeafWeb.Core.Entities
/// <summary>
/// Contains info about the site such as elevation, canopy height, site ID, etc
/// </summary>
public class LeafInputSite
public class LeafInputDataSite
{
public int Id { get; set; }
public virtual LeafInputInfo LeafInputInfo { get; set; }
public virtual LeafInputData LeafInputInfo { get; set; }
/// <summary>Site identifier</summary>
/// <remarks>do not leave blank between letters</remarks>
-50
View File
@@ -1,50 +0,0 @@
using System.Collections.Generic;
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
/// <summary>
/// Descriptive information about the investigator,
/// contact information, the site,the sample leaf and its general environmental condition
/// </summary>
public class LeafInputInfo
{
public int Id { get; set; }
public virtual LeafInputSite Site { get; set; }
public virtual LeafInputPhotosynthetic Photosynthetic { get; set; }
public virtual ICollection<LeafInputData> Data { get; set; }
[ParseInfo(1, exampleValue: "First and last name")]
public string InvestigatorName { get; set; }
[ParseInfo(2, exampleValue: "Your email / mail addresses")]
public string ContactInformation { get; set; }
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
public string SiteName { get; set; }
[ParseInfo(4, exampleValue: "Mixed forest / grasslands / croplands/ etc")]
public string VegetationType { get; set; }
[ParseInfo(5, exampleValue: "Soil type at your site")]
public string SoilType { get; set; }
[ParseInfo(6, exampleValue: "List of major species at the site")]
public string MajorSpecies { get; set; }
[ParseInfo(7,
alternateTitle: "Sample leaf light environment",
exampleValue: "The general light environment in which the leaf is in (e.g. heavily shaded from above)")]
public string SampleLeafLightEnv { get; set; }
[ParseInfo(8, exampleValue: "Indicate whether there is water stress at the time of sampling")]
public string WaterStressAssessment { get; set; }
[ParseInfo(9, exampleValue: "For example - Licor-6400")]
public string InstrumentUsed { get; set; }
[ParseInfo(10, exampleValue: "Any extra information you feel would be helpful to put the sampled leaf in context")]
public string ExtraInfo { get; set; }
}
}
+14
View File
@@ -0,0 +1,14 @@

namespace LeafWeb.Core.Entities
{
public class LeafOutputFile
{
public int Id { get; set; }
public virtual LeafInputFile LeafInputFile { get; set; }
public string Filename { get; set; }
public byte[] Contents { get; set; }
}
}