using System.ComponentModel.DataAnnotations;
using AutoMapper;
using LeafWeb.Core.Entities;
using LeafWeb.Core.Utility;
namespace LeafWeb.WebCms.Models
{
public class LeafInputDataSiteViewModel
{
/// Site identifier
/// do not leave blank between letters
[ParseInfo(1)]
[Display(Name = "Site Id")]
public string SiteId { get; set; }
/// Site latitude, northern hemisphere positive
[DisplayFormat(DataFormatString = "{0} °")]
public double? Latitude { get; set; }
/// Site longitude, east positive
[DisplayFormat(DataFormatString = "{0} °")]
public double? Longitude { get; set; }
/// site elevation
[DisplayFormat(DataFormatString = "{0} m")]
public double? Elevation { get; set; }
/// the year when the A/Ci data is taken
[DisplayFormat(DataFormatString = "{0} year")]
public int? SampleYear { get; set; }
/// the day of year (since 1 Jan) when the A/Ci data is taken
[ParseInfo(6, units: "day")]
public int? SampleDayOfYear { get; set; }
/// the approximate start day (since 1 Jan) of growing season
[ParseInfo(7, units: "day")]
public int? GrowSeasonStart { get; set; }
/// the approximate end day (since 1 Jan) of growing season
[ParseInfo(8, units: "day")]
public int? GrowSeasonEnd { get; set; }
/// stand age since the last disturbance
[ParseInfo(9, units: "year")]
public double? StandAge { get; set; }
/// the height of the canopy
[ParseInfo(10, units: "m")]
public double? CanopyHeight { get; set; }
/// the leaf area index in the middle of growing season
[ParseInfo(11, units: "m2/m2")]
public double? LeafAreaIndex { get; set; }
/// the species of the leaf sample
/// don't leave blank between letters
[ParseInfo(12, units: "dimensionless")]
public string SpeciesSampled { get; set; }
/// the average time interval between two consecutive A/Ci data points
[ParseInfo(13, alternateTitle: "AveTimeResolution", units: "minutes")]
public double? AverageTimeResolution { get; set; }
/// the height at which the leaf is located
[ParseInfo(14, units: "m")]
public double? SampleHeight { get; set; }
/// the age of the leaf
[ParseInfo(15, units: "day")]
public int? LeafAge { get; set; }
/// specific leaf area of the sample
[ParseInfo(16, units: "cm2/g")]
public double? SpecificLeafArea { get; set; }
/// dry leaf nitrogen content of the sample
[ParseInfo(17, units: "%")]
public double? LfNitrogenContent { get; set; }
/// dry leaf carbon content of the sample
[ParseInfo(18, units: "%")]
public double? LfCarbonContent { get; set; }
/// dry leaf phosphorus content of the sample
[ParseInfo(19, units: "%")]
public double? LfPhosphContent { get; set; }
static LeafInputDataSiteViewModel()
{
Mapper.CreateMap();
}
public LeafInputDataSiteViewModel() {}
public LeafInputDataSiteViewModel(LeafInputDataSite site)
{
Mapper.Map(site, this);
}
}
}