Class: ViewModel::RdSapSchemaS120::CommonSchema

Inherits:
DomesticEpcViewModel show all
Defined in:
lib/view_model/rd_sap_schema_s_120/common_schema.rb

Instance Method Summary collapse

Methods inherited from DomesticEpcViewModel

#assessor_contact_address, #company_name, #has_hot_water_cylinder, #improvement_title, #main_heating_category, #multi_glazing_type, #property_type, #status, #water_heating_code

Instance Method Details

#addendumObject



534
535
536
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 534

def addendum
  nil
end

#address_idObject



60
61
62
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 60

def address_id
  "LPRN-#{xpath(%w[UPRN])}"
end

#address_line1Object



8
9
10
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 8

def address_line1
  xpath(%w[Property Address Address-Line-1])
end

#address_line2Object



12
13
14
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 12

def address_line2
  xpath(%w[Property Address Address-Line-2]).to_s
end

#address_line3Object



16
17
18
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 16

def address_line3
  xpath(%w[Property Address Address-Line-3]).to_s
end

#address_line4Object



20
21
22
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 20

def address_line4
  xpath(%w[Property Address Address-Line-4]).to_s
end

#all_floor_descriptionsObject



459
460
461
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 459

def all_floor_descriptions
  @xml_doc.search("Property-Summary/Floor/Description").map(&:content)
end

#all_floor_energy_efficiency_ratingObject



463
464
465
466
467
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 463

def all_floor_energy_efficiency_rating
  @xml_doc
    .search("Property-Summary/Floor/Energy-Efficiency-Rating")
    .map(&:content)
end

#all_floor_env_energy_efficiency_ratingObject



469
470
471
472
473
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 469

def all_floor_env_energy_efficiency_rating
  @xml_doc
    .search("Property-Summary/Floor/Environmental-Efficiency-Rating")
    .map(&:content)
end

#all_hot_water_descriptionsObject



271
272
273
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 271

def all_hot_water_descriptions
  @xml_doc.search("Hot-Water/Description").map(&:content)
end

#all_lighting_descriptionsObject



275
276
277
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 275

def all_lighting_descriptions
  @xml_doc.search("Lighting/Description").map(&:content)
end

#all_main_heating_controls_descriptionsObject



257
258
259
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 257

def all_main_heating_controls_descriptions
  @xml_doc.search("Main-Heating-Controls/Description").map(&:content)
end

#all_main_heating_controls_energy_efficiencyObject



475
476
477
478
479
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 475

def all_main_heating_controls_energy_efficiency
  @xml_doc
    .search("Main-Heating-Controls/Energy-Efficiency-Rating")
    .map(&:content)
end

#all_main_heating_controls_environmental_efficiencyObject



481
482
483
484
485
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 481

def all_main_heating_controls_environmental_efficiency
  @xml_doc
    .search("Main-Heating-Controls/Environmental-Efficiency-Rating")
    .map(&:content)
end

#all_main_heating_descriptionsObject



253
254
255
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 253

def all_main_heating_descriptions
  @xml_doc.search("Main-Heating/Description").map(&:content)
end

#all_main_heating_energy_efficiencyObject



261
262
263
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 261

def all_main_heating_energy_efficiency
  @xml_doc.search("Main-Heating/Energy-Efficiency-Rating").map(&:content)
end

#all_main_heating_environmental_efficiencyObject



265
266
267
268
269
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 265

def all_main_heating_environmental_efficiency
  @xml_doc
    .search("Main-Heating/Environmental-Efficiency-Rating")
    .map(&:content)
end

#all_roof_descriptionsObject



237
238
239
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 237

def all_roof_descriptions
  @xml_doc.search("Roof/Description").map(&:content)
end

#all_roof_energy_efficiency_ratingObject



241
242
243
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 241

def all_roof_energy_efficiency_rating
  @xml_doc.search("Roof/Energy-Efficiency-Rating").map(&:content)
end

#all_roof_env_energy_efficiency_ratingObject



245
246
247
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 245

