Skip to content

Commit 2ec9f12

Browse files
authored
Merge pull request #46 from SciCatProject/schema_examples
updated schema configuration
2 parents 4503711 + 83fcd15 commit 2ec9f12

7 files changed

+621
-204
lines changed

resources/base.configuration.json.example

-98
This file was deleted.

resources/base.imsc.json.example

+197
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
{
2+
"id": c5bed39a-4379-11ef-ba5a-ffbc783163b6
3+
"name" : "Generic metadata schema"
4+
"instrument" : "",
5+
"selector" : "filename:starts_with:/ess/data",
6+
"variables" : {
7+
"pid": {
8+
"source": "NXS",
9+
"path": "/entry/entry_identifier_uuid",
10+
"value_type": "string"
11+
},
12+
"proposal_id": {
13+
"source": "NXS",
14+
"path": ""/entry/experiment_identifier",
15+
"value_type": "string",
16+
},
17+
"pi_firstname": {
18+
"source": "SC",
19+
"url": "proposals/<proposal_id>",
20+
"field" : "pi_firstname",
21+
"value_type": "string"
22+
},
23+
"pi_lastname": {
24+
"source": "SC",
25+
"url": "proposals/<proposal_id>",
26+
"field": ":pi_lastname",
27+
"value_type": "string"
28+
},
29+
"pi_email": {
30+
"source": "SC",
31+
"url": "proposals/<proposal_id>",
32+
"field": "pi_email",
33+
"value_type": "string"
34+
},
35+
"dataset_name": {
36+
"source": "NXS"
37+
"path": ""/entry/title",
38+
"value_type": "string"
39+
},
40+
"instrument_name": {
41+
"source": "NXS",
42+
"path": ""/entry/instrument/name",
43+
"value_type": "string",
44+
},
45+
"instrument_id": {
46+
"source": "SC",
47+
"url": "instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D"
48+
"field": "id",
49+
"value_type": "string"
50+
},
51+
"start_time": {
52+
"source": "NXS",
53+
"path": ""/entry/start_time",
54+
"value_type": "date"
55+
},
56+
"end_time": {
57+
"source": "NXS",
58+
"path": "/entry/end_time",
59+
"value_type": "date"
60+
},
61+
"run_number": {
62+
"source": "NXS",
63+
"path": ""/entry/entry_identifier",
64+
"value_type": "integer"
65+
},
66+
"acquisition_team_members_list": {
67+
"source": "NXS",
68+
"path" : "/entry/user_*/name",
69+
"value_type": "string[]"
70+
}
71+
"acquisition_team_members": {
72+
"source": "VALUE",
73+
"operator" : "join_with_space"
74+
"value" : "<acquisition_team_members>",
75+
"value_type": "string"
76+
},
77+
"owner_group": {
78+
"source": "VALUE",
79+
"value": "ess_proposal_<proposal_id>",
80+
"value_type": "string"
81+
},
82+
"access_groups": {
83+
"source": "VALUE",
84+
"value": ["scientific information management systems group"],
85+
"value_type": "string[]"
86+
}
87+
},
88+
"schema": {
89+
"pid": {
90+
"field_type": "high_level",
91+
"machine_name": "pid",
92+
"value": "<pid>",
93+
"type": "string"
94+
},
95+
"type" : {
96+
"field_type": "high_level",
97+
"machine_name": "type",
98+
"value": "raw",
99+
"type": "string"
100+
},
101+
"proposal_id": {
102+
"field_type": "high_level",
103+
"machine_name": "proposalId",
104+
"value": "proposal_id",
105+
"type": "string",
106+
},
107+
"dataset_name": {
108+
"field_type": "high_level",
109+
"machine_name": "datasetName",
110+
"value": "<dataset_name>",
111+
"type": "string"
112+
},
113+
"principal_investigator": {
114+
"field_type": "high_level",
115+
"machine_name": "principalInvestigator",
116+
"value": "<pi_firstname> <pi_lastname>",
117+
"type": "string"
118+
},
119+
"owner": {
120+
"field_type": "high_level",
121+
"machine_name": "owner",
122+
"value": "<pi_firstname> <pi_lastname>",
123+
"type": "string"
124+
},
125+
"owner_email": {
126+
"field_type": "high_level",
127+
"machine_name": "ownerEmail",
128+
"value": "<pi_email>",
129+
"type": "email"
130+
},
131+
"contact_email": {
132+
"field_type": "high_level",
133+
"machine_name": "contactEmail",
134+
"value": "<pi_email>",
135+
"type": "email"
136+
},
137+
"instrument_id": {
138+
"field_type": "high_level",
139+
"machine_name": "instrumentId",
140+
"value": "instrument_id",
141+
"type": "string"
142+
},
143+
"location": {
144+
"field_type": "high_level",
145+
"machine_name": "location",
146+
"value": "ESS:CODA:<instrument_name>",
147+
"type": "string"
148+
},
149+
"start_time": {
150+
"field_type": "scientific_metadata",
151+
"machine_name": "start_time",
152+
"human_name": "Start Time",
153+
"value": "<start_time>",
154+
"type": "date"
155+
},
156+
"end_time": {
157+
"field_type": "scientific_metadata",
158+
"machine_name": "end_time",
159+
"human_name": "End Time",
160+
"value": "<end_time>",
161+
"type": "date"
162+
},
163+
"run_number": {
164+
"field_type": "scientific_metadata",
165+
"machine_name": "run_number",
166+
"human_name": "Run Number",
167+
"value": "<run_number>",
168+
"type": "integer"
169+
},
170+
"job_id": {
171+
"field_type": "scientific_metadata",
172+
"machine_name": "job_id",
173+
"human_name": "Job Id",
174+
"value": "<pid>",
175+
"type": "integer"
176+
},
177+
"acquisition_team_members": {
178+
"field_type": "scientific_metadata",
179+
"machine_name": "acquisition_team_members",
180+
"human_name": "Acquisition Team Members",
181+
"values": "<acquisition_team_members>",
182+
"type": "string"
183+
},
184+
"owner_group": {
185+
"field_type": "high_level",
186+
"machine_name": "ownerGroup",
187+
"value": "<owner_group>",
188+
"type": "string"
189+
},
190+
"access_groups": {
191+
"field_type": "high_level",
192+
"machine_name": "accessGroups",
193+
"value": "<access_groups>",
194+
"type": "string[]"
195+
}
196+
}
197+
}

