adiwg-json_schemas 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,12 +107,6 @@
107
107
  {
108
108
  "contactId": "1",
109
109
  "role": "primaryLCC",
110
- "resourceIdentifier": [
111
- {
112
- "identifierName": "projectId",
113
- "identifier": "ALCC2010-05"
114
- }
115
- ],
116
110
  "funding": [
117
111
  {
118
112
  "fiscalYear": 2010,
@@ -140,12 +134,6 @@
140
134
  }, {
141
135
  "contactId": "4",
142
136
  "role": "partnerLCC",
143
- "resourceIdentifier": [
144
- {
145
- "identifierName": "projectId",
146
- "identifier": "WA2011_09"
147
- }
148
- ],
149
137
  "funding": [
150
138
  {
151
139
  "fiscalYear": 2011,
@@ -155,12 +143,6 @@
155
143
  }, {
156
144
  "contactId": "6",
157
145
  "role": "partnerLCC",
158
- "resourceIdentifier": [
159
- {
160
- "identifierName": "projectId",
161
- "identifier": "NWB-002"
162
- }
163
- ],
164
146
  "funding": [
165
147
  {
166
148
  "fiscalYear": 2011,
@@ -189,6 +171,41 @@
189
171
  }
190
172
  ]
191
173
  },
174
+ "resourceIdentifier": [
175
+ {
176
+ "title": "Arctic LCC Project",
177
+ "responsibleParty": [
178
+ {
179
+ "contactId": "1",
180
+ "role": "originator"
181
+ }
182
+ ],
183
+ "identifier": "ALCC2010-05"
184
+ }, {
185
+ "title": "WA LCC Project",
186
+ "responsibleParty": [
187
+ {
188
+ "contactId": "4",
189
+ "role": "collaborator"
190
+ }
191
+ ],
192
+ "onlineResource": [
193
+ {
194
+ "uri": "http://thisisanexample.com"
195
+ }
196
+ ],
197
+ "identifier": "WA2011_09"
198
+ }, {
199
+ "title": "NWB LCC Project",
200
+ "responsibleParty": [
201
+ {
202
+ "contactId": "4",
203
+ "role": "collaborator"
204
+ }
205
+ ],
206
+ "identifier": "NWB-002"
207
+ }
208
+ ],
192
209
  "pointOfContact": [
193
210
  {
194
211
  "contactId": "1",
@@ -1,6 +1,6 @@
1
1
  module ADIWG
2
2
  module JsonSchemas
3
3
  # Current schema version number
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
data/schema/schema.json CHANGED
@@ -5,13 +5,18 @@
5
5
  "type": "object",
6
6
  "required": ["version", "contact", "metadata"],
7
7
  "properties": {
8
- "verion": {
9
- "name": {
10
- "type": "string"
11
- },
12
- "version": {
13
- "type": "string",
14
- "pattern": "[0-9]\\.[0-9]\\.[0-9]"
8
+ "version": {
9
+ "type": "object",
10
+ "required": ["name", "version"],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "name": {
14
+ "type": "string"
15
+ },
16
+ "version": {
17
+ "type": "string",
18
+ "pattern": "[0-9]\\.[0-9]\\.[0-9]"
19
+ }
15
20
  }
16
21
  },
17
22
  "contact": {
@@ -31,12 +36,8 @@
31
36
  "pattern": "((?<=\\()[A-Za-z][A-Za-z0-9\\+\\.\\-]*:([A-Za-z0-9\\.\\-_~:/\\?#\\[\\]@!\\$&'\\(\\)\\*\\+,;=]|%[A-Fa-f0-9]{2})+(?=\\)))|([A-Za-z][A-Za-z0-9\\+\\.\\-]*:([A-Za-z0-9\\.\\-_~:/\\?#\\[\\]@!\\$&'\\(\\)\\*\\+,;=]|%[A-Fa-f0-9]{2})+)"
32
37
  },
33
38
  "date": {
34
- "oneOf": [
35
- {
36
- "type": "string",
37
- "pattern": "^(\\d{4}(-\\d{2})?(-\\d{2})?$)|(^\\d{4}-\\d{2}-\\d{2}(T\\d{2})?(\\:\\d{2}(\\:\\d{2}(\\.\\d+)?)?|Z)?(Z|(-|\\+)\\d{2}(:\\d{2})?)?$)"
38
- }
39
- ]
39
+ "type": "string",
40
+ "pattern": "^(\\d{4}(-\\d{2})?(-\\d{2})?$)|(^\\d{4}-\\d{2}-\\d{2}(T\\d{2})?(\\:\\d{2}(\\:\\d{2}(\\.\\d+)?)?|Z)?(Z|(-|\\+)\\d{2}(:\\d{2})?)?$)"
40
41
  }
41
42
  }
42
- }
43
+ }
@@ -4,17 +4,42 @@
4
4
  "description": "schema for citation",
5
5
  "type": "object",
6
6
  "required": ["title", "date"],
7
- "anyOf": [
7
+ "properties": {
8
+ "edition": {
9
+ "type": "string"
10
+ },
11
+ "presentationForm": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "additionalIdentifier": {
18
+ "type": "object",
19
+ "properties": {
20
+ "doi": {
21
+ "type": "string"
22
+ },
23
+ "isbn": {
24
+ "type": "string"
25
+ },
26
+ "issn": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "allOf": [
8
33
  {
9
34
  "$ref": "#/definitions/citationBase"
10
35
  }
11
36
  ],
12
37
  "definitions": {
13
38
  "citationBase": {
39
+ "title": "citation",
14
40
  "description": "base schema for citation, date not required",
15
41
  "type": "object",
16
42
  "required": ["title"],
17
- "additionalProperties": false,
18
43
  "properties": {
19
44
  "title": {
20
45
  "type": "string"
@@ -27,7 +52,7 @@
27
52
  "required": ["date", "dateType"],
28
53
  "properties": {
29
54
  "date": {
30
- "$ref": "../schema.json#definitions/date"
55
+ "$ref": "../schema.json#/definitions/date"
31
56
  },
32
57
  "dateType": {
33
58
  "type": "string"
@@ -35,9 +60,7 @@
35
60
  }
36
61
  }
37
62
  },
38
- "edition": {
39
- "type": "string"
40
- },
63
+
41
64
  "responsibleParty": {
42
65
  "type": "array",
43
66
  "minItems": 1,
@@ -45,26 +68,7 @@
45
68
  "$ref": "contact.json#/definitions/contactRef"
46
69
  }
47
70
  },
48
- "presentationForm": {
49
- "type": "array",
50
- "items": {
51
- "type": "string"
52
- }
53
- },
54
- "additionalIdentifier": {
55
- "type": "object",
56
- "properties": {
57
- "doi": {
58
- "type": "string"
59
- },
60
- "isbn": {
61
- "type": "string"
62
- },
63
- "issn": {
64
- "type": "string"
65
- }
66
- }
67
- },
71
+
68
72
  "onlineResource": {
69
73
  "type": "array",
70
74
  "items": {
@@ -72,6 +76,22 @@
72
76
  }
73
77
  }
74
78
  }
79
+ },
80
+ "resourceIdentifier": {
81
+ "title": "resource identifier",
82
+ "description": "Assigned identifier for a resource, based on citation",
83
+ "type": "object",
84
+ "required": ["identifier"],
85
+ "properties": {
86
+ "identifier": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ "allOf": [
91
+ {
92
+ "$ref": "#/definitions/citationBase"
93
+ }
94
+ ]
75
95
  }
76
96
  }
77
97
  }
@@ -71,6 +71,7 @@
71
71
  },
72
72
  "individual": {
73
73
  "type": "object",
74
+ "title": "individual",
74
75
  "required": ["contactId", "individualName"],
75
76
  "additionalProperties": true,
76
77
  "properties": {
@@ -109,6 +110,7 @@
109
110
  },
110
111
  "organization": {
111
112
  "type": "object",
113
+ "title": "organization",
112
114
  "required": ["contactId", "organizationName"],
113
115
  "additionalProperties": true,
114
116
  "properties": {
@@ -144,6 +146,7 @@
144
146
  },
145
147
  "contactRef": {
146
148
  "type": "object",
149
+ "additionalProperties": true,
147
150
  "required": ["contactId", "role"],
148
151
  "properties": {
149
152
  "contactId": {
@@ -151,23 +154,6 @@
151
154
  },
152
155
  "role": {
153
156
  "type": "string"
154
- },
155
- "resourceIdentifier": {
156
- "type": "array",
157
- "items": [
158
- {
159
- "type": "object",
160
- "required": ["identifier"],
161
- "properties": {
162
- "identifierName": {
163
- "type": "string"
164
- },
165
- "identifier": {
166
- "type": "string"
167
- }
168
- }
169
- }
170
- ]
171
157
  }
172
158
  }
173
159
  }
@@ -50,7 +50,7 @@
50
50
  "type": "string"
51
51
  },
52
52
  "dateTime": {
53
- "$ref": "../schema.json#definitions/date"
53
+ "$ref": "../schema.json#/definitions/date"
54
54
  },
55
55
  "processor": {
56
56
  "type": "array",
@@ -20,7 +20,7 @@
20
20
  "type": "string"
21
21
  },
22
22
  "plannedAvailabilityDateTime": {
23
- "$ref": "../schema.json#definitions/date"
23
+ "$ref": "../schema.json#/definitions/date"
24
24
  },
25
25
  "orderingInstructions": {
26
26
  "type": "string"
@@ -13,7 +13,7 @@
13
13
  "items": {
14
14
  "properties": {
15
15
  "type": {
16
- "enum": ["Feature", "FeatureCollection"]
16
+ "enum": ["Feature", "FeatureCollection", "GeometryCollection", "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"]
17
17
  }
18
18
  },
19
19
  "oneOf": [
@@ -26,12 +26,12 @@
26
26
  "verticalElement": {
27
27
  "type": "array",
28
28
  "items": {
29
- "$ref": "#definitions/verticalExtent"
29
+ "$ref": "#/definitions/verticalExtent"
30
30
  }
31
31
  },
32
32
  "temporalElement": {
33
33
 
34
- "$ref": "#definitions/temporalElement"
34
+ "$ref": "#/definitions/temporalElement"
35
35
  }
36
36
  },
37
37
  "definitions": {
@@ -47,7 +47,7 @@
47
47
  "type": "string"
48
48
  },
49
49
  "timePosition": {
50
- "$ref": "../schema.json#definitions/date"
50
+ "$ref": "../schema.json#/definitions/date"
51
51
  }
52
52
  }
53
53
  },
@@ -63,10 +63,10 @@
63
63
  "type": "string"
64
64
  },
65
65
  "beginPosition": {
66
- "$ref": "../schema.json#definitions/date"
66
+ "$ref": "../schema.json#/definitions/date"
67
67
  },
68
68
  "endPosition": {
69
- "$ref": "../schema.json#definitions/date"
69
+ "$ref": "../schema.json#/definitions/date"
70
70
  }
71
71
  }
72
72
  },
@@ -78,19 +78,19 @@
78
78
  "timeInstant": {
79
79
  "type": "array",
80
80
  "items": {
81
- "$ref": "#definitions/timeInstant"
81
+ "$ref": "#/definitions/timeInstant"
82
82
  }
83
83
  },
84
84
  "timePeriod": {
85
85
  "type": "array",
86
86
  "items": {
87
- "$ref": "#definitions/timePeriod"
87
+ "$ref": "#/definitions/timePeriod"
88
88
  }
89
89
  },
90
90
  "date": {
91
91
  "type": "array",
92
92
  "items": {
93
- "$ref": "../schema.json#definitions/date"
93
+ "$ref": "../schema.json#/definitions/date"
94
94
  }
95
95
  }
96
96
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
- "id": "crs.json#",
3
+ "id": "crs.json#",
4
4
  "title": "crs",
5
5
  "description": "a Coordinate Reference System object",
6
6
  "type": [ "object", "null" ],
@@ -16,6 +16,7 @@
16
16
  ],
17
17
  "definitions": {
18
18
  "namedCrs": {
19
+ "title": "namedCrs",
19
20
  "properties": {
20
21
  "type": { "enum": [ "name" ] },
21
22
  "properties": {
@@ -32,10 +33,11 @@
32
33
  },
33
34
  "linkedObject": {
34
35
  "type": "object",
36
+ "title": "linkedObject",
35
37
  "required": [ "href" ],
36
38
  "properties": {
37
39
  "href": {
38
- "$ref": "../../schema.json#definitions/url"
40
+ "$ref": "../../schema.json#/definitions/url"
39
41
  },
40
42
  "type": {
41
43
  "type": "string",
@@ -44,6 +46,7 @@
44
46
  }
45
47
  },
46
48
  "linkedCrs": {
49
+ "title": "linkedCrs",
47
50
  "properties": {
48
51
  "type": { "enum": [ "link" ] },
49
52
  "properties": { "$ref": "#/definitions/linkedObject" }
@@ -52,7 +52,8 @@
52
52
  "geometry": {
53
53
  "oneOf": [
54
54
  {
55
- "type": "null"
55
+ "type": "null",
56
+ "title": "null geometry"
56
57
  }, {
57
58
  "$ref": "geometry.json#"
58
59
  }
@@ -90,21 +91,23 @@
90
91
  "description": "Properties of a feature or collection.",
91
92
  "oneOf": [
92
93
  {
94
+ "title": "null",
93
95
  "type": "null"
94
96
  }, {
95
97
  "type": "object",
98
+ "title": "featureProperties",
96
99
  "properties": {
97
100
  "includesData": {
98
101
  "type": ["boolean", "null"]
99
102
  },
100
103
  "temporalElement": {
101
104
 
102
- "$ref": "../extent.json#definitions/temporalElement"
105
+ "$ref": "../extent.json#/definitions/temporalElement"
103
106
  },
104
107
  "verticalElement": {
105
108
  "type": "array",
106
109
  "items": {
107
- "$ref": "../extent.json#definitions/verticalExtent"
110
+ "$ref": "../extent.json#/definitions/verticalExtent"
108
111
  }
109
112
  },
110
113
  "featureName": {
@@ -119,7 +122,7 @@
119
122
  "assignedId": {
120
123
  "type": "array",
121
124
  "items": {
122
- "$ref": "../contact.json#/definitions/contactRef"
125
+ "$ref": "../citation.json#/definitions/resourceIdentifier"
123
126
  }
124
127
  }
125
128
  }