epb_view_models 1.1.4 → 1.1.5
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/RdSAP-Schema-21.0.0/RdSAP/ExternalDefinitions.xml +1627 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/ExternalDefinitions.xsd +267 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/AssessorManagement.xsd +212 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/EPC-Certificate.xsd +398 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/EPC-CollectedData.xsd +1385 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/Property.xsd +67 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/RdSAP-Report.xsd +179 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/UDT/EPC-Domains.xsd +885 -0
- data/api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/UDT/SAP-Domains.xsd +3330 -0
- data/lib/epb_view_models.rb +1 -1
- data/lib/helper/xml_enums_to_output.rb +46 -2
- metadata +12 -3
data/lib/epb_view_models.rb
CHANGED
|
@@ -31,6 +31,7 @@ module Helper
|
|
|
31
31
|
"3" => "Unknown",
|
|
32
32
|
"4" => "dual (24 hour)",
|
|
33
33
|
"5" => "off-peak 18 hour",
|
|
34
|
+
"6" => "off-peak 10 hour",
|
|
34
35
|
}.freeze
|
|
35
36
|
RDSAP_GLAZED_TYPE = {
|
|
36
37
|
"1" => "double glazing installed before 2002",
|
|
@@ -42,6 +43,14 @@ module Helper
|
|
|
42
43
|
"7" => "double, known data",
|
|
43
44
|
"8" => "triple, known data",
|
|
44
45
|
"ND" => "not defined",
|
|
46
|
+
"6-post20" => "triple glazing, unknown install date",
|
|
47
|
+
"9" => "triple glazing, installed between 2002-2022 in EAW, 2003-2023 in SCT, 2006-2022 NI",
|
|
48
|
+
"10" => "triple glazing, installed before 2002 in EAW, 2003 in SCT, 2006 NI",
|
|
49
|
+
"11" => "secondary glazing, normal emissivity",
|
|
50
|
+
"12" => "secondary glazing, low emissivity",
|
|
51
|
+
"13" => "double glazing, installed during or after 2022 in EAW, 2023 in SCT, 2022 NI",
|
|
52
|
+
"14" => "triple glazing, installed during or after 2022 in EAW, 2023 in SCT, 2022 NI",
|
|
53
|
+
|
|
45
54
|
}.freeze
|
|
46
55
|
RDSAP_GLAZED_AREA = {
|
|
47
56
|
"1" => "Normal",
|
|
@@ -78,6 +87,9 @@ module Helper
|
|
|
78
87
|
"12RdSAP" => "RHI application",
|
|
79
88
|
"13RdSAP" => "ECO assessment",
|
|
80
89
|
"14RdSAP" => "Stock condition survey",
|
|
90
|
+
"15RdSAP" => "Grant scheme (ECO, RHI, etc.)",
|
|
91
|
+
"16RdSAP" => "Non-grant scheme (e.g. MEES)",
|
|
92
|
+
"17RdSAP" => "re-mortgaging",
|
|
81
93
|
}.freeze
|
|
82
94
|
CONSTRUCTION_AGE_BAND = {
|
|
83
95
|
"A" => "England and Wales: before 1900",
|
|
@@ -94,6 +106,8 @@ module Helper
|
|
|
94
106
|
"K-pre-17.0" => "England and Wales: 2007 onwards",
|
|
95
107
|
"K-12.0" => "Post-2006",
|
|
96
108
|
"L" => "England and Wales: 2012 onwards",
|
|
109
|
+
"L-post-20" => "England and Wales: 2012-2021",
|
|
110
|
+
"M" => "England and Wales: 2022 onwards",
|
|
97
111
|
"0" => "Not applicable",
|
|
98
112
|
"NR" => "Not recorded",
|
|
99
113
|
}.freeze
|
|
@@ -136,6 +150,7 @@ module Helper
|
|
|
136
150
|
"0" => "no corridor",
|
|
137
151
|
"1" => "heated corridor",
|
|
138
152
|
"2" => "unheated corridor",
|
|
153
|
+
"3" => "stairwell",
|
|
139
154
|
}.freeze
|
|
140
155
|
MECHANICAL_VENTILATION = {
|
|
141
156
|
"0" => "natural",
|
|
@@ -144,6 +159,12 @@ module Helper
|
|
|
144
159
|
"0-pre12.0" => "none",
|
|
145
160
|
"1-pre12.0" => "mechanical - heat recovering",
|
|
146
161
|
"2-pre12.0" => "mechanical - non recovering",
|
|
162
|
+
"1-post20" => "mechanical ventilation without heat recovery (MV)",
|
|
163
|
+
"2-post20" => "mechanical extract, decentralised (MEV dc)",
|
|
164
|
+
"3-post20" => "mechanical extract, centralised (MEV c)",
|
|
165
|
+
"4-post20" => "mechanical ventilation with heat recovery (MVHR)",
|
|
166
|
+
"5-post20" => "positive input from loft",
|
|
167
|
+
"6-post20" => "positive input from outside",
|
|
147
168
|
}.freeze
|
|
148
169
|
CEPC_TRANSACTION_TYPE = {
|
|
149
170
|
"1" => "Mandatory issue (Marketed sale)",
|
|
@@ -167,6 +188,7 @@ module Helper
|
|
|
167
188
|
"10" => "natural with intermittent extract fans and passive vents",
|
|
168
189
|
}.freeze
|
|
169
190
|
CYLINDER_INSULATION_THICKNESS = {
|
|
191
|
+
"0" => "0 mm",
|
|
170
192
|
"12" => "12 mm",
|
|
171
193
|
"25" => "25 mm",
|
|
172
194
|
"38" => "38 mm",
|
|
@@ -311,7 +333,10 @@ module Helper
|
|
|
311
333
|
RDSAP_GLAZED_AREA[value]
|
|
312
334
|
end
|
|
313
335
|
|
|
314
|
-
def self.glazed_type_rdsap(value)
|
|
336
|
+
def self.glazed_type_rdsap(value, schema_type = "")
|
|
337
|
+
if value =="6" && schemas_post_20.include?(schema_type)
|
|
338
|
+
return RDSAP_GLAZED_TYPE["#{value}-post20"]
|
|
339
|
+
end
|
|
315
340
|
RDSAP_GLAZED_TYPE[value]
|
|
316
341
|
end
|
|
317
342
|
|
|
@@ -396,6 +421,7 @@ module Helper
|
|
|
396
421
|
SAP-Schema-13.0
|
|
397
422
|
SAP-Schema-12.0
|
|
398
423
|
RdSAP-Schema-20.0.0
|
|
424
|
+
RdSAP-Schema-21.0.0
|
|
399
425
|
RdSAP-Schema-19.0
|
|
400
426
|
RdSAP-Schema-18.0
|
|
401
427
|
RdSAP-Schema-17.1
|
|
@@ -461,6 +487,10 @@ module Helper
|
|
|
461
487
|
return value
|
|
462
488
|
end
|
|
463
489
|
|
|
490
|
+
if value == "L" && schemas_post_20.include?(schema_type)
|
|
491
|
+
return CONSTRUCTION_AGE_BAND["L-post-20"]
|
|
492
|
+
end
|
|
493
|
+
|
|
464
494
|
return value if value == "L" && !schemes_that_use_l.include?(schema_type)
|
|
465
495
|
|
|
466
496
|
if value == "0" &&
|
|
@@ -486,10 +516,16 @@ module Helper
|
|
|
486
516
|
SAP-Schema-10.2
|
|
487
517
|
SAP-Schema-NI-11.2
|
|
488
518
|
].freeze
|
|
519
|
+
|
|
520
|
+
|
|
489
521
|
if types_of_sap_pre12.include?(schema_type) && is_rdsap(report_type)
|
|
490
522
|
return MECHANICAL_VENTILATION["#{value}-pre12.0"]
|
|
491
523
|
end
|
|
492
524
|
|
|
525
|
+
if schemas_post_20.include?(schema_type) && is_rdsap(report_type)
|
|
526
|
+
return MECHANICAL_VENTILATION["#{value}-post20"]
|
|
527
|
+
end
|
|
528
|
+
|
|
493
529
|
MECHANICAL_VENTILATION[value] || value
|
|
494
530
|
end
|
|
495
531
|
|
|
@@ -633,6 +669,14 @@ module Helper
|
|
|
633
669
|
MAIN_HEATING_CATEGORY[value] || value
|
|
634
670
|
end
|
|
635
671
|
|
|
636
|
-
|
|
672
|
+
def self.schemas_post_20
|
|
673
|
+
%i[
|
|
674
|
+
RdSAP-Schema-21.0.0
|
|
675
|
+
]
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
private_class_method :is_rdsap, :is_sap, :schemas_post_20
|
|
679
|
+
|
|
680
|
+
|
|
637
681
|
end
|
|
638
682
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: epb_view_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DLUHC Energy Performance of Buildings
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -216,6 +216,15 @@ files:
|
|
|
216
216
|
- api/schemas/xml/RdSAP-Schema-20.0.0/RdSAP/Templates/RdSAP-Report.xsd
|
|
217
217
|
- api/schemas/xml/RdSAP-Schema-20.0.0/RdSAP/UDT/EPC-Domains.xsd
|
|
218
218
|
- api/schemas/xml/RdSAP-Schema-20.0.0/RdSAP/UDT/SAP-Domains.xsd
|
|
219
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/ExternalDefinitions.xml
|
|
220
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/ExternalDefinitions.xsd
|
|
221
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/AssessorManagement.xsd
|
|
222
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/EPC-Certificate.xsd
|
|
223
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/EPC-CollectedData.xsd
|
|
224
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/Property.xsd
|
|
225
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/Templates/RdSAP-Report.xsd
|
|
226
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/UDT/EPC-Domains.xsd
|
|
227
|
+
- api/schemas/xml/RdSAP-Schema-21.0.0/RdSAP/UDT/SAP-Domains.xsd
|
|
219
228
|
- api/schemas/xml/RdSAP-Schema-NI-17.3/RdSAP/ExternalDefinitions.xml
|
|
220
229
|
- api/schemas/xml/RdSAP-Schema-NI-17.3/RdSAP/ExternalDefinitions.xsd
|
|
221
230
|
- api/schemas/xml/RdSAP-Schema-NI-17.3/RdSAP/Templates/AssessorManagement.xsd
|
|
@@ -1884,7 +1893,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1884
1893
|
- !ruby/object:Gem::Version
|
|
1885
1894
|
version: '0'
|
|
1886
1895
|
requirements: []
|
|
1887
|
-
rubygems_version: 3.3.
|
|
1896
|
+
rubygems_version: 3.3.26
|
|
1888
1897
|
signing_key:
|
|
1889
1898
|
specification_version: 4
|
|
1890
1899
|
summary: Library used to parse Energy Performance Certificates (EPC)
|