Add backload for multiple file upload
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
public class FluxnetSite
|
||||
{
|
||||
public string FluxnetId { get; set; }
|
||||
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
public string LandUnit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
+15
-40
@@ -1,55 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LeafWeb.Core.Parsers;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Descriptive information about the investigator,
|
||||
/// contact information, the site,the sample leaf and its general environmental condition
|
||||
/// </summary>
|
||||
public class LeafInput
|
||||
{
|
||||
[Key]
|
||||
public string LeafInputId { get; set; }
|
||||
public int LeafInputId { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
public virtual IEnumerable<LeafInputFile> LeafInputFiles { get; set; }
|
||||
|
||||
[ParseInfo(1, exampleValue: "First and last name")]
|
||||
public string InvestigatorName { get; set; }
|
||||
[Required(ErrorMessage = "Name required")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[ParseInfo(2, exampleValue: "Your email / mail addresses")]
|
||||
public string ContactInformation { get; set; }
|
||||
[Required(ErrorMessage = "An email address is required")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
|
||||
public string SiteName { get; set; }
|
||||
[Required(ErrorMessage = "A unique identifier is required")]
|
||||
public string Identifier { get; set; }
|
||||
|
||||
[ParseInfo(4, exampleValue: "Mixed forest / grasslands / croplands/ etc")]
|
||||
public string VegetationType { get; set; }
|
||||
[Required(ErrorMessage = "")]
|
||||
public string SiteId { 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; }
|
||||
|
||||
public virtual LeafInputSite Site { get; set; }
|
||||
public virtual LeafInputPhotosynthetic Photosynthetic { get; set; }
|
||||
public virtual IEnumerable<LeafInputData> Data { get; set; }
|
||||
[DataType(DataType.Date)]
|
||||
[Required]
|
||||
public DateTime Created { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LeafWeb.Core.Parsers;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
@@ -9,6 +8,11 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputData
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputDataId { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
public int ListOrder { get; set; }
|
||||
|
||||
/// <summary>the data point No.</summary>
|
||||
@@ -140,7 +144,5 @@ namespace LeafWeb.Core.Models
|
||||
/// <summary>atmospheric O2 partial pressure</summary>
|
||||
[ParseInfo(31, units: "Pa")]
|
||||
public double? OxygenPress { get; set; }
|
||||
|
||||
public virtual LeafInput LeafInput { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,14 @@ namespace LeafWeb.Core.Models
|
||||
public class LeafInputFile
|
||||
{
|
||||
[Key]
|
||||
public string LeafInputId { get; set; }
|
||||
public byte[] File { get; set; }
|
||||
public int LeafInputFileId { get; set; }
|
||||
|
||||
public virtual LeafInput LeafInput { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
public byte[] Contents { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Descriptive information about the investigator,
|
||||
/// contact information, the site,the sample leaf and its general environmental condition
|
||||
/// </summary>
|
||||
public class LeafInputInfo
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputInfoId { get; set; }
|
||||
|
||||
public virtual LeafInputSite Site { get; set; }
|
||||
public virtual LeafInputPhotosynthetic Photosynthetic { get; set; }
|
||||
public virtual IEnumerable<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; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using LeafWeb.Core.Parsers;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LeafWeb.Core.Parsers;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
@@ -8,6 +9,11 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputPhotosynthetic
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputPhotosyntheticId { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
/// <summary>chloroplastic CO2 photocompensation point</summary>
|
||||
/// <remarks>must be positive</remarks>
|
||||
[ParseInfo(1, alternateTitle:"Gamma*", units: "Pa")]
|
||||
@@ -36,7 +42,5 @@ namespace LeafWeb.Core.Models
|
||||
/// <summary>internal (also known as mesophyll) conductance</summary>
|
||||
[ParseInfo(6, units: "umol/m2/s/Pa")]
|
||||
public double gi { get; set; }
|
||||
|
||||
public virtual LeafInput LeafInput { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using LeafWeb.Core.Parsers;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LeafWeb.Core.Parsers;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
@@ -8,10 +9,15 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputSite
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputSiteId { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
/// <summary>Site identifier</summary>
|
||||
/// <remarks>do not leave blank between letters</remarks>
|
||||
[ParseInfo(1)]
|
||||
public string SiteID { get; set; }
|
||||
public string SiteId { get; set; }
|
||||
|
||||
/// <summary>Site latitude, northern hermisphere positive</summary>
|
||||
[ParseInfo(2, units:"degrees")]
|
||||
@@ -92,6 +98,5 @@ namespace LeafWeb.Core.Models
|
||||
|
||||
// DataType,TissueArea,TissueMass,Fo'_or_Fo,Fm'_or_Fm,Fs,MeasLight
|
||||
|
||||
public virtual LeafInput LeafInput { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user