epb_view_models 1.0.3 → 1.0.4

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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/api/schemas/xml/RdSAP-Schema-NI-19.0/RdSAP/Templates/EPC-CollectedData.xsd +13 -12
  4. data/lib/epb_view_models.rb +1 -1
  5. data/lib/helper/energy_band_calculator.rb +1 -1
  6. data/lib/helper/xml_enums_to_output.rb +264 -114
  7. data/lib/presenter/export/domestic.rb +1 -1
  8. data/lib/presenter/rd_sap/report.rb +21 -11
  9. data/lib/presenter/sap/report.rb +19 -7
  10. data/lib/presenter/sap/summary.rb +1 -1
  11. data/lib/view_model/domestic_epc_view_model.rb +4 -0
  12. data/lib/view_model/rd_sap_schema_200/common_schema.rb +0 -4
  13. data/lib/view_model/rd_sap_schema_ni_200/common_schema.rb +0 -4
  14. data/lib/view_model/sap_schema_102/common_schema.rb +5 -6
  15. data/lib/view_model/sap_schema_102/rdsap.rb +4 -0
  16. data/lib/view_model/sap_schema_110/common_schema.rb +0 -4
  17. data/lib/view_model/sap_schema_110/rdsap.rb +8 -0
  18. data/lib/view_model/sap_schema_110/sap.rb +8 -0
  19. data/lib/view_model/sap_schema_112/common_schema.rb +0 -4
  20. data/lib/view_model/sap_schema_112/rdsap.rb +8 -0
  21. data/lib/view_model/sap_schema_112/sap.rb +8 -0
  22. data/lib/view_model/sap_schema_120/common_schema.rb +0 -4
  23. data/lib/view_model/sap_schema_120/rdsap.rb +8 -0
  24. data/lib/view_model/sap_schema_120/sap.rb +8 -0
  25. data/lib/view_model/sap_schema_130/common_schema.rb +0 -4
  26. data/lib/view_model/sap_schema_130/rdsap.rb +8 -0
  27. data/lib/view_model/sap_schema_130/sap.rb +8 -0
  28. data/lib/view_model/sap_schema_140/common_schema.rb +0 -4
  29. data/lib/view_model/sap_schema_140/rdsap.rb +8 -0
  30. data/lib/view_model/sap_schema_140/sap.rb +8 -0
  31. data/lib/view_model/sap_schema_141/common_schema.rb +0 -4
  32. data/lib/view_model/sap_schema_141/rdsap.rb +8 -0
  33. data/lib/view_model/sap_schema_141/sap.rb +8 -0
  34. data/lib/view_model/sap_schema_142/common_schema.rb +0 -4
  35. data/lib/view_model/sap_schema_142/rdsap.rb +8 -0
  36. data/lib/view_model/sap_schema_142/sap.rb +8 -0
  37. data/lib/view_model/sap_schema_150/common_schema.rb +0 -4
  38. data/lib/view_model/sap_schema_150/rdsap.rb +8 -0
  39. data/lib/view_model/sap_schema_150/sap.rb +8 -0
  40. data/lib/view_model/sap_schema_160/common_schema.rb +0 -4
  41. data/lib/view_model/sap_schema_160/rdsap.rb +8 -0
  42. data/lib/view_model/sap_schema_160/sap.rb +8 -0
  43. data/lib/view_model/sap_schema_161/common_schema.rb +0 -4
  44. data/lib/view_model/sap_schema_161/rdsap.rb +8 -0
  45. data/lib/view_model/sap_schema_161/sap.rb +8 -0
  46. data/lib/view_model/sap_schema_162/common_schema.rb +0 -4
  47. data/lib/view_model/sap_schema_162/rdsap.rb +8 -0
  48. data/lib/view_model/sap_schema_162/sap.rb +8 -0
  49. data/lib/view_model/sap_schema_163/common_schema.rb +0 -4
  50. data/lib/view_model/sap_schema_163/rdsap.rb +8 -0
  51. data/lib/view_model/sap_schema_163/sap.rb +8 -0
  52. data/lib/view_model/sap_schema_170/common_schema.rb +4 -0
  53. data/lib/view_model/sap_schema_171/common_schema.rb +4 -0
  54. data/lib/view_model/sap_schema_1800/common_schema.rb +4 -4
  55. data/lib/view_model/sap_schema_ni_112/common_schema.rb +1 -5
  56. data/lib/view_model/sap_schema_ni_112/rdsap.rb +13 -0
  57. data/lib/view_model/sap_schema_ni_112/sap.rb +8 -0
  58. data/lib/view_model/sap_schema_ni_120/common_schema.rb +1 -5
  59. data/lib/view_model/sap_schema_ni_120/rdsap.rb +8 -0
  60. data/lib/view_model/sap_schema_ni_120/sap.rb +8 -0
  61. data/lib/view_model/sap_schema_ni_130/common_schema.rb +1 -5
  62. data/lib/view_model/sap_schema_ni_130/rdsap.rb +8 -0
  63. data/lib/view_model/sap_schema_ni_130/sap.rb +8 -0
  64. data/lib/view_model/sap_schema_ni_140/common_schema.rb +1 -5
  65. data/lib/view_model/sap_schema_ni_140/rdsap.rb +8 -0
  66. data/lib/view_model/sap_schema_ni_140/sap.rb +8 -0
  67. data/lib/view_model/sap_schema_ni_141/common_schema.rb +1 -5
  68. data/lib/view_model/sap_schema_ni_141/rdsap.rb +8 -0
  69. data/lib/view_model/sap_schema_ni_141/sap.rb +8 -0
  70. data/lib/view_model/sap_schema_ni_142/common_schema.rb +1 -5
  71. data/lib/view_model/sap_schema_ni_142/rdsap.rb +8 -0
  72. data/lib/view_model/sap_schema_ni_142/sap.rb +8 -0
  73. data/lib/view_model/sap_schema_ni_150/common_schema.rb +1 -5
  74. data/lib/view_model/sap_schema_ni_150/rdsap.rb +8 -0
  75. data/lib/view_model/sap_schema_ni_150/sap.rb +8 -0
  76. data/lib/view_model/sap_schema_ni_160/common_schema.rb +0 -4
  77. data/lib/view_model/sap_schema_ni_160/rdsap.rb +8 -0
  78. data/lib/view_model/sap_schema_ni_160/sap.rb +8 -0
  79. data/lib/view_model/sap_schema_ni_161/common_schema.rb +0 -4
  80. data/lib/view_model/sap_schema_ni_161/rdsap.rb +8 -0
  81. data/lib/view_model/sap_schema_ni_161/sap.rb +8 -0
  82. data/lib/view_model/sap_schema_ni_170/common_schema.rb +0 -4
  83. data/lib/view_model/sap_schema_ni_170/rdsap.rb +8 -0
  84. data/lib/view_model/sap_schema_ni_170/sap.rb +8 -0
  85. data/lib/view_model/sap_schema_ni_171/common_schema.rb +0 -4
  86. data/lib/view_model/sap_schema_ni_171/rdsap.rb +8 -0
  87. data/lib/view_model/sap_schema_ni_171/sap.rb +8 -0
  88. data/lib/view_model/sap_schema_ni_172/common_schema.rb +0 -4
  89. data/lib/view_model/sap_schema_ni_172/rdsap.rb +8 -0
  90. data/lib/view_model/sap_schema_ni_172/sap.rb +8 -0
  91. data/lib/view_model/sap_schema_ni_173/common_schema.rb +4 -0
  92. data/lib/view_model/sap_schema_ni_174/common_schema.rb +4 -0
  93. data/lib/view_model/sap_schema_ni_1800/common_schema.rb +4 -4
  94. metadata +2 -3
  95. data/.DS_Store +0 -0
