sdb-reader 0.9.0__py3-none-any.whl
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.
- sdb_reader/__init__.py +157 -0
- sdb_reader/ask.py +437 -0
- sdb_reader/ask_record.schema.json +388 -0
- sdb_reader/cli.py +1079 -0
- sdb_reader/clp_statements_de.json +997 -0
- sdb_reader/compliance.py +546 -0
- sdb_reader/current.py +134 -0
- sdb_reader/diff.py +520 -0
- sdb_reader/embedded.py +250 -0
- sdb_reader/extraction.py +506 -0
- sdb_reader/layout.py +894 -0
- sdb_reader/line_breaks.py +40 -0
- sdb_reader/messages.py +394 -0
- sdb_reader/messages_data/de.toml +146 -0
- sdb_reader/messages_data/en.toml +141 -0
- sdb_reader/model.py +321 -0
- sdb_reader/parser.py +4601 -0
- sdb_reader/pictograms.py +374 -0
- sdb_reader/presets.py +110 -0
- sdb_reader/presets.toml +23 -0
- sdb_reader/py.typed +0 -0
- sdb_reader/read_record.schema.json +792 -0
- sdb_reader/reading.py +94 -0
- sdb_reader/scan.py +265 -0
- sdb_reader/schema.py +96 -0
- sdb_reader/serialise.py +463 -0
- sdb_reader/show.py +370 -0
- sdb_reader/statements.py +1011 -0
- sdb_reader/verification.py +322 -0
- sdb_reader/versions.py +31 -0
- sdb_reader-0.9.0.dist-info/METADATA +117 -0
- sdb_reader-0.9.0.dist-info/RECORD +37 -0
- sdb_reader-0.9.0.dist-info/WHEEL +5 -0
- sdb_reader-0.9.0.dist-info/entry_points.txt +2 -0
- sdb_reader-0.9.0.dist-info/licenses/LICENSE +661 -0
- sdb_reader-0.9.0.dist-info/licenses/NOTICE +40 -0
- sdb_reader-0.9.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/foerdebaumarkt/sdb-reader/blob/main/src/sdb_reader/read_record.schema.json",
|
|
4
|
+
"title": "One record of what `sdb-reader read` prints",
|
|
5
|
+
"description": "The command prints a JSON array with one such record per file. Every record has the same keys for its kind of file (SDW-19): file, verification and the lists warnings, errors and findings always; extraction where text could be read; sheet, statements, parser and sheets for a German safety data sheet and for no other file; parts where such a file holds several sheets (SDW-32). A file the parser broke on is named on stderr and has no record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"file",
|
|
10
|
+
"verification",
|
|
11
|
+
"warnings",
|
|
12
|
+
"errors",
|
|
13
|
+
"findings"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"file": {
|
|
17
|
+
"$ref": "#/$defs/file"
|
|
18
|
+
},
|
|
19
|
+
"verification": {
|
|
20
|
+
"$ref": "#/$defs/verification"
|
|
21
|
+
},
|
|
22
|
+
"extraction": {
|
|
23
|
+
"$ref": "#/$defs/extraction"
|
|
24
|
+
},
|
|
25
|
+
"sheet": {
|
|
26
|
+
"$ref": "#/$defs/sheet"
|
|
27
|
+
},
|
|
28
|
+
"parser": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": [
|
|
32
|
+
"warnings"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"warnings": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"$ref": "#/$defs/message"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"description": "What the parser noted while reading the sheet; the list is empty where it noted nothing. For a German safety data sheet."
|
|
43
|
+
},
|
|
44
|
+
"statements": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "#/$defs/statement"
|
|
48
|
+
},
|
|
49
|
+
"description": "The label's H, P and EUH statements, each with the sheet's wording and the regulation's. Only for a German safety data sheet."
|
|
50
|
+
},
|
|
51
|
+
"sheet_count": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 1,
|
|
54
|
+
"description": "How many safety data sheets the file holds (SDB-2). Only for a German safety data sheet."
|
|
55
|
+
},
|
|
56
|
+
"cover_page": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Whether a cover page stands in front of the file's sheets (SDB-138). It is no sheet and nothing is read from it. Only for a German safety data sheet."
|
|
59
|
+
},
|
|
60
|
+
"display_term": {
|
|
61
|
+
"type": [
|
|
62
|
+
"string",
|
|
63
|
+
"null"
|
|
64
|
+
],
|
|
65
|
+
"description": "The word on the cover page that names a display, as printed, such as \"Mix-Display\"; null where there is no cover page or it names none (SDB-138). Only for a German safety data sheet."
|
|
66
|
+
},
|
|
67
|
+
"parts": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"minItems": 2,
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/$defs/part"
|
|
72
|
+
},
|
|
73
|
+
"description": "Only for a file that holds several sheets: each sheet read on its own, in the file's order (SDB-118). The keys sheet, statements, parser and findings beside it are the file's: its sheets united."
|
|
74
|
+
},
|
|
75
|
+
"findings": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"$ref": "#/$defs/finding"
|
|
79
|
+
},
|
|
80
|
+
"description": "What is wrong with the sheet as a document: for a German safety data sheet, and one entry for a sheet in another language. Empty for every other file."
|
|
81
|
+
},
|
|
82
|
+
"embedded_data": {
|
|
83
|
+
"$ref": "#/$defs/embedded_data"
|
|
84
|
+
},
|
|
85
|
+
"warnings": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"$ref": "#/$defs/message"
|
|
89
|
+
},
|
|
90
|
+
"description": "What the reading as a whole notes: that the file is no German sheet, or that its text could not be read. Empty for a sheet."
|
|
91
|
+
},
|
|
92
|
+
"errors": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"$ref": "#/$defs/message"
|
|
96
|
+
},
|
|
97
|
+
"description": "Why no text could be read from the file. Empty where text was read."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"$defs": {
|
|
101
|
+
"file": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"filename",
|
|
106
|
+
"path",
|
|
107
|
+
"size_bytes"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"path": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "The absolute path of the file read."
|
|
113
|
+
},
|
|
114
|
+
"filename": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"size_bytes": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"minimum": 0
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"verification": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"errors",
|
|
128
|
+
"kind",
|
|
129
|
+
"prints_statement_codes",
|
|
130
|
+
"warnings"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"kind": {
|
|
134
|
+
"enum": [
|
|
135
|
+
"safety-data-sheet",
|
|
136
|
+
"safety-information",
|
|
137
|
+
"safety-data-sheet-other-language",
|
|
138
|
+
"document"
|
|
139
|
+
],
|
|
140
|
+
"description": "What the file is; safety-data-sheet is a German safety data sheet, the only kind whose sheet is read."
|
|
141
|
+
},
|
|
142
|
+
"prints_statement_codes": {
|
|
143
|
+
"type": [
|
|
144
|
+
"boolean",
|
|
145
|
+
"null"
|
|
146
|
+
],
|
|
147
|
+
"description": "For a file that is no safety data sheet and no safety information: whether it prints at least three different H, P or EUH codes. Otherwise null."
|
|
148
|
+
},
|
|
149
|
+
"warnings": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {
|
|
152
|
+
"$ref": "#/$defs/message"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"errors": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"$ref": "#/$defs/message"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"extraction": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"required": [
|
|
167
|
+
"stage",
|
|
168
|
+
"extractor",
|
|
169
|
+
"pages_sampled",
|
|
170
|
+
"warnings",
|
|
171
|
+
"character_count"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"stage": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "The reading stage the text comes from: the version of the stage and of the PDF library, as extraction_stage() names it. Two runs of different stages may differ because the text differs."
|
|
177
|
+
},
|
|
178
|
+
"extractor": {
|
|
179
|
+
"enum": [
|
|
180
|
+
"pymupdf",
|
|
181
|
+
"pymupdf+ocr"
|
|
182
|
+
],
|
|
183
|
+
"description": "How the text was read: from the text layer, or with text recognition where the layer is missing."
|
|
184
|
+
},
|
|
185
|
+
"pages_sampled": {
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"minimum": 0
|
|
188
|
+
},
|
|
189
|
+
"warnings": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"items": {
|
|
192
|
+
"$ref": "#/$defs/message"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"character_count": {
|
|
196
|
+
"type": [
|
|
197
|
+
"integer",
|
|
198
|
+
"null"
|
|
199
|
+
],
|
|
200
|
+
"minimum": 0
|
|
201
|
+
},
|
|
202
|
+
"tesseract": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "The version of the tesseract program that read the text. Only where text recognition read it, in whole or for single pages."
|
|
205
|
+
},
|
|
206
|
+
"raw_text": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "The text before tidying. Only with --include-raw-text."
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"description": "How the file's text was read. Missing for a file that could not be read."
|
|
212
|
+
},
|
|
213
|
+
"sheet": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": [
|
|
217
|
+
"contact_info",
|
|
218
|
+
"content_hash",
|
|
219
|
+
"countries",
|
|
220
|
+
"hazard_statements",
|
|
221
|
+
"issue_date",
|
|
222
|
+
"language",
|
|
223
|
+
"product_identifier",
|
|
224
|
+
"revision_date",
|
|
225
|
+
"section_text",
|
|
226
|
+
"sheet_required",
|
|
227
|
+
"stated_classification",
|
|
228
|
+
"version"
|
|
229
|
+
],
|
|
230
|
+
"properties": {
|
|
231
|
+
"version": {
|
|
232
|
+
"type": [
|
|
233
|
+
"string",
|
|
234
|
+
"null"
|
|
235
|
+
],
|
|
236
|
+
"description": "The sheet's own version, as printed."
|
|
237
|
+
},
|
|
238
|
+
"content_hash": {
|
|
239
|
+
"type": [
|
|
240
|
+
"string",
|
|
241
|
+
"null"
|
|
242
|
+
],
|
|
243
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
244
|
+
"description": "SHA-256 of the text read, so that copies of one sheet under several names can be told."
|
|
245
|
+
},
|
|
246
|
+
"product_identifier": {
|
|
247
|
+
"type": [
|
|
248
|
+
"string",
|
|
249
|
+
"null"
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"issue_date": {
|
|
253
|
+
"type": [
|
|
254
|
+
"string",
|
|
255
|
+
"null"
|
|
256
|
+
],
|
|
257
|
+
"format": "date",
|
|
258
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
259
|
+
},
|
|
260
|
+
"revision_date": {
|
|
261
|
+
"type": [
|
|
262
|
+
"string",
|
|
263
|
+
"null"
|
|
264
|
+
],
|
|
265
|
+
"format": "date",
|
|
266
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
267
|
+
},
|
|
268
|
+
"language": {
|
|
269
|
+
"type": "string"
|
|
270
|
+
},
|
|
271
|
+
"countries": {
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": {
|
|
274
|
+
"enum": [
|
|
275
|
+
"DE",
|
|
276
|
+
"AT",
|
|
277
|
+
"CH"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"description": "The countries the sheet is issued for; empty where it names none."
|
|
281
|
+
},
|
|
282
|
+
"stated_classification": {
|
|
283
|
+
"enum": [
|
|
284
|
+
"classified",
|
|
285
|
+
"classified-old-system",
|
|
286
|
+
"not-classified",
|
|
287
|
+
"not-stated"
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"stated_voluntary": {
|
|
291
|
+
"type": "boolean",
|
|
292
|
+
"description": "Whether the sheet says of itself that it is issued voluntarily or that no safety data sheet is prescribed for its product."
|
|
293
|
+
},
|
|
294
|
+
"stated_article": {
|
|
295
|
+
"type": "boolean",
|
|
296
|
+
"description": "Whether the sheet calls its product an article: beside the sentence that makes it voluntary, or by saying that as an article it is not subject to labelling."
|
|
297
|
+
},
|
|
298
|
+
"sheet_required": {
|
|
299
|
+
"type": "boolean",
|
|
300
|
+
"description": "Whether, by this sheet, its product needs a safety data sheet."
|
|
301
|
+
},
|
|
302
|
+
"hazard_statements": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"additionalProperties": false,
|
|
305
|
+
"required": [
|
|
306
|
+
"hazard_codes",
|
|
307
|
+
"hazard_text",
|
|
308
|
+
"pictograms",
|
|
309
|
+
"precautionary_codes",
|
|
310
|
+
"precautionary_text",
|
|
311
|
+
"signal_word",
|
|
312
|
+
"supplemental_codes",
|
|
313
|
+
"supplemental_text"
|
|
314
|
+
],
|
|
315
|
+
"properties": {
|
|
316
|
+
"hazard_codes": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"items": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"precautionary_codes": {
|
|
323
|
+
"type": "array",
|
|
324
|
+
"items": {
|
|
325
|
+
"type": "string"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"supplemental_codes": {
|
|
329
|
+
"type": "array",
|
|
330
|
+
"items": {
|
|
331
|
+
"type": "string"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"signal_word": {
|
|
335
|
+
"enum": [
|
|
336
|
+
"Gefahr",
|
|
337
|
+
"Achtung",
|
|
338
|
+
null
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
"pictograms": {
|
|
342
|
+
"type": "array",
|
|
343
|
+
"items": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"pattern": "^GHS\\d{1,2}$"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"hazard_text": {
|
|
349
|
+
"type": [
|
|
350
|
+
"string",
|
|
351
|
+
"null"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"precautionary_text": {
|
|
355
|
+
"type": [
|
|
356
|
+
"string",
|
|
357
|
+
"null"
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"supplemental_text": {
|
|
361
|
+
"type": [
|
|
362
|
+
"string",
|
|
363
|
+
"null"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"contact_info": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"additionalProperties": false,
|
|
371
|
+
"required": [
|
|
372
|
+
"emergency_phone",
|
|
373
|
+
"supplier_address",
|
|
374
|
+
"supplier_email",
|
|
375
|
+
"supplier_name",
|
|
376
|
+
"supplier_phone",
|
|
377
|
+
"supplier_website"
|
|
378
|
+
],
|
|
379
|
+
"properties": {
|
|
380
|
+
"supplier_name": {
|
|
381
|
+
"type": [
|
|
382
|
+
"string",
|
|
383
|
+
"null"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
"supplier_address": {
|
|
387
|
+
"type": [
|
|
388
|
+
"string",
|
|
389
|
+
"null"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"supplier_phone": {
|
|
393
|
+
"type": [
|
|
394
|
+
"string",
|
|
395
|
+
"null"
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"emergency_phone": {
|
|
399
|
+
"type": [
|
|
400
|
+
"string",
|
|
401
|
+
"null"
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
"supplier_email": {
|
|
405
|
+
"type": [
|
|
406
|
+
"string",
|
|
407
|
+
"null"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"supplier_website": {
|
|
411
|
+
"type": [
|
|
412
|
+
"string",
|
|
413
|
+
"null"
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
"information_email": {
|
|
417
|
+
"description": "The address the sheet names for whoever answers for it: the competent person's, else an information office's. Null where no such label stands at an address. Not in records written before the field existed.",
|
|
418
|
+
"type": [
|
|
419
|
+
"string",
|
|
420
|
+
"null"
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"section_text": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"propertyNames": {
|
|
428
|
+
"pattern": "^section_(?:[1-9]|1[0-6])$"
|
|
429
|
+
},
|
|
430
|
+
"additionalProperties": {
|
|
431
|
+
"type": "string"
|
|
432
|
+
},
|
|
433
|
+
"description": "The text of each section the parser found, by its number."
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"description": "What the sheet says. Only for a German safety data sheet."
|
|
437
|
+
},
|
|
438
|
+
"statement": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"additionalProperties": false,
|
|
441
|
+
"required": [
|
|
442
|
+
"code",
|
|
443
|
+
"regulation",
|
|
444
|
+
"sheet"
|
|
445
|
+
],
|
|
446
|
+
"properties": {
|
|
447
|
+
"code": {
|
|
448
|
+
"type": "string"
|
|
449
|
+
},
|
|
450
|
+
"sheet": {
|
|
451
|
+
"type": [
|
|
452
|
+
"string",
|
|
453
|
+
"null"
|
|
454
|
+
],
|
|
455
|
+
"description": "The wording as the sheet prints it."
|
|
456
|
+
},
|
|
457
|
+
"regulation": {
|
|
458
|
+
"type": [
|
|
459
|
+
"string",
|
|
460
|
+
"null"
|
|
461
|
+
],
|
|
462
|
+
"description": "The wording of the CLP Regulation, where it has exactly one."
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"part": {
|
|
467
|
+
"type": "object",
|
|
468
|
+
"additionalProperties": false,
|
|
469
|
+
"required": [
|
|
470
|
+
"sheet",
|
|
471
|
+
"statements",
|
|
472
|
+
"warnings"
|
|
473
|
+
],
|
|
474
|
+
"description": "One sheet of a file that holds several, read from its own text as a file holding only that sheet would be.",
|
|
475
|
+
"properties": {
|
|
476
|
+
"sheet": {
|
|
477
|
+
"$ref": "#/$defs/sheet"
|
|
478
|
+
},
|
|
479
|
+
"statements": {
|
|
480
|
+
"type": "array",
|
|
481
|
+
"items": {
|
|
482
|
+
"$ref": "#/$defs/statement"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"warnings": {
|
|
486
|
+
"type": "array",
|
|
487
|
+
"items": {
|
|
488
|
+
"$ref": "#/$defs/message"
|
|
489
|
+
},
|
|
490
|
+
"description": "What the parser noted while reading this sheet."
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"finding": {
|
|
495
|
+
"allOf": [
|
|
496
|
+
{
|
|
497
|
+
"$ref": "#/$defs/message"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"properties": {
|
|
501
|
+
"code": {
|
|
502
|
+
"enum": [
|
|
503
|
+
"wording-deviates",
|
|
504
|
+
"undated",
|
|
505
|
+
"predates-annex-ii",
|
|
506
|
+
"revised-in-future",
|
|
507
|
+
"classification-undetermined",
|
|
508
|
+
"old-classification",
|
|
509
|
+
"old-format",
|
|
510
|
+
"classification-not-stated",
|
|
511
|
+
"classification-contradicts-label",
|
|
512
|
+
"different-products",
|
|
513
|
+
"country-editions-differ",
|
|
514
|
+
"euh-outside-label",
|
|
515
|
+
"not-german"
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"description": "A message about what is wrong with the sheet as a document. Where it concerns one statement, params names it as statement."
|
|
522
|
+
},
|
|
523
|
+
"embedded_data": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"additionalProperties": false,
|
|
526
|
+
"required": [
|
|
527
|
+
"format",
|
|
528
|
+
"filename",
|
|
529
|
+
"compared",
|
|
530
|
+
"differences"
|
|
531
|
+
],
|
|
532
|
+
"description": "The eSDScom file embedded in the PDF. Only where the PDF carries one.",
|
|
533
|
+
"properties": {
|
|
534
|
+
"format": {
|
|
535
|
+
"const": "eSDScom"
|
|
536
|
+
},
|
|
537
|
+
"filename": {
|
|
538
|
+
"type": "string"
|
|
539
|
+
},
|
|
540
|
+
"compared": {
|
|
541
|
+
"type": "boolean",
|
|
542
|
+
"description": "Whether the embedded data were compared with the sheet as read: the embedded file could be read, and the PDF is a German safety data sheet."
|
|
543
|
+
},
|
|
544
|
+
"differences": {
|
|
545
|
+
"type": "array",
|
|
546
|
+
"items": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"additionalProperties": false,
|
|
549
|
+
"required": [
|
|
550
|
+
"embedded",
|
|
551
|
+
"field",
|
|
552
|
+
"read"
|
|
553
|
+
],
|
|
554
|
+
"properties": {
|
|
555
|
+
"field": {
|
|
556
|
+
"type": "string"
|
|
557
|
+
},
|
|
558
|
+
"embedded": {
|
|
559
|
+
"type": [
|
|
560
|
+
"string",
|
|
561
|
+
"array",
|
|
562
|
+
"null"
|
|
563
|
+
],
|
|
564
|
+
"items": {
|
|
565
|
+
"type": "string"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"read": {
|
|
569
|
+
"type": [
|
|
570
|
+
"string",
|
|
571
|
+
"array",
|
|
572
|
+
"null"
|
|
573
|
+
],
|
|
574
|
+
"items": {
|
|
575
|
+
"type": "string"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"description": "Where the embedded data and the sheet as read differ. Empty where nothing was compared."
|
|
581
|
+
},
|
|
582
|
+
"unreadable": {
|
|
583
|
+
"$ref": "#/$defs/message",
|
|
584
|
+
"description": "Why the embedded file could not be read. Only then."
|
|
585
|
+
},
|
|
586
|
+
"version": {
|
|
587
|
+
"type": [
|
|
588
|
+
"string",
|
|
589
|
+
"null"
|
|
590
|
+
],
|
|
591
|
+
"description": "The eSDScom version the file states. Only for a file that could be read."
|
|
592
|
+
},
|
|
593
|
+
"system": {
|
|
594
|
+
"type": [
|
|
595
|
+
"string",
|
|
596
|
+
"null"
|
|
597
|
+
],
|
|
598
|
+
"description": "The authoring system the file names. Only for a file that could be read."
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"message": {
|
|
603
|
+
"type": "object",
|
|
604
|
+
"additionalProperties": false,
|
|
605
|
+
"required": [
|
|
606
|
+
"code",
|
|
607
|
+
"params",
|
|
608
|
+
"message"
|
|
609
|
+
],
|
|
610
|
+
"description": "Something the reader notes: a fixed code, the values it names, and a sentence in the language asked for (SDW-17). A program reads code and params; the sentence is for people.",
|
|
611
|
+
"properties": {
|
|
612
|
+
"code": {
|
|
613
|
+
"enum": [
|
|
614
|
+
"classification-contradicts-label",
|
|
615
|
+
"classification-not-stated",
|
|
616
|
+
"classification-undetermined",
|
|
617
|
+
"classified-before-clp",
|
|
618
|
+
"cli-embedded-not-handed-out",
|
|
619
|
+
"cli-file-broke",
|
|
620
|
+
"cli-file-failed",
|
|
621
|
+
"cli-no-embedded-file",
|
|
622
|
+
"cli-saved",
|
|
623
|
+
"cli-half-line-removed",
|
|
624
|
+
"cli-progress",
|
|
625
|
+
"cli-interrupted",
|
|
626
|
+
"cli-summary-read",
|
|
627
|
+
"cli-summary-ask",
|
|
628
|
+
"country-editions-differ",
|
|
629
|
+
"cover-only",
|
|
630
|
+
"different-products",
|
|
631
|
+
"diff-run",
|
|
632
|
+
"diff-files",
|
|
633
|
+
"diff-differing",
|
|
634
|
+
"diff-none",
|
|
635
|
+
"diff-field",
|
|
636
|
+
"diff-field-counted-only",
|
|
637
|
+
"diff-stages-differ",
|
|
638
|
+
"diff-models-differ",
|
|
639
|
+
"diff-questions-differ",
|
|
640
|
+
"show-kind-sheet",
|
|
641
|
+
"show-kind-other-language",
|
|
642
|
+
"show-kind-safety-information",
|
|
643
|
+
"show-kind-document",
|
|
644
|
+
"show-kind-unreadable",
|
|
645
|
+
"show-kind-broke",
|
|
646
|
+
"show-cover-page",
|
|
647
|
+
"show-cover-page-display",
|
|
648
|
+
"show-line-cover-page",
|
|
649
|
+
"show-line-cover-page-display",
|
|
650
|
+
"show-sheet-of",
|
|
651
|
+
"show-whole-file",
|
|
652
|
+
"show-label-product",
|
|
653
|
+
"show-label-supplier",
|
|
654
|
+
"show-label-contact",
|
|
655
|
+
"show-label-emergency",
|
|
656
|
+
"show-label-revised",
|
|
657
|
+
"show-label-issued",
|
|
658
|
+
"show-label-labelling",
|
|
659
|
+
"show-label-notes",
|
|
660
|
+
"show-date",
|
|
661
|
+
"show-information-email",
|
|
662
|
+
"show-product-dated",
|
|
663
|
+
"show-with-version",
|
|
664
|
+
"show-not-stated",
|
|
665
|
+
"show-no-labelling",
|
|
666
|
+
"show-no-signal-word",
|
|
667
|
+
"show-no-pictograms",
|
|
668
|
+
"show-no-statements",
|
|
669
|
+
"show-needs-sheet",
|
|
670
|
+
"show-needs-no-sheet",
|
|
671
|
+
"show-stated-voluntary",
|
|
672
|
+
"show-stated-article",
|
|
673
|
+
"show-no-notes",
|
|
674
|
+
"show-no-product",
|
|
675
|
+
"show-undated",
|
|
676
|
+
"show-notes",
|
|
677
|
+
"show-summary",
|
|
678
|
+
"show-interrupted",
|
|
679
|
+
"embedded-doctype",
|
|
680
|
+
"embedded-no-datasheet",
|
|
681
|
+
"embedded-not-xml",
|
|
682
|
+
"embedded-too-large",
|
|
683
|
+
"embedded-wrong-root",
|
|
684
|
+
"euh-outside-label",
|
|
685
|
+
"euh-wording-outside-label",
|
|
686
|
+
"label-undetermined",
|
|
687
|
+
"leaflet-title",
|
|
688
|
+
"model-answer-unreadable",
|
|
689
|
+
"model-http-error",
|
|
690
|
+
"model-not-asked",
|
|
691
|
+
"model-reply-empty",
|
|
692
|
+
"model-reply-not-json",
|
|
693
|
+
"model-reply-without-message",
|
|
694
|
+
"model-unreachable",
|
|
695
|
+
"no-emergency-phone",
|
|
696
|
+
"no-hazard-codes",
|
|
697
|
+
"no-hazard-codes-in-text",
|
|
698
|
+
"no-identification-section",
|
|
699
|
+
"no-label-section",
|
|
700
|
+
"no-precautionary-codes",
|
|
701
|
+
"no-regulation-reference",
|
|
702
|
+
"no-safety-data-sheet",
|
|
703
|
+
"no-section-marker",
|
|
704
|
+
"no-supplier-address",
|
|
705
|
+
"no-supplier-name",
|
|
706
|
+
"no-supplier-phone",
|
|
707
|
+
"no-text",
|
|
708
|
+
"no-text-layer",
|
|
709
|
+
"no-title-keywords",
|
|
710
|
+
"not-a-sheet",
|
|
711
|
+
"not-german",
|
|
712
|
+
"ocr-failed",
|
|
713
|
+
"ocr-timeout",
|
|
714
|
+
"ocr-unavailable",
|
|
715
|
+
"ocr-too-old",
|
|
716
|
+
"ocr-language-missing",
|
|
717
|
+
"old-classification",
|
|
718
|
+
"old-format",
|
|
719
|
+
"other-language",
|
|
720
|
+
"pages-read-by-ocr",
|
|
721
|
+
"pdf-not-found",
|
|
722
|
+
"pdf-too-large",
|
|
723
|
+
"pdf-unreadable",
|
|
724
|
+
"pictograms-derived",
|
|
725
|
+
"predates-annex-ii",
|
|
726
|
+
"read-by-ocr-no-text-layer",
|
|
727
|
+
"read-by-ocr-single-characters",
|
|
728
|
+
"revised-in-future",
|
|
729
|
+
"safety-information",
|
|
730
|
+
"several-sheets",
|
|
731
|
+
"short-sample",
|
|
732
|
+
"short-text",
|
|
733
|
+
"signal-word-derived",
|
|
734
|
+
"signal-word-not-taken",
|
|
735
|
+
"title-in-running-text",
|
|
736
|
+
"undated",
|
|
737
|
+
"unknown",
|
|
738
|
+
"unreadable",
|
|
739
|
+
"wording-deviates"
|
|
740
|
+
],
|
|
741
|
+
"description": "What is noted. The same in every language."
|
|
742
|
+
},
|
|
743
|
+
"params": {
|
|
744
|
+
"type": "object",
|
|
745
|
+
"description": "The values the code names, such as the statement a finding is about."
|
|
746
|
+
},
|
|
747
|
+
"message": {
|
|
748
|
+
"type": "string",
|
|
749
|
+
"description": "The sentence, from the message catalog of the language chosen."
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"allOf": [
|
|
755
|
+
{
|
|
756
|
+
"if": {
|
|
757
|
+
"properties": {
|
|
758
|
+
"verification": {
|
|
759
|
+
"properties": {
|
|
760
|
+
"kind": {
|
|
761
|
+
"const": "safety-data-sheet"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"required": [
|
|
765
|
+
"kind"
|
|
766
|
+
]
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"then": {
|
|
771
|
+
"required": [
|
|
772
|
+
"extraction",
|
|
773
|
+
"sheet",
|
|
774
|
+
"statements",
|
|
775
|
+
"parser",
|
|
776
|
+
"sheet_count"
|
|
777
|
+
]
|
|
778
|
+
},
|
|
779
|
+
"else": {
|
|
780
|
+
"properties": {
|
|
781
|
+
"sheet": false,
|
|
782
|
+
"statements": false,
|
|
783
|
+
"parser": false,
|
|
784
|
+
"sheet_count": false,
|
|
785
|
+
"cover_page": false,
|
|
786
|
+
"display_term": false,
|
|
787
|
+
"parts": false
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
}
|