Exemplo n.º 1
0
        /***************************************************/
        /****           Public Methods                  ****/
        /***************************************************/

        public static BuildingBenchmarkingData ToBuildingBenchmarkingData(this CustomObject obj)
        {
            BuildingBenchmarkingData benchmark = new BuildingBenchmarkingData
            {
                High = obj.PropertyValue("High") != null?System.Convert.ToDouble(obj.PropertyValue("High")) : double.NaN,
                           Average                     = obj.PropertyValue("Average") != null?System.Convert.ToDouble(obj.PropertyValue("Average")) : double.NaN,
                                                   Low = obj.PropertyValue("Low") != null?System.Convert.ToDouble(obj.PropertyValue("Low")) : double.NaN,
            };

            return(benchmark);
        }
Exemplo n.º 2
0
        /***************************************************/
        /****           Public Methods                  ****/
        /***************************************************/

        public static EnvironmentalProductDeclaration ToEnvironmentalProductDeclarationData(this CustomObject obj)
        {
            EnvironmentalProductDeclaration epd = new EnvironmentalProductDeclaration
            {
                Id   = obj.PropertyValue("_id")?.ToString() ?? "",
                Name = obj.PropertyValue("Name")?.ToString() ?? "",
                DepletionOfAbioticResourcesFossilFuels = obj.PropertyValue("PrimaryEnergyDemand") != null?System.Convert.ToDouble(obj.PropertyValue("PrimaryEnergyDemand")) : double.NaN,
                                                             EutrophicationPotential = obj.PropertyValue("EutrophicationPotential") != null?System.Convert.ToDouble(obj.PropertyValue("EutrophicationPotential")) : double.NaN,
                                                                                           AcidificationPotential = obj.PropertyValue("AcidificationPotential") != null?System.Convert.ToDouble(obj.PropertyValue("AcidificationPotential")) : double.NaN,
                                                                                                                        PhotochemicalOzoneCreationPotential = obj.PropertyValue("SmogPotential") != null?System.Convert.ToDouble(obj.PropertyValue("SmogPotential")) : double.NaN,
                                                                                                                                                                  OzoneDepletionPotential = obj.PropertyValue("OzoneDepletionPotential") != null?System.Convert.ToDouble(obj.PropertyValue("OzoneDepletionPotential")) : double.NaN,
                                                                                                                                                                                                GlobalWarmingPotential = obj.PropertyValue("GlobalWarmingPotential") != null?System.Convert.ToDouble(obj.PropertyValue("GlobalWarmingPotential")) : double.NaN,
                                                                                                                                                                                                                             Description    = obj.PropertyValue("Description")?.ToString() ?? "",
                                                                                                                                                                                                                             BiogenicCarbon = obj.PropertyValue("BiogenicCarbon") != null?System.Convert.ToDouble(obj.PropertyValue("BiogenicCarbon")) : double.NaN,
                                                                                                                                                                                                                                                  Density = obj.PropertyValue("Density") != null?System.Convert.ToDouble(obj.PropertyValue("Density")) : 0,
                                                                                                                                                                                                                                                                EndOfLifeTreatment = obj.PropertyValue("EolTreatment")?.ToString() ?? "",
            };

            return(epd);
        }