@@ -186,7 +186,7 @@ module ViewModel
186
186
  end
187
187
 
188
188
  def tenure
189
- xpath(%w[Tenure])
189
+ nil
190
190
  end
191
191
 
192
192
  def transaction_type
@@ -231,10 +231,6 @@ module ViewModel
231
231
  xpath(%w[Secondary-Fuel-Type])
232
232
  end
233
233
 
234
- def water_heating_fuel
235
- xpath(%w[Water-Fuel-Type])
236
- end
237
-
238
234
  def type_of_assessment
239
235
  case xpath(%w[Report-Type]).to_i
240
236
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -183,7 +183,7 @@ module ViewModel
183
183
  end
184
184
 
185
185
  def tenure
186
- xpath(%w[Tenure])
186
+ nil
187
187
  end
188
188
 
189
189
  def transaction_type
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -183,7 +183,7 @@ module ViewModel
183
183
  end
184
184
 
185
185
  def tenure
186
- xpath(%w[Tenure])
186
+ nil
187
187
  end
188
188
 
189
189
  def transaction_type
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -183,7 +183,7 @@ module ViewModel
183
183
  end
184
184
 
185
185
  def tenure
186
- xpath(%w[Tenure])
186
+ nil
187
187
  end
188
188
 
189
189
  def transaction_type
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -183,7 +183,7 @@ module ViewModel
183
183
  end
