-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessing-config-schema.json
More file actions
414 lines (414 loc) · 13.1 KB
/
processing-config-schema.json
File metadata and controls
414 lines (414 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
{
"type": "object",
"layout": "tabs",
"required": [
"datasetMode"
],
"allOf": [
{
"title": "Dataset mode",
"x-i18n-title": { "fr": "Liste de jeux de données", "en": "Datasets" },
"default": {
"datasetMode": "list"
},
"properties": {
"haveList": {
"type": "boolean",
"default": false,
"layout": "none"
}
},
"oneOf": [
{
"title": "List sheets",
"x-i18n-title": { "fr": "Lister les différentes feuilles", "en": "List the available sheets" },
"properties": {
"datasetMode": {
"type": "string",
"const": "list",
"title": "Action"
}
},
"layout": {
"children": [
"datasetMode",
{
"markdown": "List the different sheets of your file before you can create or update datasets.",
"x-i18n-markdown": {
"fr": "Listez les différentes feuilles de votre fichier avant de pouvoir créer des jeux de données ou les mettre à jour."
}
},
{
"markdown": "**Warning:** if you use a .zip file containing .xlsx files, only the first .xlsx file found will be used.",
"x-i18n-markdown": {
"fr": "**Attention :** si vous utiliser un fichier .zip contenant des fichiers .xlsx, seul le premier .xlsx trouvé sera utilisé."
}
}
]
}
},
{
"title": "Create datasets",
"x-i18n-title": { "fr": "Créer des jeux de données" },
"properties": {
"datasetMode": {
"type": "string",
"const": "create",
"title": "Action"
}
},
"layout": {
"if": "parent.data.haveList",
"children": [
"datasetMode",
{
"markdown": "Select the sheets you want to add in the **File Sheets** tab.",
"x-i18n-markdown": {
"fr": "Sélectionnez les feuilles que vous voulez ajouter dans l'onglet **Feuilles du fichier**."
}
}
]
}
},
{
"title": "Update datasets",
"x-i18n-title": { "fr": "Mettre à jour des jeux de données" },
"properties": {
"datasetMode": {
"type": "string",
"const": "update",
"title": "Action"
},
"datasets": {
"type": "array",
"title": "Datasets to update",
"x-i18n-title": { "fr": "Jeux de données à mettre à jour" },
"layout": {
"listEditMode": "inline"
},
"items": {
"type" : "object",
"layout" : [
{
"children": [
"dataset"
],
"cols": 4
},
{
"children": [
"sheet"
],
"cols": 4
},
{
"children": [
"forceUpdate"
],
"cols": 3
}
],
"required": [
"dataset",
"sheet"
],
"properties": {
"dataset": {
"type": "object",
"title": "Existing dataset",
"x-i18n-title": { "fr": "Jeu de données existant" },
"properties": {
"id": {
"type": "string",
"title": "Identifier",
"x-i18n-title": { "fr": "Identifiant" }
},
"href": {
"type": "string",
"title": "URL"
},
"title": {
"type": "string",
"title": "Title",
"x-i18n-title": { "fr": "Titre" }
}
},
"layout": {
"getItems": {
"url": "${context.dataFairUrl}/api/v1/datasets?q={q}&select=id,title&${context.ownerFilter}&${parent.parent.parent.parent.data.editableUpdate === true ? 'rest' : 'file'}=true",
"itemsResults": "data.results",
"itemTitle": "item.title",
"itemKey": "item.id"
}
}
},
"sheet": {
"type": "object",
"title": "Sheet",
"x-i18n-title": { "fr": "Feuille" },
"properties": {
"nb": {
"type": "integer",
"title": "Sheet identifier",
"x-i18n-title": { "fr": "Identifiant de la feuille" }
},
"name": {
"type": "string",
"title": "Sheet name",
"x-i18n-title": { "fr": "Nom de la feuille" }
}
},
"layout": {
"getItems": {
"expr": "parent.parent.parent.parent.data.sheets || []",
"itemsResults": "data",
"itemTitle": "item.name",
"itemKey": "item.nb"
}
}
},
"forceUpdate": {
"type" : "boolean",
"title": "Force schema update",
"x-i18n-title": { "fr": "Forcer la mise à jour du schéma" }
}
}
}
}
},
"layout": {
"if": "parent.data.haveList"
}
}
]
},
{
"title" : "File sheets",
"x-i18n-title": { "fr": "Feuilles du fichier" },
"required": [
"sheets"
],
"layout": {
"readOnlyPropertiesMode": "show",
"children": [
{
"if": "!parent.data.sheets || parent.data.sheets.length === 0",
"children": [
{
"markdown": "**No sheets detected**",
"x-i18n-markdown": {
"fr": "**Aucune feuille détectée**"
}
}
]
},
{
"if": "parent.data.sheets && parent.data.sheets.length > 0",
"children": [
{
"markdown": "*To update the sheets, for example in the case of a new file, run the **list the available sheets** mode again.*",
"x-i18n-markdown": {
"fr": "*Pour remettre à jour les feuilles, en cas de nouveau fichier par exemple, exécutez de nouveau le mode **lister les différentes feuilles**.*"
}
}
]
},
"addAllSheets",
"tableHeader",
"sheets"
]
},
"properties": {
"addAllSheets": {
"type": "boolean",
"title": "Add all the sheets",
"x-i18n-title": { "fr": "Ajouter toutes les feuilles" },
"layout": {
"if": "parent.parent.data.datasetMode === 'create'"
}
},
"tableHeader": {
"type": "object",
"layout": [
{
"children": [
"add"
],
"cols": 1,
"if": "parent.parent.parent.data.datasetMode === 'create' && parent.parent.data.addAllSheets !== true"
},
{
"children": [
"nb"
],
"cols": 1
},
{
"children": [
"name"
],
"cols": 4
},
{
"children": [
"lines"
],
"cols": 2
},
{
"children": [
"titleEditable",
"titleReadOnly"
],
"cols": 4
}
],
"properties": {
"add": {
"type": "string",
"title": "Add",
"x-i18n-title": { "fr": "Ajouter" },
"readOnly": true
},
"nb": {
"type": "string",
"title": "Number",
"x-i18n-title": { "fr": "Numéro" },
"readOnly": true
},
"name": {
"type": "string",
"title": "Sheet name",
"x-i18n-title": { "fr": "Nom de la feuille" },
"readOnly": true
},
"lines": {
"type": "string",
"title": "Nombre de lignes",
"readOnly": true
},
"titleEditable": {
"type": "string",
"title": "Title of the corresponding dataset",
"x-i18n-title": { "fr": "Titre du jeu de données correspondant" },
"readOnly": true,
"description": "By default, the dataset title corresponds to the sheet name",
"x-i18n-description": { "fr": "Par défaut, le titre du jeu de données correspond au nom de la feuille" },
"layout": {
"if": "parent.parent.parent.parent.data.datasetMode === 'create'"
}
},
"titleReadOnly": {
"type": "string",
"title": "Title of the corresponding dataset",
"x-i18n-title": { "fr": "Titre du jeu de données correspondant" },
"readOnly": true,
"description": "By default, the dataset title corresponds to the sheet name",
"x-i18n-description": { "fr": "Par défaut, le titre du jeu de données correspond au nom de la feuille" },
"layout": {
"if": "parent.parent.parent.parent.data.datasetMode !== 'create'"
}
}
}
},
"sheets": {
"type": "array",
"title": " ",
"layout": {
"listEditMode": "inline",
"listActions": []
},
"items": {
"type": "object",
"layout": [
{
"children": [
"add"
],
"cols": 1,
"if": "parent.parent.parent.data.datasetMode === 'create' && parent.parent.parent.data.addAllSheets !== true"
},
{
"children": [
"nb"
],
"cols": 1
},
{
"children": [
"name"
],
"cols": 4
},
{
"children": [
"lines"
],
"cols": 2
},
{
"children": [
"titleEditable",
"titleReadOnly"
],
"cols": 4
}
],
"properties": {
"add": {
"type": "boolean",
"title": " "
},
"nb": {
"type": "integer",
"readOnly": true,
"title": " "
},
"name": {
"type": "string",
"readOnly": true,
"title": " "
},
"lines": {
"type": "integer",
"readOnly": true,
"title": " "
},
"titleEditable": {
"type": "string",
"title": " ",
"layout": {
"if": "parent.parent.parent.parent.data.datasetMode === 'create'"
}
},
"titleReadOnly": {
"type": "string",
"title": " ",
"readOnly": true,
"layout": {
"if": "parent.parent.parent.parent.data.datasetMode !== 'create'"
}
}
}
}
}
}
},
{
"title": "Parameters",
"x-i18n-title": { "fr": "Paramètres" },
"required": [
"url"
],
"properties": {
"url": {
"title": "Source URL",
"x-i18n-title": { "fr": "URL source" },
"type": "string",
"description": "Supported protocols are HTTP and HTTPS; supported formats are .zip and .xlsx.",
"x-i18n-description": { "fr": "Les protocoles supportés sont HTTP et HTTPS, les formats supportés sont .zip et .xlsx." }
}
}
}
]
}