epb_view_models 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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
@@ -232,10 +232,6 @@ module ViewModel
232
232
  xpath(%w[Secondary-Fuel-Type])
233
233
  end
234
234
 
235
- def water_heating_fuel
236
- xpath(%w[Water-Fuel-Type])
237
- end
238
-
239
235
  def type_of_assessment
240
236
  case xpath(%w[Report-Type]).to_i
241
237
  when 1
@@ -100,6 +100,14 @@ module ViewModel
100
100
  def thermal_store
101
101
  nil
102
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
103
111
  end
104
112
  end
105
113
  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
@@ -506,6 +506,10 @@ module ViewModel
506
506
  def thermal_store
507
507
  xpath(%w[Thermal-Store])
508
508
  end
509
+
510
+ def ventilation_type
511
+ xpath(%w[Ventilation-Type])
512
+ end
509
513
  end
510
514
  end
511
515
  end
@@ -506,6 +506,10 @@ module ViewModel
506
506
  def thermal_store
507
507
  xpath(%w[Thermal-Store])
508
508
  end
509
+
510
+ def ventilation_type
511
+ xpath(%w[Ventilation-Type])
512
+ end
509
513
  end
510
514
  end
511
515
  end
@@ -267,10 +267,6 @@ module ViewModel
267
267
  "SAP"
268
268
  end
269
269
 
270
- def water_heating_code
271
- xpath(%w[Water-Heating-Code])
272
- end
273
-
274
270
  def immersion_heating_type
275
271
  xpath(%w[Immersion-Heating-Type])
276
272
  end
@@ -570,6 +566,10 @@ module ViewModel
570
566
  def thermal_store
571
567
  xpath(%w[Thermal-Store])
572
568
  end
569
+
570
+ def ventilation_type
571
+ xpath(%w[Ventilation-Type])
572
+ end
573
573
  end
574
574
  end
575
575
  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.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MHCLG Energy Performance of Buildings
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-26 00:00:00.000000000 Z
11
+ date: 2021-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -45,7 +45,6 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".DS_Store"
49
48
  - ".buildspec.yml"
50
49
  - ".gitignore"
51
50
  - ".rspec"
data/.DS_Store DELETED
Binary file