class ViewModel::SapSchemaNi112::Rdsap

Public Instance Methods

all_wall_descriptions() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 32
def all_wall_descriptions
  @xml_doc.search("Wall/Description").map(&:content)
end
all_wall_energy_efficiency_rating() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 36
def all_wall_energy_efficiency_rating
  @xml_doc.search("Wall/Energy-Efficiency-Rating").map(&:content)
end
all_wall_env_energy_efficiency_rating() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 40
def all_wall_env_energy_efficiency_rating
  @xml_doc.search("Wall/Environmental-Efficiency-Rating").map(&:content)
end
cylinder_insul_thickness() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 72
def cylinder_insul_thickness
  xpath(%w[Cylinder-Insulation-Thickness])
end
cylinder_insulation_type() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 80
def cylinder_insulation_type
  xpath(%w[Cylinder-Insulation-Type])
end
cylinder_size() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 84
def cylinder_size
  xpath(%w[Cylinder-Size])
end
energy_tariff() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 68
def energy_tariff
  xpath(%w[Meter-Type])
end
floor_height() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 60
def floor_height
  @xml_doc.search("Room-Height").map(&:content)
end
glazed_area() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 76
def glazed_area
  xpath(%w[Glazed-Area])
end
habitable_room_count() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 44
def habitable_room_count
  xpath(%w[Habitable-Room-Count])
end
has_cylinder_thermostat() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 88
def has_cylinder_thermostat
  xpath(%w[Cylinder-Thermostat])
end
heated_room_count() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 48
def heated_room_count
  xpath(%w[Heated-Room-Count])
end
main_dwelling_construction_age_band_or_year() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 4
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|
    identifier = sap_building_part.at("Identifier")
    if identifier&.content == "Main Dwelling"
      return(
        sap_building_part.at_xpath(
          "Construction-Age-Band | Construction-Year",
        )&.content
      )
    end
  end
  nil
end
mech_vent_sys_index_number() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 92
def mech_vent_sys_index_number
  nil
end
mechanical_vent_data_source() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 96
def mechanical_vent_data_source
  nil
end
mechanical_ventilation() click to toggle source

DO NOT CORRECT - this typo is present in the schema XML pre 12.0

# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 101
def mechanical_ventilation
  xpath(%w[Mechanical-Ventliation])
end
photovoltaic_roof_area_percent() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 52
def photovoltaic_roof_area_percent
  xpath(%w[Photovoltaic-Supply])
end
solar_water_heating_flag() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 56
def solar_water_heating_flag
  xpath(%w[Solar-Water-Heating])
end
storey_count() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 64
def storey_count
  xpath(%w[Storey-Count])
end
thermal_store() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 105
def thermal_store
  nil
end
ventilation_type() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 109
def ventilation_type
  nil
end
water_heating_fuel() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 113
def water_heating_fuel
  xpath(%w[Water-Heating-Fuel])
end
window_description() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 20
def window_description
  xpath(%w[Window Description])
end
window_energy_efficiency_rating() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 24
def window_energy_efficiency_rating
  xpath(%w[Window Energy-Efficiency-Rating])
end
window_environmental_efficiency_rating() click to toggle source
# File lib/view_model/sap_schema_ni_112/rdsap.rb, line 28
def window_environmental_efficiency_rating
  xpath(%w[Window Environmental-Efficiency-Rating])
end