def all_roof_env_energy_efficiency_rating
  @xml_doc.search("Roof/Environmental-Efficiency-Rating").map(&:content)
end

#all_secondary_heating_descriptionsObject



279
280
281
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 279

def all_secondary_heating_descriptions
  @xml_doc.search("Secondary-Heating/Description").map(&:content)
end

#all_wall_descriptionsObject



427
428
429
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 427

def all_wall_descriptions
  @xml_doc.search("Wall/Description").map(&:content)
end

#all_wall_energy_efficiency_ratingObject



431
432
433
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 431

def all_wall_energy_efficiency_rating
  @xml_doc.search("Wall/Energy-Efficiency-Rating").map(&:content)
end

#all_wall_env_energy_efficiency_ratingObject



435
436
437
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 435

def all_wall_env_energy_efficiency_rating
  @xml_doc.search("Wall/Environmental-Efficiency-Rating").map(&:content)
end

#all_window_descriptionsObject



249
250
251
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 249

def all_window_descriptions
  @xml_doc.search("Window/Description").map(&:content)
end

#assessment_idObject



4
5
6
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 4

def assessment_id
  xpath(%w[RRN])
end

#assessor_emailObject



40
41
42
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 40

def assessor_email
  xpath(%w[Home-Inspector E-Mail])
end

#assessor_nameObject



36
37
38
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 36

def assessor_name
  "#{xpath(%w[Home-Inspector Name First-Name])} #{xpath(%w[Home-Inspector Name Surname])}"
end

#assessor_telephoneObject



44
45
46
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 44

def assessor_telephone
  xpath(%w[Home-Inspector Telephone])
end

#built_formObject



415
416
417
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 415

def built_form
  xpath(%w[Built-Form])
end

#co2_emissions_current_per_floor_areaObject



299
300
301
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 299

def co2_emissions_current_per_floor_area
  xpath(%w[CO2-Emissions-Current-Per-Floor-Area])&.to_f
end

#country_codeObject



283
284
285
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 283

def country_code
  xpath(%w[Country-Code])
end

#current_carbon_emissionObject



157
158
159
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 157

def current_carbon_emission
  xpath(%w[CO2-Emissions-Current])
end

#current_energy_ratingObject



165
166
167
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 165

def current_energy_rating
  xpath(%w[Energy-Rating-Current])&.to_i
end

#current_space_heating_demandObject



189
190
191
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 189

def current_space_heating_demand
  nil
end

#current_water_heating_demandObject



193
194
195
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 193

def current_water_heating_demand
  nil
end

#cylinder_insul_thicknessObject



505
506
507
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 505

def cylinder_insul_thickness
  xpath(%w[Cylinder-Insulation-Thickness])
end

#cylinder_insulation_typeObject



509
510
511
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 509

def cylinder_insulation_type
  xpath(%w[Cylinder-Insulation-Type])
end

#cylinder_sizeObject



513
514
515
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 513

def cylinder_size
  xpath(%w[Cylinder-Size])
end

#date_of_assessmentObject



48
49
50
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 48

def date_of_assessment
  xpath(%w[Inspection-Date])
end

#date_of_completionObject



56
57
58
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 56

def date_of_completion
  xpath(%w[Completion-Date])
end

#date_of_expiryObject



64
65
66
67
68
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 64

def date_of_expiry
  expires_at = (Date.parse(date_of_registration) - 1) >> 12 * 10

  expires_at.to_s
end

#date_of_registrationObject



52
53
54
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 52

def date_of_registration
  xpath(%w[Registration-Date])
end

#dwelling_typeObject



173
174
175
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 173

def dwelling_type
  ""
end

#electricity_smart_meter_presentObject



542
543
544
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 542

def electricity_smart_meter_present
  nil
end

#energy_consumption_potentialObject



233
234
235
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 233

def energy_consumption_potential
  xpath(%w[Energy-Consumption-Potential])&.to_f
end

#energy_rating_currentObject



213
214
215
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 213

def energy_rating_current
  xpath(%w[Energy-Rating-Current])&.to_i
end

#energy_rating_potentialObject



