adiwg-mdjson_schemas 1.0.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.travis.yml +7 -0
  4. data/CREDITS +3 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +24 -0
  7. data/README.md +36 -0
  8. data/Rakefile +12 -0
  9. data/adiwg-json_schemas.gemspec +25 -0
  10. data/examples/additionalDocumentation.json +61 -0
  11. data/examples/address.json +10 -0
  12. data/examples/associatedResource.json +119 -0
  13. data/examples/citation.json +128 -0
  14. data/examples/contact.json +205 -0
  15. data/examples/contactRef.json +12 -0
  16. data/examples/dataDictionary.json +547 -0
  17. data/examples/dataQuality.json +272 -0
  18. data/examples/date.json +19 -0
  19. data/examples/distributor.json +113 -0
  20. data/examples/extent_linestring.json +288 -0
  21. data/examples/extent_point.json +246 -0
  22. data/examples/extent_polygon.json +353 -0
  23. data/examples/format.json +14 -0
  24. data/examples/full_example.json +2844 -0
  25. data/examples/full_example2.json +2325 -0
  26. data/examples/geojson.json +446 -0
  27. data/examples/graphicOverview.json +28 -0
  28. data/examples/hierarchyLevel.json +90 -0
  29. data/examples/keywords.json +144 -0
  30. data/examples/lcc_project_example.json +326 -0
  31. data/examples/legalConstraints.json +17 -0
  32. data/examples/maintInfo.json +34 -0
  33. data/examples/metadataInfo.json +103 -0
  34. data/examples/minimum_example.json +35 -0
  35. data/examples/onlineResource.json +17 -0
  36. data/examples/resolution.json +9 -0
  37. data/examples/resourceInfo.json +1264 -0
  38. data/examples/resourceMaintenance.json +10 -0
  39. data/examples/securityConstraints.json +13 -0
  40. data/examples/spatialRef.json +14 -0
  41. data/examples/taxonomy.json +197 -0
  42. data/examples/temporalElement.json +29 -0
  43. data/examples/uri.json +16 -0
  44. data/examples/usage.json +35 -0
  45. data/examples/verticalExtent.json +18 -0
  46. data/lib/adiwg-mdjson_schemas.rb +1 -0
  47. data/lib/adiwg/mdjson_schemas.rb +7 -0
  48. data/lib/adiwg/mdjson_schemas/utils.rb +20 -0
  49. data/lib/adiwg/mdjson_schemas/validator.rb +42 -0
  50. data/lib/adiwg/mdjson_schemas/version.rb +6 -0
  51. data/schema/schema.json +64 -0
  52. data/schema/schema/citation.json +186 -0
  53. data/schema/schema/contact.json +255 -0
  54. data/schema/schema/dataDictionary.json +209 -0
  55. data/schema/schema/dataQuality.json +159 -0
  56. data/schema/schema/distributor.json +171 -0
  57. data/schema/schema/extent.json +214 -0
  58. data/schema/schema/geojson/bbox.json +14 -0
  59. data/schema/schema/geojson/crs.json +99 -0
  60. data/schema/schema/geojson/geojson.json +194 -0
  61. data/schema/schema/geojson/geometry.json +203 -0
  62. data/schema/schema/graphicOverview.json +42 -0
  63. data/schema/schema/keyword.json +39 -0
  64. data/schema/schema/maintInfo.json +43 -0
  65. data/schema/schema/metadata.json +173 -0
  66. data/schema/schema/onlineResource.json +42 -0
  67. data/schema/schema/resolution.json +51 -0
  68. data/schema/schema/resourceConstraint.json +108 -0
  69. data/schema/schema/resourceInfo.json +305 -0
  70. data/schema/schema/taxonomy.json +122 -0
  71. data/schema/schema/usage.json +39 -0
  72. data/templates/mdJson_template.json +1065 -0
  73. data/test/draft-04.json +189 -0
  74. data/test/tc_schemas.rb +210 -0
  75. data/test/tc_utils.rb +27 -0
  76. metadata +178 -0