184
184
 
185
185
  def tenure
186
- xpath(%w[Tenure])
186
+ nil
187
187
  end
188
188
 
189
189
  def transaction_type
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -183,7 +183,7 @@ module ViewModel
183
183
  end
184
184
 
185
185
  def tenure
186
- xpath(%w[Tenure])
186
+ nil
187
187
  end
188
188
 
189
189
  def transaction_type
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -36,6 +36,14 @@ module ViewModel
36
36
  def thermal_store
37
37
  xpath(%w[Thermal-Store])
38
38
  end
39
+
40
+ def ventilation_type
41
+ xpath(%w[Ventilation-Type])
42
+ end
43
+
44
+ def water_heating_fuel
45
+ xpath(%w[Water-Fuel-Type])
46
+ end
39
47
  end
40
48
  end
41
49
  end
@@ -223,10 +223,6 @@ module ViewModel
223
223
  xpath(%w[Secondary-Fuel-Type])
224
224
  end
225
225
 
226
- def water_heating_fuel
227
- xpath(%w[Water-Fuel-Type])
228
- end
229
-
230
226
  def type_of_assessment
231
227
  case xpath(%w[Report-Type]).to_i
232
228
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -45,6 +45,14 @@ module ViewModel
45
45
  def thermal_store
46
46
  xpath(%w[Thermal-Store])
47
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
48
56
  end
49
57
  end
50
58
  end
@@ -219,10 +219,6 @@ module ViewModel
219
219
  xpath(%w[Secondary-Fuel-Type])
220
220
  end
221
221
 
222
- def water_heating_fuel
223
- xpath(%w[Water-Fuel-Type])
224
- end
225
-
226
222
  def type_of_assessment
227
223
  case xpath(%w[Report-Type]).to_i
228
224
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -45,6 +45,14 @@ module ViewModel
45
45
  def thermal_store
46
46
  xpath(%w[Thermal-Store])
47
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
48
56
  end
49
57
  end
50
58
  end
@@ -228,10 +228,6 @@ module ViewModel
228
228
  xpath(%w[Secondary-Fuel-Type])
229
229
  end
230
230
 
231
- def water_heating_fuel
232
- xpath(%w[Water-Fuel-Type])
233
- end
234
-
235
231
  def type_of_assessment
236
232
  case xpath(%w[Report-Type]).to_i
237
233
  when 1
@@ -92,6 +92,14 @@ module ViewModel
92
92
  def thermal_store
93
93
  nil
94
94
  end
95
+
96
+ def ventilation_type
97
+ nil
98
+ end
99
+
100
+ def water_heating_fuel
101
+ xpath(%w[Water-Heating-Fuel])
102
+ end
95
103
  end
96
104
  end
97
105
  end
@@ -45,6 +45,14 @@ module ViewModel
45
45
  def thermal_store
46
46
  xpath(%w[Thermal-Store])
47
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
48
56
  end
49
57
  end
50
58
  end