Exemplo n.º 3
0
        /***************************************************/
        /****           Public Methods                  ****/
        /***************************************************/

        public static HealthProductDeclaration ToHealthProductDeclarationData(this CustomObject obj)
        {
            HealthProductDeclaration epd = new HealthProductDeclaration
            {
                //Cpid = obj.PropertyValue("cpid")?.ToString() ?? "",
                //Version = obj.PropertyValue("version")?.ToString() ?? "",
                Name         = obj.PropertyValue("name")?.ToString() ?? "",
                MasterFormat = obj.PropertyValue("Masterformat")?.ToString() ?? "",
                Uniformats   = obj.PropertyValue("Uniformats")?.ToString() ?? "",
                CancerOrange = obj.PropertyValue("CancerOrange") != null?System.Convert.ToDouble(obj.PropertyValue("CancerOrange")) : double.NaN,
                                   DevelopmentalOrange = obj.PropertyValue("DevelopmentalOrange") != null?System.Convert.ToDouble(obj.PropertyValue("DevelopmentalOrange")) : double.NaN,
                                                             EndocrineOrange = obj.PropertyValue("EndocrineOrange") != null?System.Convert.ToDouble(obj.PropertyValue("EndocrineOrange")) : double.NaN,
                                                                                   EyeIrritationOrange = obj.PropertyValue("EyeIrritationOrange") != null?System.Convert.ToDouble(obj.PropertyValue("EyeIrritationOrange")) : double.NaN,
                                                                                                             MammalianOrange = obj.PropertyValue("MammalianOrange") != null?System.Convert.ToDouble(obj.PropertyValue("MammalianOrange")) : double.NaN,
                                                                                                                                   MutagenicityOrange = obj.PropertyValue("MutagenicityOrange") != null?System.Convert.ToDouble(obj.PropertyValue("MutagenicityOrange")) : double.NaN,
                                                                                                                                                            NeurotoxicityOrange = obj.PropertyValue("NeurotoxicityOrange") != null?System.Convert.ToDouble(obj.PropertyValue("NeurotoxicityOrange")) : double.NaN,
                                                                                                                                                                                      OrganToxicantOrange = obj.PropertyValue("OrganToxicantOrange") != null?System.Convert.ToDouble(obj.PropertyValue("OrganToxicantOrange")) : double.NaN,
                                                                                                                                                                                                                ReproductiveOrange = obj.PropertyValue("ReproductiveOrange") != null?System.Convert.ToDouble(obj.PropertyValue("ReproductiveOrange")) : double.NaN,
                                                                                                                                                                                                                                         RespiratoryOrange = obj.PropertyValue("RespiratoryOrange") != null?System.Convert.ToDouble(obj.PropertyValue("RespiratoryOrange")) : double.NaN,
                                                                                                                                                                                                                                                                 RespiratoryOccupationalOnlyOrange = obj.PropertyValue("RespiratoryOccupationalOnlyOrange") != null?System.Convert.ToDouble(obj.PropertyValue("RespiratoryOccupationalOnlyOrange")) : double.NaN,
                                                                                                                                                                                                                                                                                                         SkinSensitizationOrange = obj.PropertyValue("SkinSensitizationOrange") != null?System.Convert.ToDouble(obj.PropertyValue("SkinSensitizationOrange")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                       CancerRed = obj.PropertyValue("CancerRed") != null?System.Convert.ToDouble(obj.PropertyValue("CancerRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                       CancerOccupationalOnlyRed = obj.PropertyValue("CancerOccupationalOnlyRed") != null?System.Convert.ToDouble(obj.PropertyValue("CancerOccupationalOnlyRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                                                       DevelopmentalRed = obj.PropertyValue("DevelopmentalRed") != null?System.Convert.ToDouble(obj.PropertyValue("DevelopmentalRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                                                                              MutagenicityRed = obj.PropertyValue("MutagenicityRed") != null?System.Convert.ToDouble(obj.PropertyValue("MutagenicityRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                                                                                                    PersistantBioaccumulativeToxicantRed = obj.PropertyValue("PersistantBioaccumulativeToxicantRed") != null?System.Convert.ToDouble(obj.PropertyValue("PersistantBioaccumulativeToxicantRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                               RespiratoryRed = obj.PropertyValue("RespiratoryRed") != null?System.Convert.ToDouble(obj.PropertyValue("RespiratoryRed")) : double.NaN,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    PersistantBioaccumulativeToxicantPurple = obj.PropertyValue("PersistantBioaccumulativeToxicantPurple") != null?System.Convert.ToDouble(obj.PropertyValue("PersistantBioaccumulativeToxicantPurple")) : double.NaN,
            };

            return(epd);
        }