@@ -0,0 +1,305 @@
1
+ {
2
+ "id": "resourceInfo.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "Information about the resource.",
5
+ "type": "object",
6
+ "example": "../../examples/full_example.json#/metadata/resourceInfo",
7
+ "translation": {
8
+ "ISO 19115-2": ["MD_DataIdentification"],
9
+ "FGDC CSDGM": ["idinfo"]
10
+ },
11
+ "required": ["resourceType", "citation", "abstract", "status", "language", "pointOfContact"],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "resourceType": {
15
+ "type": "string",
16
+ "description": "Identifies the type of resource, such as: a dataset, study, publication, etc.",
17
+ "translation": {
18
+ "ISO 19115-2": ["MI_Metadata > hierarchyLevel [MD_ScopeCode]"]
19
+ }
20
+ },
21
+ "citation": {
22
+ "description": "Citation for the resource.",
23
+ "translation": {
24
+ "ISO 19115-2": ["MD_DataIdentification > citation > CI_Citation"],
25
+ "FGDC CSDGM": ["idinfo > citation"]
26
+ },
27
+ "$ref": "citation.json#"
28
+ },
29
+ "resourceTimePeriod": {
30
+ "description": "Time period for the resource, e.g. project start and end date(s).",
31
+ "translation": {
32
+ "ISO 19115-2": ["EX_Extent > temporalElement > EX_TemporalExtent > extent > TimePeriod"]
33
+ },
34
+ "$ref": "extent.json#/definitions/timePeriod"
35
+ },
36
+ "pointOfContact": {
37
+ "type": "array",
38
+ "description": "Identification of, and means of communication with, person(s) and organizations that may be contacted for acquiring knowledge about or acquisition of the resource.",
39
+ "translation": {
40
+ "ISO 19115-2": ["MD_DataIdentification > pointOfContact"]
41
+ },
42
+ "minItems": 1,
43
+ "uniqueItems": true,
44
+ "items": {
45
+ "$ref": "contact.json#/definitions/contactRef"
46
+ }
47
+ },
48
+ "abstract": {
49
+ "type": "string",
50
+ "description": "Brief narrative summary of the content of the resource.",
51
+ "translation": {
52
+ "ISO 19115-2": ["MD_DataIdentification > abstract"],
53
+ "FGDC CSDGM": ["idinfo > descript > abstract"]
54
+ }
55
+ },
56
+ "shortAbstract": {
57
+ "type": "string",
58
+ "description": "A short description of the resource. Max of 300 characters."
59
+ },
60
+ "status": {
61
+ "type": "string",
62
+ "description": "Status of the resource.",
63
+ "translation": {
64
+ "ISO 19115-2": ["MD_DataIdentification > status"],
65
+ "FGDC CSDGM": ["idinfo > status > progress"]
66
+ }
67
+ },
68
+ "hasMapLocation": {
69
+ "type": "boolean",
70
+ "description": "A flag indicating that a resource has a geographic location associated with it and therefore can be located using a map interface."
71
+ },
72
+ "hasDataAvailable": {
73
+ "type": "boolean",
74
+ "description": "A flag to indicate whether data for this resource is available for distribution."
75
+ },
76
+ "language": {
77
+ "type": "array",
78
+ "description": "Language(s) used within the resource. Should be a valid ISO 639-3 code.",
79
+ "translation": {
80
+ "ISO 19115-2": ["MD_DataIdentification > language"]
81
+ },
82
+ "items": {
83
+ "type": "string"
84
+ }
85
+ },
86
+ "purpose": {
87
+ "type": "string",
88
+ "description": "A summary of intentions for which the resource was created.",
89
+ "translation": {
90
+ "ISO 19115-2": ["MD_DataIdentification > purpose"],
91
+ "FGDC CSDGM": ["idinfo > descript > purpose"]
92
+ }
93
+ },
94
+ "credit": {
95
+ "type": "array",
96
+ "description": "A narrative identification of additional resources credited for the resource.",
97
+ "translation": {
98
+ "ISO 19115-2": ["MD_DataIdentification > credit"],
99
+ "FGDC CSDGM": ["idinfo > datacred"]
100
+ },
101
+ "items": {
102
+ "type": "string"
103
+ }
104
+ },
105
+ "topicCategory": {
106
+ "type": "array",
107
+ "description": "General theme keyword of the resource, such as: oceans, biota atmosphere, etc.",
108
+ "translation": {
109
+ "ISO 19115-2": ["MD_DataIdentification > topicCategory"]
110
+ },
111
+ "items": {
112
+ "type": "string"
113
+ }
114
+ },
115
+ "environmentDescription": {
116
+ "type": "string",
117
+ "description": "Description of the dataset in the producer's processing environment, including items such as the software, the computer, the computer operating system, file name, and the dataset size.",
118
+ "translation": {
119
+ "ISO 19115-2": ["MD_DataIdentification > environmentDescription"],
120
+ "FGDC CSDGM": ["idinfo > native"]
121
+ }
122
+ },
123
+ "resourceNativeFormat": {
124
+ "type": "array",
125
+ "description": "Provides a description of the format of the resource(s).",
126
+ "translation": {
127
+ "ISO 19115-2": ["MD_DataIdentification > resourceFormat > MD_Format"]
128
+ },
129
+ "minItems": 1,
130
+ "uniqueItems": true,
131
+ "items": {
132
+ "$ref": "distributor.json#/definitions/format"
133
+ }
134
+ },
135
+ "keyword": {
136
+ "type": "array",
137
+ "description": "Provides category keywords, their type, and reference source.",
138
+ "translation": {
139
+ "ISO 19115-2": ["MD_DataIdentification > descriptiveKeywords > MD_Keywords"],
140
+ "FGDC CSDGM": ["idinfo > keywords"]
141
+ },
142
+ "uniqueItems": true,
143
+ "items": {
144
+ "$ref": "keyword.json"
145
+ }
146
+ },
147
+ "resourceMaintenance": {
148
+ "type": "array",
149
+ "description": "Information about the maintenance of the resource.",
150
+ "translation": {
151
+ "ISO 19115-2": ["MD_DataIdentification > resourceMaintenance > MD_MaintenanceInformation"]
152
+ },
153
+ "items": {
154
+ "$ref": "maintInfo.json#"
155
+ }
156
+ },
157
+ "resourceSpecificUsage": {
158
+ "type": "array",
159
+ "description": "Description of ways in which the resource is currently or has been used.",
160
+ "translation": {
161
+ "ISO 19115-2": ["MD_DataIdentification > resourceSpecificUsage > MD_Usage"]
162
+ },
163
+ "uniqueItems": true,
164
+ "items": {
165
+ "$ref": "usage.json"
166
+ }
167
+ },
168
+ "graphicOverview": {
169
+ "type": "array",
170
+ "description": "A browse graphic associated with the resource in which to gain an at-a-glance referencing for the resource, such as geographic location and extent.",
171
+ "translation": {
172
+ "ISO 19115-2": ["MD_DataIdentification > graphicOverview > MD_BrowseGraphic"]
173
+ },
174
+ "items": {
175
+ "$ref": "graphicOverview.json#"
176
+ }
177
+ },
178
+ "constraint": {
179
+ "type": "object",
180
+ "description": "Provides information about constraints to the use of the resource.",
181
+ "translation": {
182
+ "ISO 19115-2": ["MD_DataIdentification > resourceConstraints"]
183
+ },
184
+ "properties": {
185
+ "useLimitation": {
186
+ "type": "array",
187
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/constraint",
188
+ "translation": {
189
+ "ISO 19115-2": ["MD_DataIdentification > resourceConstraints > MD_Constraints[useLimitation]"]
190
+ },
191
+ "items": {
192
+ "$ref": "resourceConstraint.json#/definitions/useLimitation"
193
+ }
194
+ },
195
+ "legalConstraint": {
196
+ "type": "array",
197
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/constraint/legalConstraint",
198
+ "translation": {
199
+ "ISO 19115-2": ["MI_Metadata > resourceConstraints > MD_LegalConstraints"]
200
+ },
201
+ "items": {
202
+ "$ref": "resourceConstraint.json#/definitions/legalConstraint"
203
+ }
204
+ },
205
+ "securityConstraint": {
206
+ "type": "array",
207
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/constraint/securityConstraint",
208
+ "translation": {
209
+ "ISO 19115-2": ["MI_Metadata > resourceConstraints > MD_SecurityConstraints"]
210
+ },
211
+ "items": {
212
+ "$ref": "resourceConstraint.json#/definitions/securityConstraint"
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "taxonomy": {
218
+ "translation": {
219
+ "ISO 19115-2": ["MD_DataIdentification > taxonomy"],
220
+ "FGDC CSDGM": ["idinfo > taxonomy"]
221
+ },
222
+ "$ref": "taxonomy.json"
223
+ },
224
+ "spatialReferenceSystem": {
225
+ "description": "Geospatial referencing system associated with describing the geospatial extent of the data resource. The referencing can be provided indirectly by an EPSG number, a named reference, or providing the parameters in a well known text (WKT) format.",
226
+ "example": "../../examples/spatialRef.json",
227
+ "translation": {
228
+ "ISO 19115-2": ["MD_Metadata > referenceSystemInfo > MD_ReferenceSystem > referenceSystemIdentifier > RS_Identifier > code"]
229
+ },
230
+ "type": "object",
231
+ "properties": {
232
+ "name": {
233
+ "type": "array",
234
+ "description": "A recognized reference system name.",
235
+ "items": {
236
+ "type": "string"
237
+ }
238
+ },
239
+ "epsgNumber": {
240
+ "type": "array",
241
+ "description": "The EPSG Geodetic Parameter Dataset of the reference system, see epsg-registry.org.",
242
+ "items": {
243
+ "type": "integer"
244
+ }
245
+ },
246
+ "wkt": {
247
+ "type": "array",
248
+ "description": "Well-known text representation of the reference system.",
249
+ "items": {
250
+ "type": "string"
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "spatialRepresentation": {
256
+ "type": "array",
257
+ "description": "Format of the resource geographic extent, such as: vector, grid, etc.",
258
+ "translation": {
259
+ "ISO 19115-2": ["MD_DataIdenification > spatialRepresentationType [MD_SpatialRepresentationTypeCode]"],
260
+ "FGDC CSDGM": ["spdoinfo"]
261
+ },
262
+ "items": {
263
+ "type": "string"
264
+ }
265
+ },
266
+ "spatialResolution": {
267
+ "type": "array",
268
+ "description": "Information about the scale of the geographic extent.",
269
+ "translation": {
270
+ "ISO 19115-2": ["MD_DataIdenification > spatialResolution > MD_Resolution"]
271
+ },
272
+ "items": {
273
+ "$ref": "resolution.json"
274
+ }
275
+ },
276
+ "extent": {
277
+ "type": "array",
278
+ "description": "Information about the geographic extent of the resource. A resource may have multiple extents.",
279
+ "translation": {
280
+ "ISO 19115-2": ["MD_DataIdentification > extent > EX_Extent"]
281
+ },
282
+ "items": {
283
+ "$ref": "extent.json"
284
+ }
285
+ },
286
+ "dataQualityInfo": {
287
+ "type": "array",
288
+ "description": "Information about the quality of the resource.",
289
+ "translation": {
290
+ "ISO 19115-2": ["MI_Metadata > dataQualityInfo > DQ_DataQuality"],
291
+ "FGDC CSDGM": ["dataqual"]
292
+ },
293
+ "items": {
294
+ "$ref": "dataQuality.json#"
295
+ }
296
+ },
297
+ "supplementalInfo": {
298
+ "type": "string",
299
+ "description": "Any other descriptive information about the dataset.",
300
+ "translation": {
301
+ "ISO 19115-2": ["MD_DataIdentification > supplementalInfo"]
302
+ }
303
+ }
304
+ }
305
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "id": "taxonomy.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "type": "object",
5
+ "description": "Information on the taxa (1 or more) included in the data set, including keywords, taxonomic system and coverage information, and taxonomic classification system.",
6
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/taxonomy",
7
+ "translation": {
8
+ "ISO 19115-2": ["MD_TaxonSys"],
9
+ "FGDC CSDGM": ["idinfo > taxonomy"]
10
+ },
11
+ "required": ["classificationSystem", "taxonomicProcedure", "taxonClass"],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "classificationSystem": {
15
+ "type": "array",
16
+ "description": "Information (citation) about the taxonomic classification system or authority used.",
17
+ "translation": {
18
+ "ISO 19115-2": ["MD_TaxonSys > classSys > CI_Citation"],
19
+ "FGDC CSDGM": ["idinfo > taxonomy > taxonsys > classsys"]
20
+ },
21
+ "minItems": 1,
22
+ "items": {
23
+ "$ref": "citation.json"
24
+ }
25
+ },
26
+ "taxonGeneralScope": {
27
+ "type": "string",
28
+ "description": "Description of the range of taxa addressed in the data set or collection. For example, \"all vascular plants were identified to family or species, mosses and lichens were identified as moss or lichen\".",
29
+ "translation": {
30
+ "ISO 19115-2": ["MD_TaxonSys > taxongen"]
31
+ }
32
+ },
33
+ "observer": {
34
+ "type": "array",
35
+ "description": "Information about the individual(s) responsible for the identification(s) of the specimens or sightings. etc.",
36
+ "translation": {
37
+ "ISO 19115-2": ["MD_TaxonSys > obs > CI_ResponsibleParty"]
38
+ },
39
+ "items": {
40
+ "$ref": "contact.json#/definitions/contactRef"
41
+ }
42
+ },
43
+ "taxonomicProcedure": {
44
+ "type": "string",
45
+ "description": "Description of the methods used for taxonomic identification. Could include specimen processing, comparison with museum materials, keys, and key characters, chemical or genetic analyses, etc.",
46
+ "translation": {
47
+ "ISO 19115-2": ["MD_TaxonSys > taxonpro"],
48
+ "FGDC CSDGM": ["idinfo > taxonomy > taxonsys > taxonpro"]
49
+ }
50
+ },
51
+ "voucher": {
52
+ "type": "object",
53
+ "description": "Information on the types of specimen, the repository, and the individuals who identified the vouchers.",
54
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/taxonomy",
55
+ "translation": {
56
+ "ISO 19115-2": ["MD_TaxonSys > voucher > MD_Vouchers"],
57
+ "FGDC CSDGM": ["idinfo > taxonomy > taxonsys > vouchers"]
58
+ },
59
+ "required": ["specimen", "repository"],
60
+ "properties": {
61
+ "specimen": {
62
+ "type": "string",
63
+ "description": "Word or phrase describing the type of specimen collected (e.g. herbarium specimens, blood samples, photographs, individuals, or batches). Example: \"herbarium specimens\", \"blood samples\", \"photographs\", \"individuals\", \"free text\".",
64
+ "translation": {
65
+ "ISO 19115-2": ["MD_Vouchers > specimen"],
66
+ "FGDC CSDGM": ["idinfo > taxonomy > taxonsys > vouchers > specimens"]
67
+ }
68
+ },
69
+ "repository": {
70
+ "description": "Information about the curator or contact person and/or agency responsible for the specimens.",
71
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/taxonomy/voucher",
72
+ "translation": {
73
+ "ISO 19115-2": ["MD_Vouchers > reposit > CI_ResponsibleParty"],
74
+ "FGDC CSDGM": ["idinfo > taxonomy > taxonsys > vouchers > reposit"]
75
+ },
76
+ "$ref": "contact.json#/definitions/contactRef"
77
+ }
78
+ }
79
+ },
80
+ "taxonClass": {
81
+ "type": "array",
82
+ "description": "Information about the range of taxa addressed in the data set or collection. It is recommended that one provide information starting from the taxonomic rank of kingdom, to a level which reflects the data set or collection being documented. The levels of Kingdom, Division/Phylum, class, Order, Family, Genus, and Species should be included as ranks as appropriate.",
83
+ "translation": {
84
+ "ISO 19115-2": ["MD_TaxonSys > taxonCl > MD_TaxonCl"],
85
+ "FGDC CSDGM": ["idinfo > taxonomy > taxoncl"]
86
+ },
87
+ "minItems": 1,
88
+ "items": {
89
+ "type": "object",
90
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/taxonomy",
91
+ "required": ["taxonRank", "taxonValue"],
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "taxonRank": {
95
+ "type": "string",
96
+ "description": "Name of the taxonomic rank for which the taxonValue is provided. Example: \"Kingdom\", \"Division\", \"Phylum\", \"Subphylum\", \"SuperClass\", \"Class\", \"SubClass\", \"InfraClass\", \"Superorder\", \"Order\", \"Suborder\", \"Infraorder\", \"Superfamily\", \"Family\", \"Subfamily\", \"Tribe\", \"Subtribe\", \"Genus\", \"Species\".",
97
+ "translation": {
98
+ "ISO 19115-2": [" MD_TaxonCl > taxonrn"],
99
+ "FGDC CSDGM": ["idinfo > taxonomy > taxoncl > taxonrn"]
100
+ }
101
+ },
102
+ "taxonValue": {
103
+ "type": "string",
104
+ "description": "Taxonomic rank value of the taxon being described.",
105
+ "translation": {
106
+ "ISO 19115-2": ["MD_TaxonCl > taxonrv"],
107
+ "FGDC CSDGM": ["idinfo > taxonomy > taxoncl > taxonrv"]
108
+ }
109
+ },
110
+ "common": {
111
+ "type": "string",
112
+ "description": "Specification of applicable common names. These common names may be general descriptions of a group of organisms if appropriate (e.g. insects, vertebrate, grasses, waterfowl, vascular plants, etc.).",
113
+ "translation": {
114
+ "ISO 19115-2": ["MD_TaxonCl > common"],
115
+ "FGDC CSDGM": ["idinfo > taxonomy > taxoncl > common"]
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "id": "usage.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "type": "object",
5
+ "description": "Description of ways in which the resource is currently or has been used.",
6
+ "example": "../../examples/full_example.json#/metadata/resourceInfo/resourceSpecificUsage/0",
7
+ "translation": {
8
+ "ISO 19115-2": ["MD_Usage"]
9
+ },
10
+ "required": ["specificUsage", "userContactInfo"],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "specificUsage": {
14
+ "type": "string",
15
+ "description": "Brief description of the resource usage.",
16
+ "translation": {
17
+ "ISO 19115-2": ["MD_Usage > specific usage"]
18
+ }
19
+ },
20
+ "userDeterminedLimitation": {
21
+ "type": "string",
22
+ "description": "Usage that the provider's have determined the resource not being suitable for.",
23
+ "translation": {
24
+ "ISO 19115-2": ["MD_Usage > userDeterminedLimitations"]
25
+ }
26
+ },
27
+ "userContactInfo": {
28
+ "type": "array",
29
+ "description": "Identification of and means of communicating with the person(s) and organization(s) using the resource.",
30
+ "translation": {
31
+ "ISO 19115-2": ["MD_Usage > userContactInfo"]
32
+ },
33
+ "uniqueItems": true,
34
+ "items": {
35
+ "$ref": "contact.json#/definitions/contactRef"
36
+ }
37
+ }
38
+ }
39
+ }