217
218
219
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 217

def energy_rating_potential
  xpath(%w[Energy-Rating-Potential])&.to_i
end

#environmental_impact_currentObject



221
222
223
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 221

def environmental_impact_current
  xpath(%w[Environmental-Impact-Current])&.to_i
end

#environmental_impact_potentialObject



225
226
227
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 225

def environmental_impact_potential
  xpath(%w[Environmental-Impact-Potential])&.to_i
end

#extensions_countObject



419
420
421
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 419

def extensions_count
  xpath(%w[Extensions-Count])&.to_i
end

#fixed_lighting_outlets_countObject



339
340
341
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 339

def fixed_lighting_outlets_count
  xpath(%w[Fixed-Lighting-Outlets-Count])&.to_i
end

#floor_heightObject



455
456
457
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 455

def floor_height
  @xml_doc.search("Room-Height").map(&:content)
end

#floor_levelObject



443
444
445
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 443

def floor_level
  xpath(%w[Flat-Location])
end

#gas_smart_meter_presentObject



538
539
540
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 538

def gas_smart_meter_present
  nil
end

#glazed_areaObject



327
328
329
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 327

def glazed_area
  xpath(%w[Glazed-Area])
end

#habitable_room_countObject



209
210
211
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 209

def habitable_room_count
  xpath(%w[Habitable-Room-Count])&.to_i
end

#has_cylinder_thermostatObject



517
518
519
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 517

def has_cylinder_thermostat
  xpath(%w[Cylinder-Thermostat])
end

#heat_loss_corridorObject



367
368
369
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 367

def heat_loss_corridor
  xpath(%w[Heat-Loss-Corridor])
end

#heated_room_countObject



331
332
333
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 331

def heated_room_count
  xpath(%w[Heated-Room-Count])&.to_i
end

#heating_cost_currentObject



145
146
147
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 145

def heating_cost_current
  xpath(%w[Heating-Cost-Current])
end

#heating_cost_potentialObject



133
134
135
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 133

def heating_cost_potential
  xpath(%w[Heating-Cost-Potential])
end

#hot_water_cost_currentObject



141
142
143
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 141

def hot_water_cost_current
  xpath(%w[Hot-Water-Cost-Current])
end

#hot_water_cost_potentialObject



129
130
131
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 129

def hot_water_cost_potential
  xpath(%w[Hot-Water-Cost-Potential])
end

#hot_water_descriptionObject



351
352
353
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 351

def hot_water_description
  xpath(%w[Hot-Water Description])
end

#hot_water_energy_efficiency_ratingObject



355
356
357
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 355

def hot_water_energy_efficiency_rating
  xpath(%w[Hot-Water Energy-Efficiency-Rating])
end

#hot_water_environmental_efficiency_ratingObject



359
360
361
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 359

def hot_water_environmental_efficiency_rating
  xpath(%w[Hot-Water Environmental-Efficiency-Rating])
end

#impact_of_cavity_insulationObject



197
198
199
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 197

def impact_of_cavity_insulation
  nil
end

#impact_of_loft_insulationObject



201
202
203
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 201

def impact_of_loft_insulation
  nil
end

#impact_of_solid_wall_insulationObject



205
206
207
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 205

def impact_of_solid_wall_insulation
  nil
end

#improvementsObject



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 95

def improvements
  @xml_doc
    .search("Suggested-Improvements Improvement")
    .map do |node|
      {
        energy_performance_rating_improvement: xpath(%w[Energy-Performance-Rating], node).to_i,
        environmental_impact_rating_improvement: xpath(%w[Environmental-Impact-Rating], node).to_i,
        green_deal_category_code: nil,
        improvement_category: xpath(%w[Improvement-Category], node),
        improvement_code: nil,
        improvement_description: xpath(%w[Improvement-Description], node),
        improvement_title: improvement_title(node),
        improvement_type: nil,
        indicative_cost: nil,
        sequence: xpath(%w[Sequence], node).to_i,
        typical_saving: xpath(%w[Typical-Saving], node),
      }
    end
