epb_view_models 2.2.13 → 2.2.14
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.
- checksums.yaml +4 -4
- data/lib/epb_view_models.rb +1 -1
- data/lib/view_model/rd_sap_schema_s_190/common_schema.rb +97 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75e967a3adf0402bc42780fee8db05794e1c5aec0bde4d5a06ab642d946def10
|
|
4
|
+
data.tar.gz: cca7f31cf0268b164d693f02b92e0cb129d6e09de0e61b44778ea7d656763a58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05dd97560b0132e8cc85254611902bd46803590b75650a262724c072a503ebda5a4383dfb456aefcfbfcb96a0d3ab163a85c0f18e514ca8874796690047c0c68
|
|
7
|
+
data.tar.gz: d650e82077611f64bb5f518ce219ed308614e1a9c250b013e5d5294f58db3deadc1d4cd62836941d125a6f098a6d937f4326d69f98fa23e8fce5ec364bd39ad8
|
data/lib/epb_view_models.rb
CHANGED
|
@@ -537,6 +537,8 @@ module ViewModel
|
|
|
537
537
|
xpath(%w[SAP-Building-Part Party-Wall-Construction])
|
|
538
538
|
end
|
|
539
539
|
|
|
540
|
+
# For lodgement rules
|
|
541
|
+
|
|
540
542
|
def party_walls_construction
|
|
541
543
|
@xml_doc
|
|
542
544
|
.search("SAP-Building-Part")
|
|
@@ -553,12 +555,107 @@ module ViewModel
|
|
|
553
555
|
alternative_wall_thickness: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness")&.content,
|
|
554
556
|
alternative_wall_thickness_measured: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness-Measured")&.content,
|
|
555
557
|
alternative_wall_construction: node.at_xpath("SAP-Alternative-Wall/Wall-Construction")&.content,
|
|
558
|
+
alternative_wall_u_value: node.at_xpath("SAP-Alternative-Wall/Wall-U-Value")&.content,
|
|
559
|
+
alternative_wall_insulation_thickness: node.at_xpath("SAP-Alternative-Wall/Wall-Insulation-Thickness")&.content,
|
|
556
560
|
wall_thickness: node.at_xpath("Wall-Thickness")&.content,
|
|
557
561
|
wall_construction: node.at_xpath("Wall-Construction")&.content,
|
|
558
562
|
wall_thickness_measured: node.at_xpath("Wall-Thickness-Measured")&.content,
|
|
559
563
|
}
|
|
560
564
|
end
|
|
561
565
|
end
|
|
566
|
+
|
|
567
|
+
def rooves_construction_and_insulation
|
|
568
|
+
@xml_doc
|
|
569
|
+
.search("SAP-Building-Part")
|
|
570
|
+
.map do |node|
|
|
571
|
+
{
|
|
572
|
+
roof_insulation_location: node.at_xpath("Roof-Insulation-Location")&.content,
|
|
573
|
+
roof_construction: node.at_xpath("Roof-Construction")&.content,
|
|
574
|
+
}
|
|
575
|
+
end
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
def rooms_in_roof_insulation
|
|
579
|
+
@xml_doc
|
|
580
|
+
.search("SAP-Building-Part")
|
|
581
|
+
.map do |node|
|
|
582
|
+
xpath(%w[SAP-Room-In-Roof Insulation])
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
def floors_insulation
|
|
587
|
+
@xml_doc
|
|
588
|
+
.search("SAP-Building-Part")
|
|
589
|
+
.map do |node|
|
|
590
|
+
{
|
|
591
|
+
floor_u_value: node.at_xpath("Floor-U-Value")&.content,
|
|
592
|
+
floor_insulation_thickness: node.at_xpath("Floor-Insulation-Thickness")&.content,
|
|
593
|
+
}
|
|
594
|
+
end
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
def rooves_insulation
|
|
598
|
+
@xml_doc
|
|
599
|
+
.search("SAP-Building-Part")
|
|
600
|
+
.map do |node|
|
|
601
|
+
{
|
|
602
|
+
roof_u_value: node.at_xpath("Roof-U-Value")&.content,
|
|
603
|
+
roof_insulation_thickness: node.at_xpath("Roof-Insulation-Thickness")&.content,
|
|
604
|
+
rafter_insulation_thickness: node.at_xpath("Rafter-Insulation-Thickness")&.content,
|
|
605
|
+
flat_roof_insulation_thickness: node.at_xpath("Flat-Roof-Insulation-Thickness")&.content,
|
|
606
|
+
sloping_ceiling_insulation_thickness: node.at_xpath("Sloping-Ceiling-Insulation-Thickness")&.content,
|
|
607
|
+
}
|
|
608
|
+
end
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
def walls_insulation
|
|
612
|
+
@xml_doc
|
|
613
|
+
.search("SAP-Building-Part")
|
|
614
|
+
.map do |node|
|
|
615
|
+
{
|
|
616
|
+
wall_u_value: node.at_xpath("Wall-U-Value")&.content,
|
|
617
|
+
wall_insulation_thickness: node.at_xpath("Wall-Insulation-Thickness")&.content,
|
|
618
|
+
}
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
def rooms_in_roof
|
|
623
|
+
@xml_doc
|
|
624
|
+
.search("SAP-Building-Part")
|
|
625
|
+
.map do |node|
|
|
626
|
+
node.at_xpath("SAP-Room-In-Roof")&.content.to_s
|
|
627
|
+
end
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
def rooms_in_roof_roof_insulation
|
|
631
|
+
@xml_doc
|
|
632
|
+
.search("SAP-Building-Part")
|
|
633
|
+
.map do |node|
|
|
634
|
+
{
|
|
635
|
+
roof_insulation_thickness: xpath(%w[SAP-Room-In-Roof Roof-Insulation-Thickness]),
|
|
636
|
+
room_in_roof_details: xpath(%w[SAP-Room-In-Roof Room-In-Roof-Details]),
|
|
637
|
+
}
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
def main_heating_details
|
|
642
|
+
@xml_doc
|
|
643
|
+
.search("Main-Heating")
|
|
644
|
+
.map do |node|
|
|
645
|
+
{
|
|
646
|
+
main_heating_index_number: xpath(%w[Main-Heating-Index-Number]),
|
|
647
|
+
sap_main_heating_code: xpath(%w[SAP-Main-Heating-Code]),
|
|
648
|
+
main_fuel_type: xpath(%w[Main-Fuel-Type]),
|
|
649
|
+
}
|
|
650
|
+
end
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
def water_heating
|
|
654
|
+
{
|
|
655
|
+
water_heating_fuel: xpath(%w[Water-Heating-Fuel]),
|
|
656
|
+
water_heating_code: xpath(%w[Water-Heating-Code]),
|
|
657
|
+
}
|
|
658
|
+
end
|
|
562
659
|
end
|
|
563
660
|
end
|
|
564
661
|
end
|