adiwg-json_schemas 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.travis.yml +9 -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 +24 -0
  10. data/examples/adiwg_project_example_1.json +847 -0
  11. data/examples/citation.json +60 -0
  12. data/examples/contact.json +165 -0
  13. data/examples/contactRef.json +15 -0
  14. data/examples/dataQuality.json +132 -0
  15. data/examples/data_example.json +371 -0
  16. data/examples/date.json +19 -0
  17. data/examples/distributor.json +53 -0
  18. data/examples/extent_linestring.json +288 -0
  19. data/examples/extent_point.json +200 -0
  20. data/examples/extent_polygon.json +353 -0
  21. data/examples/full_example.json +1629 -0
  22. data/examples/geojson.json +253 -0
  23. data/examples/graphicOverview.json +23 -0
  24. data/examples/hierarchyLevel.json +90 -0
  25. data/examples/keywords.json +68 -0
  26. data/examples/lcc_project_example.json +245 -0
  27. data/examples/maintInfo.json +22 -0
  28. data/examples/onlineResource.json +12 -0
  29. data/examples/resolution.json +9 -0
  30. data/examples/resourceConstraints.json +25 -0
  31. data/examples/resourceInfo.json +1287 -0
  32. data/examples/resourceMaintenance.json +10 -0
  33. data/examples/taxonomy.json +98 -0
  34. data/examples/uri.json +7 -0
  35. data/examples/usage.json +23 -0
  36. data/lib/adiwg/json_schemas/utils.rb +20 -0
  37. data/lib/adiwg/json_schemas/version.rb +6 -0
  38. data/lib/adiwg/json_schemas.rb +7 -0
  39. data/lib/adiwg-json_schemas.rb +1 -0
  40. data/schema/schema/citation.json +77 -0
  41. data/schema/schema/contact.json +175 -0
  42. data/schema/schema/dataQuality.json +82 -0
  43. data/schema/schema/distributor.json +89 -0
  44. data/schema/schema/extent.json +118 -0
  45. data/schema/schema/geojson/bbox.json +10 -0
  46. data/schema/schema/geojson/crs.json +53 -0
  47. data/schema/schema/geojson/geojson.json +131 -0
  48. data/schema/schema/geojson/geometry.json +123 -0
  49. data/schema/schema/graphicOverview.json +22 -0
  50. data/schema/schema/keyword.json +37 -0
  51. data/schema/schema/maintInfo.json +26 -0
  52. data/schema/schema/metadata.json +88 -0
  53. data/schema/schema/onlineResource.json +28 -0
  54. data/schema/schema/resolution.json +29 -0
  55. data/schema/schema/resourceConstraint.json +65 -0
  56. data/schema/schema/resourceInfo.json +151 -0
  57. data/schema/schema/taxonomy.json +61 -0
  58. data/schema/schema/usage.json +23 -0
  59. data/schema/schema.json +42 -0
  60. data/templates/adiwg_metadata_template.json +585 -0
  61. data/test/tc_schemas.rb +133 -0
  62. data/test/tc_utils.rb +26 -0
  63. metadata +150 -0