end

#levelObject



307
308
309
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 307

def level
  xpath(%w[Level])
end

#lighting_cost_currentObject



149
150
151
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 149

def lighting_cost_current
  xpath(%w[Lighting-Cost-Current])
end

#lighting_cost_potentialObject



137
138
139
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 137

def lighting_cost_potential
  xpath(%w[Lighting-Cost-Potential])
end

#lighting_descriptionObject



399
400
401
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 399

def lighting_description
  xpath(%w[Lighting Description])
end

#lighting_energy_efficiency_ratingObject



403
404
405
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 403

def lighting_energy_efficiency_rating
  xpath(%w[Lighting Energy-Efficiency-Rating])
end

#lighting_environmental_efficiency_ratingObject



407
408
409
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 407

def lighting_environmental_efficiency_rating
  xpath(%w[Lighting Environmental-Efficiency-Rating])
end

#low_energy_fixed_lighting_outlets_countObject



343
344
345
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 343

def low_energy_fixed_lighting_outlets_count
  xpath(%w[Low-Energy-Fixed-Lighting-Outlets-Count])&.to_i
end

#low_energy_lightingObject



335
336
337
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 335

def low_energy_lighting
  xpath(%w[Low-Energy-Lighting])
end

#lzc_energy_sourcesObject



525
526
527
528
529
530
531
532
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 525

def lzc_energy_sources
  return nil if xpath(%w[LZC-Energy-Sources]).nil?

  @xml_doc
    .search("LZC-Energy-Sources/LZC-Energy-Source")
    .select(&:element?)
    .map { |n| n.text.to_i }
end

#main_dwelling_construction_age_band_or_yearObject



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 487

def main_dwelling_construction_age_band_or_year
  sap_building_parts =
    @xml_doc.xpath("//SAP-Building-Parts/SAP-Building-Part")
  sap_building_parts.each do |sap_building_part|
    building_part_number = sap_building_part.at("Building-Part-Number")

    # Identifies the Main Dwelling
    if building_part_number&.content == "1"
      return (
        sap_building_part.at_xpath(
          "Construction-Age-Band | Construction-Year",
        )&.content
      )
    end
  end
  nil
end

#main_fuel_typeObject



287
288
289
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 287

def main_fuel_type
  xpath(%w[Main-Fuel-Type])
end

#main_heating_controlsObject



319
320
321
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 319

def main_heating_controls
  xpath(%w[Main-Heating-Controls Description])
end

#mains_gasObject



303
304
305
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 303

def mains_gas
  xpath(%w[Mains-Gas])
end

#mechanical_ventilationObject



451
452
453
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 451

def mechanical_ventilation
  xpath(%w[Mechanical-Ventilation])
end

#meter_typeObject



439
440
441
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 439

def meter_type
  xpath(%w[Meter-Type])
end

#multiple_glazed_proportionObject



323
324
325
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 323

def multiple_glazed_proportion
  xpath(%w[Multiple-Glazed-Proportion])
end

#open_fireplaces_countObject



347
348
349
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 347

def open_fireplaces_count
  xpath(%w[Open-Fireplaces-Count])&.to_i
end

#party_wall_constructionObject



521
522
523
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 521

def party_wall_construction
  xpath(%w[SAP-Building-Part Party-Wall-Construction])
end

#photovoltaic_roof_area_percentObject



411
412
413
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 411

def photovoltaic_roof_area_percent
  xpath(%w[Photovoltaic-Supply Percent-Roof-Area])
end

#postcodeObject



28
29
30
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 28

def postcode
  xpath(%w[Property Address Postcode])
end

#potential_carbon_emissionObject



153
154
155
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 153

def potential_carbon_emission
  xpath(%w[CO2-Emissions-Potential])
end

#potential_energy_ratingObject



161
162
163
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 161

def potential_energy_rating
  xpath(%w[Energy-Rating-Potential])&.to_i
end

#primary_energy_useObject



229
230
231
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 229

def primary_energy_use
  xpath(%w[Energy-Consumption-Current])&.to_f
end

