epb_view_models 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/api/schemas/xml/CEPC-S-7.1/Reports/BaseDataTypes.xsd +300 -300
- data/api/schemas/xml/CEPC-S-7.1/Reports/CEPC-Reports.xsd +66 -66
- data/api/schemas/xml/CEPC-S-7.1/Reports/Input-Data.xsd +34 -34
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd +125 -125
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd.bak +123 -123
- data/api/schemas/xml/CEPC-S-7.1/Reports/Property.xsd +67 -67
- data/api/schemas/xml/CEPC-S-7.1/Reports/Report-Header.xsd +178 -178
- data/api/schemas/xml/CEPC-S-7.1/Reports/Reported-Data.xsd +406 -406
- data/api/schemas/xml/CEPC-S-7.1/Reports/UserManagement.xsd +174 -174
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/ExternalDefinitions.xsd +261 -261
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-CollectedData.xsd +1051 -1051
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/RdSAP-Report.xsd +176 -176
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/EPC-Domains.xsd +858 -858
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/SAP-Domains.xsd +2684 -2684
- data/lib/epb_view_models.rb +1 -1
- data/lib/presenter/cepc/certificate_summary.rb +3 -3
- data/lib/presenter/dec/certificate_summary.rb +2 -2
- data/lib/presenter/dec_rr/certificate_summary.rb +1 -1
- data/lib/presenter/rd_sap/certificate_summary.rb +1 -1
- data/lib/presenter/sap/certificate_summary.rb +1 -1
- data/lib/view_model/dec_rr_wrapper.rb +1 -1
- data/lib/view_model/dec_wrapper.rb +1 -1
- data/lib/view_model/decar_s_70/dec.rb +7 -7
- data/lib/view_model/decar_s_70/dec_rr.rb +2 -2
- data/lib/view_model/rd_sap_schema_s_190/common_schema.rb +3 -3
- data/lib/view_model/sap_schema_s_1900/common_schema.rb +4 -4
- metadata +1 -1
data/lib/epb_view_models.rb
CHANGED
|
@@ -63,9 +63,9 @@ module Presenter
|
|
|
63
63
|
date_of_registration: @view_model.date_of_registration,
|
|
64
64
|
address: {
|
|
65
65
|
address_line1: @view_model.address_line1,
|
|
66
|
-
address_line2: @view_model.address_line2,
|
|
67
|
-
address_line3: @view_model.address_line3,
|
|
68
|
-
address_line4: @view_model.address_line4,
|
|
66
|
+
address_line2: @view_model.address_line2.to_s,
|
|
67
|
+
address_line3: @view_model.address_line3.to_s,
|
|
68
|
+
address_line4: @view_model.address_line4.to_s,
|
|
69
69
|
town: @view_model.town,
|
|
70
70
|
postcode: @view_model.postcode,
|
|
71
71
|
},
|
|
@@ -8,7 +8,7 @@ module Presenter
|
|
|
8
8
|
@schema_type = schema_type.to_s
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def
|
|
11
|
+
def to_certificate_summary
|
|
12
12
|
{
|
|
13
13
|
assessment_id: @view_model.assessment_id,
|
|
14
14
|
date_of_assessment: @view_model.date_of_assessment,
|
|
@@ -24,7 +24,7 @@ module Presenter
|
|
|
24
24
|
postcode: @view_model.postcode,
|
|
25
25
|
},
|
|
26
26
|
type_of_assessment: TYPE_OF_ASSESSMENT,
|
|
27
|
-
schema_version: @schema_type.gsub(/[a-zA-Z-]/, "")
|
|
27
|
+
schema_version: @schema_type.gsub(/[a-zA-Z-]/, ""),
|
|
28
28
|
report_type: @view_model.report_type,
|
|
29
29
|
current_assessment: {
|
|
30
30
|
date: @view_model.current_assessment_date,
|
|
@@ -25,7 +25,7 @@ module Presenter
|
|
|
25
25
|
address_line1: @view_model.address_line1,
|
|
26
26
|
address_line2: @view_model.address_line2,
|
|
27
27
|
address_line3: @view_model.address_line3,
|
|
28
|
-
address_line4:
|
|
28
|
+
address_line4: "",
|
|
29
29
|
town: @view_model.town,
|
|
30
30
|
postcode: @view_model.postcode,
|
|
31
31
|
},
|
|
@@ -22,7 +22,7 @@ module Presenter
|
|
|
22
22
|
address_line1: @view_model.address_line1,
|
|
23
23
|
address_line2: @view_model.address_line2,
|
|
24
24
|
address_line3: @view_model.address_line3,
|
|
25
|
-
address_line4:
|
|
25
|
+
address_line4: "",
|
|
26
26
|
town: @view_model.town,
|
|
27
27
|
postcode: @view_model.postcode,
|
|
28
28
|
},
|
|
@@ -88,7 +88,7 @@ module ViewModel
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def floor_area
|
|
91
|
-
xpath(%w[Technical-Information Floor-Area])
|
|
91
|
+
xpath(%w[Technical-Information Floor-Area])&.to_f
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
def asset_rating
|
|
@@ -96,27 +96,27 @@ module ViewModel
|
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
def annual_energy_use_fuel_thermal
|
|
99
|
-
xpath(%w[Annual-Energy-Use-Fuel-Thermal])
|
|
99
|
+
xpath(%w[Annual-Energy-Use-Fuel-Thermal])&.to_i
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
def annual_energy_use_electrical
|
|
103
|
-
xpath(%w[DEC-Annual-Energy-Summary Annual-Energy-Use-Electrical])
|
|
103
|
+
xpath(%w[DEC-Annual-Energy-Summary Annual-Energy-Use-Electrical])&.to_i
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
def typical_thermal_use
|
|
107
|
-
xpath(%w[DEC-Annual-Energy-Summary Typical-Thermal-Use])
|
|
107
|
+
xpath(%w[DEC-Annual-Energy-Summary Typical-Thermal-Use])&.to_i
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def typical_electrical_use
|
|
111
|
-
xpath(%w[DEC-Annual-Energy-Summary Typical-Electrical-Use])
|
|
111
|
+
xpath(%w[DEC-Annual-Energy-Summary Typical-Electrical-Use])&.to_i
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def renewables_fuel_thermal
|
|
115
|
-
xpath(%w[DEC-Annual-Energy-Summary Renewables-Fuel-Thermal])
|
|
115
|
+
xpath(%w[DEC-Annual-Energy-Summary Renewables-Fuel-Thermal])&.to_i
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
def renewables_electrical
|
|
119
|
-
xpath(%w[DEC-Annual-Energy-Summary Renewables-Electrical])
|
|
119
|
+
xpath(%w[DEC-Annual-Energy-Summary Renewables-Electrical])&.to_i
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def dec_status
|
|
@@ -38,7 +38,7 @@ module ViewModel
|
|
|
38
38
|
{
|
|
39
39
|
description:
|
|
40
40
|
@xml_doc.at("Site-Services/#{service}/Description").content,
|
|
41
|
-
quantity: @xml_doc.at("Site-Services/#{service}/Quantity").content,
|
|
41
|
+
quantity: @xml_doc.at("Site-Services/#{service}/Quantity").content&.to_i,
|
|
42
42
|
}
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -71,7 +71,7 @@ module ViewModel
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def floor_area
|
|
74
|
-
xpath(%w[Advisory-Report Technical-Information Floor-Area])
|
|
74
|
+
xpath(%w[Advisory-Report Technical-Information Floor-Area])&.to_f
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def building_environment
|
|
@@ -238,11 +238,11 @@ module ViewModel
|
|
|
238
238
|
end
|
|
239
239
|
|
|
240
240
|
def primary_energy_use
|
|
241
|
-
xpath(%w[Energy-Consumption-Current])
|
|
241
|
+
xpath(%w[Energy-Consumption-Current])&.to_f
|
|
242
242
|
end
|
|
243
243
|
|
|
244
244
|
def energy_consumption_potential
|
|
245
|
-
xpath(%w[Energy-Consumption-Potential])
|
|
245
|
+
xpath(%w[Energy-Consumption-Potential])&.to_f
|
|
246
246
|
end
|
|
247
247
|
|
|
248
248
|
def all_roof_descriptions
|
|
@@ -308,7 +308,7 @@ module ViewModel
|
|
|
308
308
|
end
|
|
309
309
|
|
|
310
310
|
def co2_emissions_current_per_floor_area
|
|
311
|
-
xpath(%w[CO2-Emissions-Current-Per-Floor-Area])
|
|
311
|
+
xpath(%w[CO2-Emissions-Current-Per-Floor-Area])&.to_f
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
def mains_gas
|
|
@@ -171,17 +171,17 @@ module ViewModel
|
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
def primary_energy_use
|
|
174
|
-
xpath(%w[Energy-Consumption-Current])
|
|
174
|
+
xpath(%w[Energy-Consumption-Current])&.to_f
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
def energy_consumption_potential
|
|
178
|
-
xpath(%w[Energy-Consumption-Potential])
|
|
178
|
+
xpath(%w[Energy-Consumption-Potential])&.to_f
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
def estimated_energy_cost; end
|
|
182
182
|
|
|
183
183
|
def total_floor_area
|
|
184
|
-
xpath(%w[Property-Summary Total-Floor-Area])&.
|
|
184
|
+
xpath(%w[Property-Summary Total-Floor-Area])&.to_f
|
|
185
185
|
end
|
|
186
186
|
|
|
187
187
|
def total_roof_area
|
|
@@ -352,7 +352,7 @@ module ViewModel
|
|
|
352
352
|
end
|
|
353
353
|
|
|
354
354
|
def co2_emissions_current_per_floor_area
|
|
355
|
-
xpath(%w[CO2-Emissions-Current-Per-Floor-Area])
|
|
355
|
+
xpath(%w[CO2-Emissions-Current-Per-Floor-Area])&.to_f
|
|
356
356
|
end
|
|
357
357
|
|
|
358
358
|
def main_heating_controls
|