resources/coda.imsc.json.example

+30-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@
7373
"operator" : "join_with_space"
7474
"value" : "<acquisition_team_members>",
7575
"value_type": "string"
76+
},
77+
"owner_group": {
78+
"source": "VALUE",
79+
"value": "ess_proposal_<proposal_id>",
80+
"value_type": "string"
81+
},
82+
"access_groups": {
83+
"source": "VALUE",
84+
"value": ["scientific information management systems group"],
85+
"value_type": "string[]"
7686
}
7787
},
7888
"schema": {
@@ -116,7 +126,13 @@
116126
"field_type": "high_level",
117127
"machine_name": "ownerEmail",
118128
"value": "<pi_email>",
119-
"type": "string"
129+
"type": "email"
130+
},
131+
"contact_email": {
132+
"field_type": "high_level",
133+
"machine_name": "contactEmail",
134+
"value": "<pi_email>",
135+
"type": "email"
120136
},
121137
"instrument_id": {
122138
"field_type": "high_level",
@@ -127,7 +143,7 @@
127143
"location": {
128144
"field_type": "high_level",
129145
"machine_name": "location",
130-
"source": "ESS:CODA:<instrument_name>",
146+
"value": "ESS:CODA:<instrument_name>",
131147
"type": "string"
132148
},
133149
"start_time": {
@@ -164,6 +180,18 @@
164180
"human_name": "Acquisition Team Members",
165181
"values": "<acquisition_team_members>",
166182
"type": "string"
183+
},
184+
"owner_group": {
185+
"field_type": "high_level",
186+
"machine_name": "ownerGroup",
187+
"value": "<owner_group>",
188+
"type": "string"
189+
},
190+
"access_groups": {
191+
"field_type": "high_level",
192+
"machine_name": "accessGroups",
193+
"value": "<access_groups>",
194+
"type": "string[]"
167195
}
168196
}
169197
}

0 commit comments

Comments
 (0)