#property_age_bandObject



177
178
179
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 177

def property_age_band
  xpath(%w[Construction-Age-Band])
end

#property_summaryObject



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 70

def property_summary
  @xml_doc.search("Energy-Assessment Property-Summary").children.select(
    &:element?
  ).map { |node|
    next if xpath(%w[Energy-Efficiency-Rating], node).nil?

    {
      energy_efficiency_rating:
        xpath(%w[Energy-Efficiency-Rating], node).to_i,
      environmental_efficiency_rating:
        xpath(%w[Environmental-Efficiency-Rating], node).to_i,
      name: node.name.underscore,
      description: xpath(%w[Description], node),
    }
  }.compact
end

#recommendations_for_reportObject



115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 115

def recommendations_for_report
  @xml_doc
    .search("Suggested-Improvements Improvement")
    .map do |node|
      {
        sequence: xpath(%w[Sequence], node).to_i,
        improvement_summary: xpath(%w[Improvement-Summary], node),
        improvement_description: xpath(%w[Improvement-Description], node),
        improvement_code: nil,
        indicative_cost: nil,
      }
    end
end


91
92
93
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 91

def related_party_disclosure_number
  nil
end


87
88
89
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 87

def related_party_disclosure_text
  nil
end

#report_typeObject



423
424
425
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 423

def report_type
  xpath(%w[Report-Type])
end

#scheme_assessor_idObject



32
33
34
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 32

def scheme_assessor_id
  xpath(%w[Identification-Number Membership-Number]) or xpath(%w[Identification-Number Certificate-Number])
end

#secondary_fuel_typeObject



291
292
293
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 291

def secondary_fuel_type
  xpath(%w[Secondary-Fuel-Type])
end

#secondary_heating_descriptionObject



387
388
389
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 387

def secondary_heating_description
  xpath(%w[Secondary-Heating Description])
end

#secondary_heating_energy_efficiency_ratingObject



391
392
393
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 391

def secondary_heating_energy_efficiency_rating
  xpath(%w[Secondary-Heating Energy-Efficiency-Rating])
end

#secondary_heating_environmental_efficiency_ratingObject



395
396
397
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 395

def secondary_heating_environmental_efficiency_rating
  xpath(%w[Secondary-Heating Environmental-Efficiency-Rating])
end

#solar_water_heating_flagObject



447
448
449
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 447

def solar_water_heating_flag
  xpath(%w[Solar-Water-Heating])
end

#storey_countObject



315
316
317
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 315

def storey_count
  xpath(%w[Storey-Count])&.to_i
end

#tenureObject



181
182
183
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 181

def tenure
  nil
end

#top_storeyObject



311
312
313
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 311

def top_storey
  xpath(%w[Top-Storey])
end

#total_floor_areaObject



169
170
171
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 169

def total_floor_area
  xpath(%w[Total-Floor-Area])
end

#townObject



24
25
26
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 24

def town
  xpath(%w[Property Address Post-Town])
end

#transaction_typeObject



185
186
187
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 185

def transaction_type
  xpath(%w[Transaction-Type])
end

#unheated_corridor_lengthObject



371
372
373
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 371

def unheated_corridor_length
  xpath(%w[Unheated-Corridor-Length])
end

#water_heating_fuelObject



295
296
297
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 295

def water_heating_fuel
  xpath(%w[Water-Heating-Fuel])
end

#wind_turbine_countObject



363
364
365
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 363

def wind_turbine_count
  xpath(%w[Wind-Turbines-Count])&.to_i
end

#window_descriptionObject



375
376
377
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 375

def window_description
  xpath(%w[Window Description])
end

#window_energy_efficiency_ratingObject



379
380
381
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 379

def window_energy_efficiency_rating
  xpath(%w[Window Energy-Efficiency-Rating])
end

#window_environmental_efficiency_ratingObject



383
384
385
# File 'lib/view_model/rd_sap_schema_s_120/common_schema.rb', line 383

def window_environmental_efficiency_rating
  xpath(%w[Window Environmental-Efficiency-Rating])
end