@@ -0,0 +1,65 @@
1
+ {
2
+ "id": "resourceConstraint.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema for resource constraint",
5
+ "anyOf": [
6
+ {
7
+ "$ref": "#/definitions/useLimitation"
8
+ }, {
9
+ "$ref": "#/definitions/legalConstraint"
10
+ }, {
11
+ "$ref": "#/definitions/securityConstraint"
12
+ }
13
+ ],
14
+ "definitions": {
15
+ "useLimitation": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "legalConstraint": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "accessConstraint": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "useConstraint": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "otherConstraint": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "securityConstraint": {
46
+ "type": "object",
47
+ "required": ["classification"],
48
+ "additionalProperties": false,
49
+ "properties": {
50
+ "classification": {
51
+ "type": "string"
52
+ },
53
+ "userNote": {
54
+ "type": "string"
55
+ },
56
+ "classificationSystem": {
57
+ "type": "string"
58
+ },
59
+ "handlingDescription": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "id": "resourceInfo.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema for ADIwg metadata resourceInfo section",
5
+ "type": "object",
6
+ "required": ["citation", "abstract", "status", "language"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "citation": {
10
+ "$ref": "./citation.json#"
11
+ },
12
+ "pointOfContact": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "uniqueItems": true,
16
+ "items": {
17
+ "$ref": "./contact.json#/definitions/contactRef"
18
+ }
19
+ },
20
+ "abstract": {
21
+ "type": "string"
22
+ },
23
+ "shortAbstract": {
24
+ "type": "string"
25
+ },
26
+ "status": {
27
+ "type": "string"
28
+ },
29
+ "hasMapLocation": {
30
+ "type": "boolean"
31
+ },
32
+ "hasDataAvailable": {
33
+ "type": "boolean"
34
+ },
35
+ "language": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "purpose": {
42
+ "type": "string"
43
+ },
44
+ "credit": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string"
48
+ }
49
+ },
50
+ "topicCategory": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "environmentDescription": {
57
+ "type": "string"
58
+ },
59
+ "resourceNativeFormat": {
60
+ "type": "array",
61
+ "minItems": 1,
62
+ "uniqueItems": true,
63
+ "items": {
64
+ "$ref": "./distributor.json#/definitions/format"
65
+ }
66
+ },
67
+ "keyword": {
68
+ "type": "array",
69
+ "uniqueItems": true,
70
+ "items": {
71
+ "$ref": "./keyword.json"
72
+ }
73
+ },
74
+ "resourceMaintenance": {
75
+ "type": "array",
76
+ "items": {
77
+ "$ref": "./maintInfo.json#"
78
+ }
79
+ },
80
+ "resourceSpecificUsage": {
81
+ "type": "array",
82
+ "uniqueItems": true,
83
+ "items": {
84
+ "$ref": "./usage.json"
85
+ }
86
+ },
87
+ "graphicOverview": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "./graphicOverview.json#"
91
+ }
92
+ },
93
+ "constraint": {
94
+ "type": "object",
95
+ "properties": {
96
+ "useLimitation": {
97
+ "$ref": "./resourceConstraint.json#/definitions/useLimitation"
98
+ },
99
+ "legalConstraint": {
100
+ "type": "array",
101
+ "items": {
102
+ "$ref": "./resourceConstraint.json#/definitions/legalConstraint"
103
+ }
104
+ },
105
+ "securityConstraint": {
106
+ "type": "array",
107
+ "items": {
108
+ "$ref": "./resourceConstraint.json#/definitions/securityConstraint"
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "taxonomy": {
114
+ "$ref": "./taxonomy.json"
115
+ },
116
+ "spatialDatum": {
117
+ "description": "Description of the spatial and temporal reference systems used in the dataset.",
118
+ "type": "array",
119
+ "items": {
120
+ "type": "string"
121
+ }
122
+ },
123
+ "spatialRepresentation": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "spatialResolution": {
130
+ "type": "array",
131
+ "items": {
132
+ "$ref": "./resolution.json"
133
+ }
134
+ },
135
+ "extent": {
136
+ "type": "array",
137
+ "items": {
138
+ "$ref": "./extent.json"
139
+ }
140
+ },
141
+ "dataQualityInfo": {
142
+ "type": "array",
143
+ "items": {
144
+ "$ref": "./dataQuality.json#"
145
+ }
146
+ },
147
+ "supplementalInfo": {
148
+ "type": "string"
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "id": "taxonomy.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema for taxonomy",
5
+ "type": "object",
6
+ "required": ["classificationSystem", "taxonomicProcedure", "taxonClass"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "classificationSystem": {
10
+ "type": "array",
11
+ "minItems": 1,
12
+ "items": {
13
+ "$ref": "citation.json"
14
+ }
15
+ },
16
+ "taxonGeneralScope": {
17
+ "type": "string"
18
+ },
19
+ "observer": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "contact.json#/definitions/contactRef"
23
+ }
24
+ },
25
+ "taxonomicProcedure": {
26
+ "type": "string"
27
+ },
28
+ "voucher": {
29
+ "type": "object",
30
+ "required": ["specimen", "repository"],
31
+ "properties": {
32
+ "specimen": {
33
+ "type": "string"
34
+ },
35
+ "repository": {
36
+ "$ref": "contact.json#/definitions/contactRef"
37
+ }
38
+ }
39
+ },
40
+ "taxonClass": {
41
+ "type": "array",
42
+ "minItems": 1,
43
+ "items": {
44
+ "type": "object",
45
+ "required": ["taxonRank", "taxonValue"],
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "taxonRank": {
49
+ "type": "string"
50
+ },
51
+ "taxonValue": {
52
+ "type": "string"
53
+ },
54
+ "common": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "usage.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema for usage",
5
+ "type": "object",
6
+ "required": ["specificUsage", "userContactInfo"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "specificUsage": {
10
+ "type": "string"
11
+ },
12
+ "userDeterminedLimitation": {
13
+ "type": "string"
14
+ },
15
+ "userContactInfo": {
16
+ "type": "array",
17
+ "uniqueItems": true,
18
+ "items": {
19
+ "$ref": "contact.json#/definitions/contactRef"
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": "schema.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema for ADIwg JSON metadata",
5
+ "type": "object",
6
+ "required": ["version", "contact", "metadata"],
7
+ "properties": {
8
+ "verion": {
9
+ "name": {
10
+ "type": "string"
11
+ },
12
+ "version": {
13
+ "type": "string",
14
+ "pattern": "[0-9]\\.[0-9]\\.[0-9]"
15
+ }
16
+ },
17
+ "contact": {
18
+ "$ref": "schema/contact.json"
19
+ },
20
+ "metadata": {
21
+ "$ref": "schema/metadata.json"
22
+ }
23
+ },
24
+ "definitions": {
25
+ "url": {
26
+ "type": "string",
27
+ "pattern": "(https?|ftp):\\/\\/(-\\.)?([^\\s\\/?\\.#-]+\\.?)+(\\/[^\\s]*)?$"
28
+ },
29
+ "uri": {
30
+ "type": "string",
31
+ "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
+ },
33
+ "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
+ ]
40
+ }
41
+ }
42
+ }