epb_view_models 1.0.14 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +10 -10
  4. data/Gemfile.lock +32 -39
  5. data/api/schemas/data/orchestrate.json +4 -0
  6. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/ExternalDefinitions.xml +1352 -0
  7. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/ExternalDefinitions.xsd +236 -0
  8. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/AssessorManagement.xsd +207 -0
  9. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/EPC-Certificate.xsd +476 -0
  10. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/ExceptionList.xsd +18 -0
  11. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/Property.xsd +71 -0
  12. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/ReportList.xsd +25 -0
  13. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/SAP-CollectedData.xsd +1793 -0
  14. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/SAP-Compliance-Report.xsd +36 -0
  15. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/Templates/SAP-Report.xsd +196 -0
  16. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/UDT/EPC-Domains.xsd +558 -0
  17. data/api/schemas/xml/SAP-Schema-19.0.0/SAP/UDT/SAP-Domains.xsd +3127 -0
  18. data/lib/epb_view_models.rb +1 -1
  19. data/lib/presenter/ac_cert/export_configuration.rb +7 -0
  20. data/lib/presenter/ac_report/export_configuration.rb +7 -0
  21. data/lib/presenter/cepc/export_configuration.rb +7 -0
  22. data/lib/presenter/cepc_rr/export_configuration.rb +7 -0
  23. data/lib/presenter/dec/export_configuration.rb +7 -0
  24. data/lib/presenter/dec_rr/export_configuration.rb +7 -0
  25. data/lib/presenter/export/statistics.rb +3 -14
  26. data/lib/presenter/rd_sap/export_configuration.rb +57 -1
  27. data/lib/presenter/sap/export_configuration.rb +7 -0
  28. data/lib/presenter/xml/parser.rb +6 -0
  29. data/lib/view_model/factory.rb +1 -0
  30. data/lib/view_model/sap_schema_1900/common_schema.rb +587 -0
  31. data/lib/view_model/sap_wrapper.rb +2 -0
  32. metadata +22 -2
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns="https://epbr.digital.communities.gov.uk/xsd/sap" xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="https://epbr.digital.communities.gov.uk/xsd/sap" elementFormDefault="qualified"
4
+ attributeFormDefault="unqualified" version="BRUKLD-10.2">
5
+ <xs:include schemaLocation="../UDT/SAP-Domains.xsd"/>
6
+ <xs:element name="SAP-Compliance-Report" type="Compliance-Report"/>
7
+ <xs:complexType name="Compliance-Report">
8
+ <xs:sequence>
9
+ <xs:element name="SAP-Report" type="Energy-Performance-Certificate" minOccurs="1">
10
+ <xs:annotation>
11
+ <xs:documentation>The SAP report corresponding to the compliance report.</xs:documentation>
12
+ </xs:annotation>
13
+ </xs:element>
14
+ <xs:element name="Client-Name" type="xs:string" minOccurs="1">
15
+ <xs:annotation>
16
+ <xs:documentation>Name of the client. External to the EPC schema for GDPR purposes.</xs:documentation>
17
+ </xs:annotation>
18
+ </xs:element>
19
+ <xs:element name="Client-Company" type="xs:string" minOccurs="1">
20
+ <xs:annotation>
21
+ <xs:documentation>Company name of the client. External to the EPC schema for GDPR purposes.</xs:documentation>
22
+ </xs:annotation>
23
+ </xs:element>
24
+ <xs:element name="Client-Address" type="AddressType" minOccurs="1">
25
+ <xs:annotation>
26
+ <xs:documentation>Address of the client. External to the EPC schema for GDPR purposes.</xs:documentation>
27
+ </xs:annotation>
28
+ </xs:element>
29
+ <xs:element name="Is-Multiple-Compliance" type="xs:boolean" default="false" minOccurs="0">
30
+ <xs:annotation>
31
+ <xs:documentation>Is the compliance report part of a multiple compliance calculation.</xs:documentation>
32
+ </xs:annotation>
33
+ </xs:element>
34
+ </xs:sequence>
35
+ </xs:complexType>
36
+ </xs:schema>
@@ -0,0 +1,196 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns="https://epbr.digital.communities.gov.uk/xsd/sap"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ targetNamespace="https://epbr.digital.communities.gov.uk/xsd/sap" elementFormDefault="qualified"
5
+ attributeFormDefault="unqualified" version="19.0.0">
6
+ <xs:include schemaLocation="../UDT/SAP-Domains.xsd"/>
7
+ <xs:include schemaLocation="AssessorManagement.xsd"/>
8
+ <xs:include schemaLocation="Property.xsd"/>
9
+ <xs:include schemaLocation="SAP-CollectedData.xsd"/>
10
+ <xs:include schemaLocation="EPC-Certificate.xsd"/>
11
+ <xs:include schemaLocation="ExceptionList.xsd"/>
12
+ <xs:include schemaLocation="SAP-Compliance-Report.xsd"/>
13
+ <xs:include schemaLocation="ReportList.xsd"/>
14
+ <xs:element name="SAP-Report" type="Energy-Performance-Certificate"/>
15
+ <xs:complexType name="Energy-Performance-Certificate">
16
+ <xs:sequence>
17
+ <xs:element name="Schema-Version-Original" type="xs:string">
18
+ <xs:annotation>
19
+ <xs:documentation>The schema version that the data conformed to when it was lodged.</xs:documentation>
20
+ </xs:annotation>
21
+ </xs:element>
22
+ <xs:element name="Schema-Version-Current" type="xs:string" minOccurs="0">
23
+ <xs:annotation>
24
+ <xs:documentation>The schema version to which the data conforms. This node is inserted by the register when a retrieval is requested. It must not be present in a lodgement being sent to the register.</xs:documentation>
25
+ </xs:annotation>
26
+ </xs:element>
27
+ <xs:element name="SAP-Version" type="SAP-VersionCode">
28
+ <xs:annotation>
29
+ <xs:documentation>SAP version that was used for the calculation.</xs:documentation>
30
+ </xs:annotation>
31
+ </xs:element>
32
+ <xs:element name="SAP-Data-Version" type="SAP-VersionCode">
33
+ <xs:annotation>
34
+ <xs:documentation>Version of SAP that was used to define the input data for the calculation.</xs:documentation>
35
+ </xs:annotation>
36
+ </xs:element>
37
+ <xs:element name="PCDF-Revision-Number" type="xs:nonNegativeInteger" minOccurs="0">
38
+ <xs:annotation>
39
+ <xs:documentation>Revision Number of the PCDF file used for the calculations.</xs:documentation>
40
+ </xs:annotation>
41
+ </xs:element>
42
+ <xs:element name="Calculation-Software-Name" type="xs:string">
43
+ <xs:annotation>
44
+ <xs:documentation>Name of the software used to perform the SAP calculation.</xs:documentation>
45
+ </xs:annotation>
46
+ </xs:element>
47
+ <xs:element name="Calculation-Software-Version" type="xs:string">
48
+ <xs:annotation>
49
+ <xs:documentation>Version of the software used to perform the SAP calculation.</xs:documentation>
50
+ </xs:annotation>
51
+ </xs:element>
52
+ <xs:element name="User-Interface-Name" type="xs:string" minOccurs="0"/>
53
+ <xs:element name="User-Interface-Version" type="xs:string" minOccurs="0"/>
54
+ <xs:element name="Report-Header" type="Report-Header"/>
55
+ <xs:element name="Energy-Assessment" type="Energy-Assessment"/>
56
+ <xs:element name="SAP10-Data" type="SAP10-Data"/>
57
+ <xs:element name="PDF" type="xs:base64Binary" minOccurs="0"/>
58
+ <xs:element name="Insurance-Details" type="Insurance-Details" minOccurs="0"/>
59
+ <xs:element name="ExternalDefinitions-Revision-Number" type="xs:string">
60
+ <xs:annotation>
61
+ <xs:documentation>A number indicating the version of related ExternalDefinitions.xsd</xs:documentation>
62
+ </xs:annotation>
63
+ </xs:element>
64
+ </xs:sequence>
65
+ </xs:complexType>
66
+ <xs:element name="Insurance-Details" type="Insurance-Details"/>
67
+ <xs:complexType name="Insurance-Details">
68
+ <xs:annotation>
69
+ <xs:documentation>Details of the Professional Indemnity Insurance policy used to provide cover against a compensation claim against any particular Home Condition Report.
70
+
71
+ A particular Home Condition Report may be covered by an Professional Indemnity Insurance policy in one of three different ways:
72
+ * The Home Inspector has personal Professional Indemnity Insurance and the Home Condition Report is covered by this.
73
+ * The Home Condition Report is covered by an umbrella Professional Indemnity Insurance policy held by the Home Condition Report Supplier that assigned the inspection to the Home Inspector.
74
+ * An individual insurance policy is taken out to cover the individual report such as the case where the property is unusual and falls outside the Home Inspectors normal Professional Indemnity Insurance policy.
75
+
76
+ A Home Inspector may use any or all of these methods to providing Professional Indemnity Insurance for a Home Condition Report on a case-by-case basis.
77
+ </xs:documentation>
78
+ </xs:annotation>
79
+ <xs:all>
80
+ <xs:element name="Insurer" type="xs:string">
81
+ <xs:annotation>
82
+ <xs:documentation>The name of the insurance company that underwrites / issued the insurance policy</xs:documentation>
83
+ </xs:annotation>
84
+ </xs:element>
85
+ <xs:element name="Policy-No" type="xs:string">
86
+ <xs:annotation>
87
+ <xs:documentation>The policy number of the insurance policy</xs:documentation>
88
+ </xs:annotation>
89
+ </xs:element>
90
+ <xs:element name="Effective-Date" type="xs:date">
91
+ <xs:annotation>
92
+ <xs:documentation>The date that the insurance policy becomes effective (commences cover)</xs:documentation>
93
+ </xs:annotation>
94
+ </xs:element>
95
+ <xs:element name="Expiry-Date" type="xs:date">
96
+ <xs:annotation>
97
+ <xs:documentation>The date that the insurance policy is supposed to expire.</xs:documentation>
98
+ </xs:annotation>
99
+ </xs:element>
100
+ <xs:element name="PI-Limit" type="Money">
101
+ <xs:annotation>
102
+ <xs:documentation>The upper limit of the Professional Indemnity cover provided by the insurance policy.</xs:documentation>
103
+ </xs:annotation>
104
+ </xs:element>
105
+ </xs:all>
106
+ </xs:complexType>
107
+ <xs:element name="Report-Header" type="Report-Header"/>
108
+ <xs:complexType name="Report-Header">
109
+ <xs:annotation>
110
+ <xs:documentation>Report Header contains all the identification and searchable details for the Report.</xs:documentation>
111
+ </xs:annotation>
112
+ <xs:sequence>
113
+ <xs:element name="RRN" type="RRNType">
114
+ <xs:annotation>
115
+ <xs:documentation>Report Reference Number is the unique report Identifier that the report will be publicly known by.
116
+
117
+ The RRN is allocated to the Report at the point that it is registered and will be algorithmically derived from the natural key characteristics of the Home Condition Report i.e. The Unique Property Reference Number (UPRN) and Inspection Date.</xs:documentation>
118
+ </xs:annotation>
119
+ </xs:element>
120
+ <xs:element name="Inspection-Date" type="xs:date">
121
+ <xs:annotation>
122
+ <xs:documentation>The date that the inspection was actually carried out by the Home Inspector.</xs:documentation>
123
+ </xs:annotation>
124
+ </xs:element>
125
+ <xs:element name="Report-Type" type="ReportTypeCode">
126
+ <xs:annotation>
127
+ <xs:documentation>The type of Home Inspection that was carried out.
128
+
129
+ Initially the only allowed type will be a Home Condition Report inspection but this may be extended in the future to cover Energy Assessment Only inspections.</xs:documentation>
130
+ </xs:annotation>
131
+ </xs:element>
132
+ <xs:element name="Completion-Date" type="xs:date">
133
+ <xs:annotation>
134
+ <xs:documentation>The date that the Home Inspector completed the report. This will be after the Inspection Date but generally before the Registration Date.</xs:documentation>
135
+ </xs:annotation>
136
+ </xs:element>
137
+ <xs:element name="Registration-Date" type="xs:date">
138
+ <xs:annotation>
139
+ <xs:documentation>The date that the report was submitted to the HCR Registration Organisation for lodging in the HCR Register.</xs:documentation>
140
+ </xs:annotation>
141
+ </xs:element>
142
+ <xs:element name="Status" type="ReportStatusCode">
143
+ <xs:annotation>
144
+ <xs:documentation>The Status of the Report.
145
+
146
+ A Home Condition Report can have a number of distinct states depending on whereabouts in its overall lifecycle the HCR is - see Home Condition Report Statechart for more details.</xs:documentation>
147
+ </xs:annotation>
148
+ </xs:element>
149
+ <xs:element name="Language-Code" type="LanguageCode">
150
+ <xs:annotation>
151
+ <xs:documentation>The language that the report is written in. </xs:documentation>
152
+ </xs:annotation>
153
+ </xs:element>
154
+ <xs:element name="Tenure" type="TenureCode"/>
155
+ <xs:element name="Transaction-Type" type="TransactionType"/>
156
+ <xs:element name="Seller-Commission-Report" type="Flag">
157
+ <xs:annotation>
158
+ <xs:documentation>Indicates that the HCR was commissioned by the Seller of the Property or their Agent. This is required in order to differentiate these reports from Buyer commisioned reports which are not eligible for inclusion in a Home Information Pack</xs:documentation>
159
+ </xs:annotation>
160
+ </xs:element>
161
+ <xs:element name="Property-Type" type="PropertyTypeCode">
162
+ <xs:annotation>
163
+ <xs:documentation>Describes the type of Property that is being inspected. This should be the same as the Property-Type recorded in the Property-Details section.</xs:documentation>
164
+ </xs:annotation>
165
+ </xs:element>
166
+ <xs:element name="Home-Inspector" type="Home-Inspector"/>
167
+ <xs:element name="Property" type="Property"/>
168
+ <xs:element name="Region-Code" type="UKRegionCode" minOccurs="0">
169
+ <xs:annotation>
170
+ <xs:documentation>Region within the UK.</xs:documentation>
171
+ </xs:annotation>
172
+ </xs:element>
173
+ <xs:element name="Country-Code" type="UKCountryCode" minOccurs="0">
174
+ <xs:annotation>
175
+ <xs:documentation>Country within the UK.</xs:documentation>
176
+ </xs:annotation>
177
+ </xs:element>
178
+ <xs:element name="Related-Party-Disclosure">
179
+ <xs:complexType>
180
+ <xs:choice>
181
+ <xs:element name="Related-Party-Disclosure-Text" type="Sentence">
182
+ <xs:annotation>
183
+ <xs:documentation>For backward compatibility only.</xs:documentation>
184
+ </xs:annotation>
185
+ </xs:element>
186
+ <xs:element name="Related-Party-Disclosure-Number" type="DisclosureCode">
187
+ <xs:annotation>
188
+ <xs:documentation>Code indicating any potential conflicts of interest or commercial relationships with other parties.</xs:documentation>
189
+ </xs:annotation>
190
+ </xs:element>
191
+ </xs:choice>
192
+ </xs:complexType>
193
+ </xs:element>
194
+ </xs:sequence>
195
+ </xs:complexType>
196
+ </xs:schema>