epb_view_models 2.2.20 → 2.3.0
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/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +21 -21
- data/api/schemas/data/orchestrate.json +4 -0
- data/api/schemas/xml/CEPC-S-7.0/Reports/BaseDataTypes.xsd +296 -296
- data/api/schemas/xml/CEPC-S-7.0/Reports/CEPC-Reports.xsd +63 -63
- data/api/schemas/xml/CEPC-S-7.0/Reports/Input-Data.xsd +34 -34
- data/api/schemas/xml/CEPC-S-7.0/Reports/Performance-Summary.xsd +120 -120
- data/api/schemas/xml/CEPC-S-7.0/Reports/Property.xsd +67 -67
- data/api/schemas/xml/CEPC-S-7.0/Reports/Report-Header.xsd +178 -178
- data/api/schemas/xml/CEPC-S-7.0/Reports/Reported-Data.xsd +391 -391
- data/api/schemas/xml/CEPC-S-7.0/Reports/UserManagement.xsd +171 -171
- data/api/schemas/xml/CEPC-S-7.1/Reports/BaseDataTypes.xsd +300 -300
- data/api/schemas/xml/CEPC-S-7.1/Reports/CEPC-Reports.xsd +66 -66
- data/api/schemas/xml/CEPC-S-7.1/Reports/Input-Data.xsd +34 -34
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd +125 -125
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd.bak +123 -123
- data/api/schemas/xml/CEPC-S-7.1/Reports/Property.xsd +67 -67
- data/api/schemas/xml/CEPC-S-7.1/Reports/Report-Header.xsd +178 -178
- data/api/schemas/xml/CEPC-S-7.1/Reports/Reported-Data.xsd +406 -406
- data/api/schemas/xml/CEPC-S-7.1/Reports/UserManagement.xsd +174 -174
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/CommonFiles/CommonStructures.xsd +160 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/CommonFiles/Exceptions.xsd +72 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/ExternalDefinitions.xsd +147 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeAccessRequest_1.xsd +44 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeAccessResponse_1.xsd +47 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeStatusRequest_1.xsd +44 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportChangeStatusResponse_1.xsd +47 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportCreateRequest_1.xsd +41 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportCreateResponse_1.xsd +52 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportRetrieveRequest_1.xsd +52 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/ConditionReportRetrieveResponse_1.xsd +87 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateRequest_1.xsd +44 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateResponse_1.xsd +28 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateStatusRequest_1.xsd +30 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/HomeInspectorRegisterUpdateStatusResponse_1.xsd +52 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/PropertyUPRNValidationRequest_1.xsd +44 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Messages/PropertyUPRNValidationResponse_1.xsd +46 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/EPC-Certificate.xsd +270 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/Property.xsd +68 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/SAP05-CollectedData.xsd +1188 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/SAP05-Report.xsd +195 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/Templates/UserManagement.xsd +215 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/BaseDataTypes.xsd +175 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/EPC-Domains.xsd +703 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/SAP05-Domains.xsd +3007 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/SAP-EPC/UDT/SharedDomains.xsd +311 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/EPC-Certificate.xsd +252 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/EPC-CollectedData.xsd +444 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-FeaturesExternal.xsd +283 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-FeaturesGrounds.xsd +222 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-FeaturesInternal.xsd +205 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-FeaturesServices.xsd +311 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-PropertyDetails.xsd +380 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HCR-RiskAssessment.xsd +297 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/HIP-Reports.xsd +220 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/Property.xsd +73 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/Templates/UserManagement.xsd +257 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/BaseDataTypes.xsd +176 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/EPC-Domains.xsd +743 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/HCR-Domains.xsd +1773 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/SAP-Domains.xsd +1134 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/SharedDomains.xsd +660 -0
- data/api/schemas/xml/RdSAP-Schema-S-14.0/RdSAP/UDT/TypeDefinitions.xsd +19 -0
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/ExternalDefinitions.xml +1456 -1456
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/ExternalDefinitions.xsd +236 -236
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/AssessorManagement.xsd +16 -16
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/EPC-Certificate.xsd +388 -388
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/EPC-CollectedData.xsd +784 -784
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-FeaturesExternal.xsd +283 -283
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-FeaturesGrounds.xsd +222 -222
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-FeaturesInternal.xsd +205 -205
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-FeaturesServices.xsd +311 -311
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-PropertyDetails.xsd +380 -380
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/HCR-RiskAssessment.xsd +298 -298
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/Property.xsd +67 -67
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/SAP-Reports.xsd +201 -201
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/Templates/UserManagement.xsd +259 -259
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/BaseDataTypes.xsd +176 -176
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/EPC-Domains.xsd +881 -881
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/HCR-Domains.xsd +1779 -1779
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/SAP-Domains.xsd +1650 -1650
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/SharedDomains.xsd +768 -768
- data/api/schemas/xml/RdSAP-Schema-S-16.1/RdSAP/UDT/TypeDefinitions.xsd +19 -19
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/ExternalDefinitions.xml +1456 -1456
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/ExternalDefinitions.xsd +236 -236
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/AssessorManagement.xsd +208 -208
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/EPC-CollectedData.xsd +957 -957
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/ExceptionList.xsd +18 -18
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/RdSAP-Report.xsd +180 -180
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/UDT/EPC-Domains.xsd +843 -843
- data/api/schemas/xml/RdSAP-Schema-S-17.00/RdSAP/UDT/SAP-Domains.xsd +2541 -2541
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/ExternalDefinitions.xml +1456 -1456
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/ExternalDefinitions.xsd +236 -236
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/EPC-CollectedData.xsd +966 -966
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/ExceptionList.xsd +18 -18
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/RdSAP-Report.xsd +175 -175
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/UDT/EPC-Domains.xsd +853 -853
- data/api/schemas/xml/RdSAP-Schema-S-18.0/RdSAP/UDT/SAP-Domains.xsd +2551 -2551
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/ExternalDefinitions.xsd +261 -261
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-CollectedData.xsd +1051 -1051
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/RdSAP-Report.xsd +176 -176
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/EPC-Domains.xsd +858 -858
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/SAP-Domains.xsd +2684 -2684
- data/api/schemas/xml/RdSAP-Schema-S-21.0/RdSAP/Templates/RdSAP-Report.cs +11846 -11846
- data/epb_view_models.gemspec +3 -2
- data/lib/epb_view_models.rb +1 -1
- data/lib/view_model/cepc_s_70/cepc.rb +5 -5
- data/lib/view_model/cepc_s_71/cepc.rb +5 -5
- data/lib/view_model/cs63/common_schema.rb +1 -1
- data/lib/view_model/factory.rb +1 -0
- data/lib/view_model/rd_sap_schema_ni_173/common_schema.rb +8 -8
- data/lib/view_model/rd_sap_schema_ni_174/common_schema.rb +8 -8
- data/lib/view_model/rd_sap_schema_ni_180/common_schema.rb +8 -8
- data/lib/view_model/rd_sap_schema_ni_190/common_schema.rb +8 -8
- data/lib/view_model/rd_sap_schema_ni_200/common_schema.rb +8 -8
- data/lib/view_model/rd_sap_schema_s_140/common_schema.rb +550 -0
- data/lib/view_model/rd_sap_schema_s_190/common_schema.rb +41 -41
- data/lib/view_model/rd_sap_schema_s_210/common_schema.rb +35 -35
- data/lib/view_model/rd_sap_wrapper.rb +2 -0
- data/lib/view_model/sap_schema_1900/common_schema.rb +6 -6
- data/lib/view_model/sap_schema_1910/common_schema.rb +6 -6
- data/lib/view_model/sap_schema_1920/common_schema.rb +6 -6
- data/lib/view_model/sap_schema_ni_173/common_schema.rb +8 -8
- data/lib/view_model/sap_schema_ni_174/common_schema.rb +8 -8
- data/lib/view_model/sap_schema_ni_1800/common_schema.rb +8 -8
- data/lib/view_model/sap_schema_s_1900/common_schema.rb +11 -11
- metadata +62 -4
data/epb_view_models.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.summary = "Library used to parse Energy Performance Certificates (EPC)"
|
|
11
11
|
spec.homepage = "https://github.com/communitiesuk/epb-view-models"
|
|
12
12
|
spec.license = "MIT"
|
|
13
|
-
spec.required_ruby_version = ">= 3.
|
|
13
|
+
spec.required_ruby_version = ">= 3.4"
|
|
14
14
|
|
|
15
15
|
# Specify which files should be added to the gem when it is released.
|
|
16
16
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = %w[lib]
|
|
23
23
|
|
|
24
|
-
spec.add_dependency "nokogiri", "~> 1.
|
|
24
|
+
spec.add_dependency "nokogiri", "~> 1.18"
|
|
25
|
+
spec.add_dependency "rexml", "~> 3.3"
|
|
25
26
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
|
26
27
|
end
|
data/lib/epb_view_models.rb
CHANGED
|
@@ -103,11 +103,11 @@ module ViewModel
|
|
|
103
103
|
@xml_doc
|
|
104
104
|
.search("Recommendations-Report RR-Recommendations/#{payback}")
|
|
105
105
|
.map do |node|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
{
|
|
107
|
+
code: node.at("Recommendation-Code").content,
|
|
108
|
+
text: node.at("Recommendation").content,
|
|
109
|
+
cO2Impact: node.at("CO2-Impact").content,
|
|
110
|
+
}
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
end
|
|
@@ -103,11 +103,11 @@ module ViewModel
|
|
|
103
103
|
@xml_doc
|
|
104
104
|
.search("Recommendations-Report RR-Recommendations/#{payback}")
|
|
105
105
|
.map do |node|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
{
|
|
107
|
+
code: node.at("Recommendation-Code").content,
|
|
108
|
+
text: node.at("Recommendation").content,
|
|
109
|
+
cO2Impact: node.at("CO2-Impact").content,
|
|
110
|
+
}
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
end
|
data/lib/view_model/factory.rb
CHANGED
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.3", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.3", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.4", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.4", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-18.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-18.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-19.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-19.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -578,14 +578,14 @@ module ViewModel
|
|
|
578
578
|
@xml_doc
|
|
579
579
|
.search("Suggested-Improvements Improvement")
|
|
580
580
|
.map do |node|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
581
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
582
|
+
{
|
|
583
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
584
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
585
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-20.0.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
586
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-20.0.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
587
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
588
|
+
}
|
|
589
589
|
end
|
|
590
590
|
end
|
|
591
591
|
end
|