epb_view_models 1.0.0 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.buildspec.yml +13 -0
- data/.gitignore +5 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +22 -17
- data/Makefile +1 -1
- data/api/schemas/xml/RdSAP-Schema-NI-19.0/RdSAP/Templates/EPC-CollectedData.xsd +13 -12
- data/lib/epb_view_models.rb +1 -1
- data/lib/helper/ac_report_extraction.rb +26 -28
- data/lib/helper/energy_band_calculator.rb +1 -1
- data/lib/helper/xml_enums_to_output.rb +286 -126
- data/lib/presenter/cepc/report.rb +5 -2
- data/lib/presenter/dec/report.rb +5 -2
- data/lib/presenter/export/domestic.rb +1 -1
- data/lib/presenter/rd_sap/report.rb +213 -5
- data/lib/presenter/sap/report.rb +213 -4
- data/lib/presenter/sap/summary.rb +1 -1
- data/lib/view_model/cepc50/cepc.rb +0 -4
- data/lib/view_model/cepc60/cepc.rb +0 -4
- data/lib/view_model/cepc71/dec.rb +0 -4
- data/lib/view_model/cepc_ni800/ac_report.rb +3 -2
- data/lib/view_model/domestic_epc_view_model.rb +4 -0
- data/lib/view_model/rd_sap_schema_170/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_171/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_180/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_190/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_200/common_schema.rb +16 -8
- data/lib/view_model/rd_sap_schema_ni_173/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_ni_174/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_ni_180/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_ni_190/common_schema.rb +16 -0
- data/lib/view_model/rd_sap_schema_ni_200/common_schema.rb +16 -4
- data/lib/view_model/rd_sap_wrapper.rb +4 -0
- data/lib/view_model/sap_schema_102/common_schema.rb +33 -10
- data/lib/view_model/sap_schema_102/rdsap.rb +8 -0
- data/lib/view_model/sap_schema_110/common_schema.rb +1 -10
- data/lib/view_model/sap_schema_110/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_110/sap.rb +36 -0
- data/lib/view_model/sap_schema_112/common_schema.rb +1 -10
- data/lib/view_model/sap_schema_112/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_112/sap.rb +36 -0
- data/lib/view_model/sap_schema_120/common_schema.rb +0 -12
- data/lib/view_model/sap_schema_120/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_120/sap.rb +36 -0
- data/lib/view_model/sap_schema_130/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_130/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_130/sap.rb +36 -0
- data/lib/view_model/sap_schema_140/common_schema.rb +0 -8
- data/lib/view_model/sap_schema_140/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_140/sap.rb +36 -0
- data/lib/view_model/sap_schema_141/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_141/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_141/sap.rb +36 -0
- data/lib/view_model/sap_schema_142/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_142/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_142/sap.rb +36 -0
- data/lib/view_model/sap_schema_150/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_150/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_150/sap.rb +36 -0
- data/lib/view_model/sap_schema_160/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_160/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_160/sap.rb +36 -0
- data/lib/view_model/sap_schema_161/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_161/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_161/sap.rb +36 -0
- data/lib/view_model/sap_schema_162/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_162/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_162/sap.rb +36 -0
- data/lib/view_model/sap_schema_163/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_163/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_163/sap.rb +36 -0
- data/lib/view_model/sap_schema_170/common_schema.rb +32 -0
- data/lib/view_model/sap_schema_171/common_schema.rb +32 -4
- data/lib/view_model/sap_schema_1800/common_schema.rb +32 -8
- data/lib/view_model/sap_schema_ni_112/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_112/rdsap.rb +45 -4
- data/lib/view_model/sap_schema_ni_112/sap.rb +35 -0
- data/lib/view_model/sap_schema_ni_120/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_120/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_120/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_130/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_130/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_130/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_140/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_140/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_140/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_141/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_141/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_141/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_142/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_142/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_142/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_150/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_150/rdsap.rb +40 -0
- data/lib/view_model/sap_schema_ni_150/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_160/common_schema.rb +2 -6
- data/lib/view_model/sap_schema_ni_160/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_ni_160/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_161/common_schema.rb +1 -5
- data/lib/view_model/sap_schema_ni_161/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_ni_161/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_170/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_ni_170/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_ni_170/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_171/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_ni_171/rdsap.rb +36 -0
- data/lib/view_model/sap_schema_ni_171/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_172/common_schema.rb +0 -4
- data/lib/view_model/sap_schema_ni_172/rdsap.rb +44 -0
- data/lib/view_model/sap_schema_ni_172/sap.rb +36 -0
- data/lib/view_model/sap_schema_ni_173/common_schema.rb +32 -0
- data/lib/view_model/sap_schema_ni_174/common_schema.rb +32 -0
- data/lib/view_model/sap_schema_ni_1800/common_schema.rb +32 -22
- data/lib/view_model/sap_wrapper.rb +4 -0
- metadata +4 -2
@@ -72,6 +72,42 @@ module ViewModel
|
|
72
72
|
def energy_tariff
|
73
73
|
xpath(%w[Meter-Type])
|
74
74
|
end
|
75
|
+
|
76
|
+
def cylinder_insul_thickness
|
77
|
+
xpath(%w[Cylinder-Insulation-Thickness])
|
78
|
+
end
|
79
|
+
|
80
|
+
def cylinder_insulation_type
|
81
|
+
xpath(%w[Cylinder-Insulation-Type])
|
82
|
+
end
|
83
|
+
|
84
|
+
def cylinder_size
|
85
|
+
xpath(%w[Cylinder-Size])
|
86
|
+
end
|
87
|
+
|
88
|
+
def has_cylinder_thermostat
|
89
|
+
xpath(%w[Cylinder-Thermostat])
|
90
|
+
end
|
91
|
+
|
92
|
+
def mech_vent_sys_index_number
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
def mechanical_vent_data_source
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
def thermal_store
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
def ventilation_type
|
105
|
+
nil
|
106
|
+
end
|
107
|
+
|
108
|
+
def water_heating_fuel
|
109
|
+
xpath(%w[Water-Heating-Fuel])
|
110
|
+
end
|
75
111
|
end
|
76
112
|
end
|
77
113
|
end
|
@@ -17,6 +17,42 @@ module ViewModel
|
|
17
17
|
def construction_year
|
18
18
|
xpath(%w[Construction-Year])
|
19
19
|
end
|
20
|
+
|
21
|
+
def cylinder_insul_thickness
|
22
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
23
|
+
end
|
24
|
+
|
25
|
+
def cylinder_insulation_type
|
26
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
27
|
+
end
|
28
|
+
|
29
|
+
def cylinder_size
|
30
|
+
xpath(%w[Hot-Water-Store-Size])
|
31
|
+
end
|
32
|
+
|
33
|
+
def has_cylinder_thermostat
|
34
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
35
|
+
end
|
36
|
+
|
37
|
+
def mech_vent_sys_index_number
|
38
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
39
|
+
end
|
40
|
+
|
41
|
+
def mechanical_vent_data_source
|
42
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
43
|
+
end
|
44
|
+
|
45
|
+
def thermal_store
|
46
|
+
xpath(%w[Thermal-Store])
|
47
|
+
end
|
48
|
+
|
49
|
+
def ventilation_type
|
50
|
+
xpath(%w[Ventilation-Type])
|
51
|
+
end
|
52
|
+
|
53
|
+
def water_heating_fuel
|
54
|
+
xpath(%w[Water-Fuel-Type])
|
55
|
+
end
|
20
56
|
end
|
21
57
|
end
|
22
58
|
end
|
@@ -72,6 +72,42 @@ module ViewModel
|
|
72
72
|
def energy_tariff
|
73
73
|
xpath(%w[Meter-Type])
|
74
74
|
end
|
75
|
+
|
76
|
+
def cylinder_insul_thickness
|
77
|
+
xpath(%w[Cylinder-Insulation-Thickness])
|
78
|
+
end
|
79
|
+
|
80
|
+
def cylinder_insulation_type
|
81
|
+
xpath(%w[Cylinder-Insulation-Type])
|
82
|
+
end
|
83
|
+
|
84
|
+
def cylinder_size
|
85
|
+
xpath(%w[Cylinder-Size])
|
86
|
+
end
|
87
|
+
|
88
|
+
def has_cylinder_thermostat
|
89
|
+
xpath(%w[Cylinder-Thermostat])
|
90
|
+
end
|
91
|
+
|
92
|
+
def mech_vent_sys_index_number
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
def mechanical_vent_data_source
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
def thermal_store
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
def ventilation_type
|
105
|
+
nil
|
106
|
+
end
|
107
|
+
|
108
|
+
def water_heating_fuel
|
109
|
+
xpath(%w[Water-Heating-Fuel])
|
110
|
+
end
|
75
111
|
end
|
76
112
|
end
|
77
113
|
end
|
@@ -17,6 +17,42 @@ module ViewModel
|
|
17
17
|
def construction_year
|
18
18
|
xpath(%w[Construction-Year])
|
19
19
|
end
|
20
|
+
|
21
|
+
def cylinder_insul_thickness
|
22
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
23
|
+
end
|
24
|
+
|
25
|
+
def cylinder_insulation_type
|
26
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
27
|
+
end
|
28
|
+
|
29
|
+
def cylinder_size
|
30
|
+
xpath(%w[Hot-Water-Store-Size])
|
31
|
+
end
|
32
|
+
|
33
|
+
def has_cylinder_thermostat
|
34
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
35
|
+
end
|
36
|
+
|
37
|
+
def mech_vent_sys_index_number
|
38
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
39
|
+
end
|
40
|
+
|
41
|
+
def mechanical_vent_data_source
|
42
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
43
|
+
end
|
44
|
+
|
45
|
+
def thermal_store
|
46
|
+
xpath(%w[Thermal-Store])
|
47
|
+
end
|
48
|
+
|
49
|
+
def ventilation_type
|
50
|
+
xpath(%w[Ventilation-Type])
|
51
|
+
end
|
52
|
+
|
53
|
+
def water_heating_fuel
|
54
|
+
xpath(%w[Water-Fuel-Type])
|
55
|
+
end
|
20
56
|
end
|
21
57
|
end
|
22
58
|
end
|
@@ -68,6 +68,42 @@ module ViewModel
|
|
68
68
|
def energy_tariff
|
69
69
|
xpath(%w[Meter-Type])
|
70
70
|
end
|
71
|
+
|
72
|
+
def cylinder_insul_thickness
|
73
|
+
xpath(%w[Cylinder-Insulation-Thickness])
|
74
|
+
end
|
75
|
+
|
76
|
+
def cylinder_insulation_type
|
77
|
+
xpath(%w[Cylinder-Insulation-Type])
|
78
|
+
end
|
79
|
+
|
80
|
+
def cylinder_size
|
81
|
+
xpath(%w[Cylinder-Size])
|
82
|
+
end
|
83
|
+
|
84
|
+
def has_cylinder_thermostat
|
85
|
+
xpath(%w[Cylinder-Thermostat])
|
86
|
+
end
|
87
|
+
|
88
|
+
def mech_vent_sys_index_number
|
89
|
+
nil
|
90
|
+
end
|
91
|
+
|
92
|
+
def mechanical_vent_data_source
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
def thermal_store
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
def ventilation_type
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
def water_heating_fuel
|
105
|
+
xpath(%w[Water-Heating-Fuel])
|
106
|
+
end
|
71
107
|
end
|
72
108
|
end
|
73
109
|
end
|
@@ -17,6 +17,42 @@ module ViewModel
|
|
17
17
|
def construction_year
|
18
18
|
xpath(%w[Construction-Year])
|
19
19
|
end
|
20
|
+
|
21
|
+
def cylinder_insul_thickness
|
22
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
23
|
+
end
|
24
|
+
|
25
|
+
def cylinder_insulation_type
|
26
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
27
|
+
end
|
28
|
+
|
29
|
+
def cylinder_size
|
30
|
+
xpath(%w[Hot-Water-Store-Size])
|
31
|
+
end
|
32
|
+
|
33
|
+
def has_cylinder_thermostat
|
34
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
35
|
+
end
|
36
|
+
|
37
|
+
def mech_vent_sys_index_number
|
38
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
39
|
+
end
|
40
|
+
|
41
|
+
def mechanical_vent_data_source
|
42
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
43
|
+
end
|
44
|
+
|
45
|
+
def thermal_store
|
46
|
+
xpath(%w[Thermal-Store])
|
47
|
+
end
|
48
|
+
|
49
|
+
def ventilation_type
|
50
|
+
xpath(%w[Ventilation-Type])
|
51
|
+
end
|
52
|
+
|
53
|
+
def water_heating_fuel
|
54
|
+
xpath(%w[Water-Fuel-Type])
|
55
|
+
end
|
20
56
|
end
|
21
57
|
end
|
22
58
|
end
|
@@ -494,6 +494,38 @@ module ViewModel
|
|
494
494
|
.search("Main-Heating/Environmental-Efficiency-Rating")
|
495
495
|
.map(&:content)
|
496
496
|
end
|
497
|
+
|
498
|
+
def cylinder_insul_thickness
|
499
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
500
|
+
end
|
501
|
+
|
502
|
+
def cylinder_insulation_type
|
503
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
504
|
+
end
|
505
|
+
|
506
|
+
def cylinder_size
|
507
|
+
xpath(%w[Hot-Water-Store-Size])
|
508
|
+
end
|
509
|
+
|
510
|
+
def has_cylinder_thermostat
|
511
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
512
|
+
end
|
513
|
+
|
514
|
+
def mech_vent_sys_index_number
|
515
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
516
|
+
end
|
517
|
+
|
518
|
+
def mechanical_vent_data_source
|
519
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
520
|
+
end
|
521
|
+
|
522
|
+
def thermal_store
|
523
|
+
xpath(%w[Thermal-Store])
|
524
|
+
end
|
525
|
+
|
526
|
+
def ventilation_type
|
527
|
+
xpath(%w[Ventilation-Type])
|
528
|
+
end
|
497
529
|
end
|
498
530
|
end
|
499
531
|
end
|
@@ -393,10 +393,6 @@ module ViewModel
|
|
393
393
|
nil
|
394
394
|
end
|
395
395
|
|
396
|
-
def unheated_corridor_length
|
397
|
-
xpath(%w[Unheated-Corridor-Length])
|
398
|
-
end
|
399
|
-
|
400
396
|
def built_form
|
401
397
|
xpath(%w[Built-Form])
|
402
398
|
end
|
@@ -498,6 +494,38 @@ module ViewModel
|
|
498
494
|
.search("Main-Heating/Environmental-Efficiency-Rating")
|
499
495
|
.map(&:content)
|
500
496
|
end
|
497
|
+
|
498
|
+
def cylinder_insul_thickness
|
499
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
500
|
+
end
|
501
|
+
|
502
|
+
def cylinder_insulation_type
|
503
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
504
|
+
end
|
505
|
+
|
506
|
+
def cylinder_size
|
507
|
+
xpath(%w[Hot-Water-Store-Size])
|
508
|
+
end
|
509
|
+
|
510
|
+
def has_cylinder_thermostat
|
511
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
512
|
+
end
|
513
|
+
|
514
|
+
def mech_vent_sys_index_number
|
515
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
516
|
+
end
|
517
|
+
|
518
|
+
def mechanical_vent_data_source
|
519
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
520
|
+
end
|
521
|
+
|
522
|
+
def thermal_store
|
523
|
+
xpath(%w[Thermal-Store])
|
524
|
+
end
|
525
|
+
|
526
|
+
def ventilation_type
|
527
|
+
xpath(%w[Ventilation-Type])
|
528
|
+
end
|
501
529
|
end
|
502
530
|
end
|
503
531
|
end
|
@@ -297,10 +297,6 @@ module ViewModel
|
|
297
297
|
xpath(%w[Floor-Heat-Loss])
|
298
298
|
end
|
299
299
|
|
300
|
-
def water_heating_code
|
301
|
-
xpath(%w[Water-Heating-Code])
|
302
|
-
end
|
303
|
-
|
304
300
|
def immersion_heating_type
|
305
301
|
xpath(%w[Immersion-Heating-Type])
|
306
302
|
end
|
@@ -353,10 +349,6 @@ module ViewModel
|
|
353
349
|
nil
|
354
350
|
end
|
355
351
|
|
356
|
-
def level
|
357
|
-
xpath(%w[Level])
|
358
|
-
end
|
359
|
-
|
360
352
|
def main_heating_controls
|
361
353
|
xpath(%w[Main-Heating-Controls Description])
|
362
354
|
end
|
@@ -558,6 +550,38 @@ module ViewModel
|
|
558
550
|
.search("Main-Heating/Environmental-Efficiency-Rating")
|
559
551
|
.map(&:content)
|
560
552
|
end
|
553
|
+
|
554
|
+
def cylinder_insul_thickness
|
555
|
+
xpath(%w[Hot-Water-Store-Insulation-Thickness])
|
556
|
+
end
|
557
|
+
|
558
|
+
def cylinder_insulation_type
|
559
|
+
xpath(%w[Hot-Water-Store-Insulation-Type])
|
560
|
+
end
|
561
|
+
|
562
|
+
def cylinder_size
|
563
|
+
xpath(%w[Hot-Water-Store-Size])
|
564
|
+
end
|
565
|
+
|
566
|
+
def has_cylinder_thermostat
|
567
|
+
xpath(%w[Has-Cylinder-Thermostat])
|
568
|
+
end
|
569
|
+
|
570
|
+
def mech_vent_sys_index_number
|
571
|
+
xpath(%w[Mechanical-Vent-System-Index-Number])
|
572
|
+
end
|
573
|
+
|
574
|
+
def mechanical_vent_data_source
|
575
|
+
xpath(%w[Mechanical-Ventilation-Data-Source])
|
576
|
+
end
|
577
|
+
|
578
|
+
def thermal_store
|
579
|
+
xpath(%w[Thermal-Store])
|
580
|
+
end
|
581
|
+
|
582
|
+
def ventilation_type
|
583
|
+
xpath(%w[Ventilation-Type])
|
584
|
+
end
|
561
585
|
end
|
562
586
|
end
|
563
587
|
end
|