adiwg-json_schemas 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.travis.yml +9 -0
- data/CREDITS +3 -0
- data/Gemfile +4 -0
- data/LICENSE +24 -0
- data/README.md +36 -0
- data/Rakefile +12 -0
- data/adiwg-json_schemas.gemspec +24 -0
- data/examples/adiwg_project_example_1.json +847 -0
- data/examples/citation.json +60 -0
- data/examples/contact.json +165 -0
- data/examples/contactRef.json +15 -0
- data/examples/dataQuality.json +132 -0
- data/examples/data_example.json +371 -0
- data/examples/date.json +19 -0
- data/examples/distributor.json +53 -0
- data/examples/extent_linestring.json +288 -0
- data/examples/extent_point.json +200 -0
- data/examples/extent_polygon.json +353 -0
- data/examples/full_example.json +1629 -0
- data/examples/geojson.json +253 -0
- data/examples/graphicOverview.json +23 -0
- data/examples/hierarchyLevel.json +90 -0
- data/examples/keywords.json +68 -0
- data/examples/lcc_project_example.json +245 -0
- data/examples/maintInfo.json +22 -0
- data/examples/onlineResource.json +12 -0
- data/examples/resolution.json +9 -0
- data/examples/resourceConstraints.json +25 -0
- data/examples/resourceInfo.json +1287 -0
- data/examples/resourceMaintenance.json +10 -0
- data/examples/taxonomy.json +98 -0
- data/examples/uri.json +7 -0
- data/examples/usage.json +23 -0
- data/lib/adiwg/json_schemas/utils.rb +20 -0
- data/lib/adiwg/json_schemas/version.rb +6 -0
- data/lib/adiwg/json_schemas.rb +7 -0
- data/lib/adiwg-json_schemas.rb +1 -0
- data/schema/schema/citation.json +77 -0
- data/schema/schema/contact.json +175 -0
- data/schema/schema/dataQuality.json +82 -0
- data/schema/schema/distributor.json +89 -0
- data/schema/schema/extent.json +118 -0
- data/schema/schema/geojson/bbox.json +10 -0
- data/schema/schema/geojson/crs.json +53 -0
- data/schema/schema/geojson/geojson.json +131 -0
- data/schema/schema/geojson/geometry.json +123 -0
- data/schema/schema/graphicOverview.json +22 -0
- data/schema/schema/keyword.json +37 -0
- data/schema/schema/maintInfo.json +26 -0
- data/schema/schema/metadata.json +88 -0
- data/schema/schema/onlineResource.json +28 -0
- data/schema/schema/resolution.json +29 -0
- data/schema/schema/resourceConstraint.json +65 -0
- data/schema/schema/resourceInfo.json +151 -0
- data/schema/schema/taxonomy.json +61 -0
- data/schema/schema/usage.json +23 -0
- data/schema/schema.json +42 -0
- data/templates/adiwg_metadata_template.json +585 -0
- data/test/tc_schemas.rb +133 -0
- data/test/tc_utils.rb +26 -0
- metadata +150 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"classificationSystem": [
|
4
|
+
{
|
5
|
+
"title": "Otter Record Survey",
|
6
|
+
"date": [
|
7
|
+
{
|
8
|
+
"date": "2000",
|
9
|
+
"dateType": "publication"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"responsibleParty": [
|
13
|
+
{
|
14
|
+
"contactId": "2",
|
15
|
+
"role": "publisher"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"title": "Another Record Survey",
|
21
|
+
"date": [
|
22
|
+
{
|
23
|
+
"date": "2003",
|
24
|
+
"dateType": "publication"
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"responsibleParty": [
|
28
|
+
{
|
29
|
+
"contactId": "1",
|
30
|
+
"role": "publisher"
|
31
|
+
}
|
32
|
+
]
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"taxonGeneralScope": "The otters observed were identified to the subspecies criterion and identified as southern sea otters.",
|
36
|
+
"observer": [
|
37
|
+
{
|
38
|
+
"contactId": "1",
|
39
|
+
"role": "principalInvestigator"
|
40
|
+
}, {
|
41
|
+
"contactId": "2",
|
42
|
+
"role": "pointOfContact"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"taxonomicProcedure": "volunteers observed sea otters using binoculars in pairs",
|
46
|
+
"voucher": {
|
47
|
+
"specimen": "weathered skull found on beach",
|
48
|
+
"repository": {
|
49
|
+
"contactId": "2",
|
50
|
+
"role": "publisher"
|
51
|
+
}
|
52
|
+
},
|
53
|
+
"taxonClass": [
|
54
|
+
{
|
55
|
+
"taxonRank": "Kingdom",
|
56
|
+
"taxonValue": "Animalia"
|
57
|
+
}, {
|
58
|
+
"taxonRank": "Phylum",
|
59
|
+
"taxonValue": "Chordata"
|
60
|
+
}, {
|
61
|
+
"taxonRank": "Subphylum",
|
62
|
+
"taxonValue": "Vertebrata"
|
63
|
+
}, {
|
64
|
+
"taxonRank": "Class",
|
65
|
+
"taxonValue": "Mammalia"
|
66
|
+
}, {
|
67
|
+
"taxonRank": "Subclass",
|
68
|
+
"taxonValue": "Theria"
|
69
|
+
}, {
|
70
|
+
"taxonRank": "Infraclass",
|
71
|
+
"taxonValue": "Eutheria"
|
72
|
+
}, {
|
73
|
+
"taxonRank": "Order",
|
74
|
+
"taxonValue": "Carnivora"
|
75
|
+
}, {
|
76
|
+
"taxonRank": "Suborder",
|
77
|
+
"taxonValue": "Caniformia"
|
78
|
+
}, {
|
79
|
+
"taxonRank": "Family",
|
80
|
+
"taxonValue": "Mustilidae"
|
81
|
+
}, {
|
82
|
+
"taxonRank": "Subfamily",
|
83
|
+
"taxonValue": "Lutrinae"
|
84
|
+
}, {
|
85
|
+
"taxonRank": "Genus",
|
86
|
+
"taxonValue": "Enhydra"
|
87
|
+
}, {
|
88
|
+
"common": "Sea Otter",
|
89
|
+
"taxonRank": "Species",
|
90
|
+
"taxonValue": "Enhydra lutris"
|
91
|
+
}, {
|
92
|
+
"common": "Southern Sea Otter",
|
93
|
+
"taxonRank": "Subspecies",
|
94
|
+
"taxonValue": "Enhydra"
|
95
|
+
}
|
96
|
+
]
|
97
|
+
}
|
98
|
+
]
|
data/examples/uri.json
ADDED
data/examples/usage.json
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"specificUsage": "Developed for land use planning.",
|
4
|
+
"userDeterminedLimitation": "Not suitable for use for navigation.",
|
5
|
+
"userContactInfo": [
|
6
|
+
{
|
7
|
+
"contactId": "3",
|
8
|
+
"role": "publisher"
|
9
|
+
}, {
|
10
|
+
"contactId": "3",
|
11
|
+
"role": "author"
|
12
|
+
}
|
13
|
+
]
|
14
|
+
}, {
|
15
|
+
"specificUsage": "Bathymetry datasets developed for modeling physical oceanographic conditions in the Barrow Straight.",
|
16
|
+
"userContactInfo": [
|
17
|
+
{
|
18
|
+
"contactId": "1",
|
19
|
+
"role": "custodian"
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
23
|
+
]
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module ADIWG
|
2
|
+
module JsonSchemas
|
3
|
+
module Utils
|
4
|
+
# Return the path to main schema.json file.
|
5
|
+
def self.schema_path
|
6
|
+
File.join(File.dirname(File.expand_path(__FILE__)), '../../../schema/schema.json')
|
7
|
+
end
|
8
|
+
|
9
|
+
# Return the path to schema directory.
|
10
|
+
def self.schema_dir
|
11
|
+
File.join(File.dirname(File.expand_path(__FILE__)), '../../../schema/')
|
12
|
+
end
|
13
|
+
|
14
|
+
# Return the path to examples directory.
|
15
|
+
def self.examples_dir
|
16
|
+
File.join(File.dirname(File.expand_path(__FILE__)), '../../../examples/')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'adiwg/json_schemas.rb'
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{
|
2
|
+
"id": "citation.json#",
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
|
+
"description": "schema for citation",
|
5
|
+
"type": "object",
|
6
|
+
"required": ["title", "date"],
|
7
|
+
"anyOf": [
|
8
|
+
{
|
9
|
+
"$ref": "#/definitions/citationBase"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"definitions": {
|
13
|
+
"citationBase": {
|
14
|
+
"description": "base schema for citation, date not required",
|
15
|
+
"type": "object",
|
16
|
+
"required": ["title"],
|
17
|
+
"additionalProperties": false,
|
18
|
+
"properties": {
|
19
|
+
"title": {
|
20
|
+
"type": "string"
|
21
|
+
},
|
22
|
+
"date": {
|
23
|
+
"type": "array",
|
24
|
+
"minItems": 1,
|
25
|
+
"items": {
|
26
|
+
"type": "object",
|
27
|
+
"required": ["date", "dateType"],
|
28
|
+
"properties": {
|
29
|
+
"date": {
|
30
|
+
"$ref": "../schema.json#definitions/date"
|
31
|
+
},
|
32
|
+
"dateType": {
|
33
|
+
"type": "string"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"edition": {
|
39
|
+
"type": "string"
|
40
|
+
},
|
41
|
+
"responsibleParty": {
|
42
|
+
"type": "array",
|
43
|
+
"minItems": 1,
|
44
|
+
"items": {
|
45
|
+
"$ref": "contact.json#/definitions/contactRef"
|
46
|
+
}
|
47
|
+
},
|
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
|
+
},
|
68
|
+
"onlineResource": {
|
69
|
+
"type": "array",
|
70
|
+
"items": {
|
71
|
+
"$ref": "./onlineResource.json#"
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,175 @@
|
|
1
|
+
{
|
2
|
+
"id": "contact.json#",
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
|
+
"description": "schema for a contacts list, contains definitions for individual and organization",
|
5
|
+
"type": "array",
|
6
|
+
"minItems": 1,
|
7
|
+
"uniqueItems": true,
|
8
|
+
"items": {
|
9
|
+
"anyOf": [
|
10
|
+
{
|
11
|
+
"$ref": "#/definitions/individual"
|
12
|
+
}, {
|
13
|
+
"$ref": "#/definitions/organization"
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"definitions": {
|
18
|
+
"phone": {
|
19
|
+
"type": "object",
|
20
|
+
"required": ["phoneNumber"],
|
21
|
+
"properties": {
|
22
|
+
"phoneName": {
|
23
|
+
"type": "string"
|
24
|
+
},
|
25
|
+
"phoneNumber": {
|
26
|
+
"type": "string",
|
27
|
+
"pattern": "^[0-9+()#. \/ext-]+$"
|
28
|
+
},
|
29
|
+
"service": {
|
30
|
+
"type": "array",
|
31
|
+
"items": {
|
32
|
+
"type": "string"
|
33
|
+
},
|
34
|
+
"uniqueItems": true
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"additionalProperties": false
|
38
|
+
},
|
39
|
+
"address": {
|
40
|
+
"type": "object",
|
41
|
+
"properties": {
|
42
|
+
"deliveryPoint": {
|
43
|
+
"type": "array",
|
44
|
+
"items": {
|
45
|
+
"type": "string"
|
46
|
+
},
|
47
|
+
"uniqueItems": true
|
48
|
+
},
|
49
|
+
"city": {
|
50
|
+
"type": "string"
|
51
|
+
},
|
52
|
+
"administrativeArea": {
|
53
|
+
"type": "string"
|
54
|
+
},
|
55
|
+
"postalCode": {
|
56
|
+
"type": "string"
|
57
|
+
},
|
58
|
+
"country": {
|
59
|
+
"type": "string"
|
60
|
+
},
|
61
|
+
"electronicMailAddress": {
|
62
|
+
"type": "array",
|
63
|
+
"items": {
|
64
|
+
"type": "string",
|
65
|
+
"pattern": "^.+@.+\\..+$"
|
66
|
+
},
|
67
|
+
"uniqueItems": true
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"additionalProperties": false
|
71
|
+
},
|
72
|
+
"individual": {
|
73
|
+
"type": "object",
|
74
|
+
"required": ["contactId", "individualName"],
|
75
|
+
"additionalProperties": true,
|
76
|
+
"properties": {
|
77
|
+
"contactId": {
|
78
|
+
"type": "string"
|
79
|
+
},
|
80
|
+
"individualName": {
|
81
|
+
"type": "string"
|
82
|
+
},
|
83
|
+
"positionName": {
|
84
|
+
"type": "string"
|
85
|
+
},
|
86
|
+
"organizationName": {
|
87
|
+
"type": "string"
|
88
|
+
},
|
89
|
+
"address": {
|
90
|
+
"$ref": "#/definitions/address"
|
91
|
+
},
|
92
|
+
"onlineResource": {
|
93
|
+
"type": "array",
|
94
|
+
"items": {
|
95
|
+
"$ref": "./onlineResource.json#"
|
96
|
+
},
|
97
|
+
"uniqueItems": true
|
98
|
+
},
|
99
|
+
"contactInstructions": {
|
100
|
+
"type": "string"
|
101
|
+
},
|
102
|
+
"phoneBook": {
|
103
|
+
"type": "array",
|
104
|
+
"items": {
|
105
|
+
"$ref": "#/definitions/phone"
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"organization": {
|
111
|
+
"type": "object",
|
112
|
+
"required": ["contactId", "organizationName"],
|
113
|
+
"additionalProperties": true,
|
114
|
+
"properties": {
|
115
|
+
"contactId": {
|
116
|
+
"type": "string"
|
117
|
+
},
|
118
|
+
"positionName": {
|
119
|
+
"type": "string"
|
120
|
+
},
|
121
|
+
"organizationName": {
|
122
|
+
"type": "string"
|
123
|
+
},
|
124
|
+
"address": {
|
125
|
+
"$ref": "#/definitions/address"
|
126
|
+
},
|
127
|
+
"onlineResource": {
|
128
|
+
"type": "array",
|
129
|
+
"items": {
|
130
|
+
"$ref": "./onlineResource.json#"
|
131
|
+
},
|
132
|
+
"uniqueItems": true
|
133
|
+
},
|
134
|
+
"contactInstructions": {
|
135
|
+
"type": "string"
|
136
|
+
},
|
137
|
+
"phoneBook": {
|
138
|
+
"type": "array",
|
139
|
+
"items": {
|
140
|
+
"$ref": "#/definitions/phone"
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"contactRef": {
|
146
|
+
"type": "object",
|
147
|
+
"required": ["contactId", "role"],
|
148
|
+
"properties": {
|
149
|
+
"contactId": {
|
150
|
+
"type": "string"
|
151
|
+
},
|
152
|
+
"role": {
|
153
|
+
"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
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
{
|
2
|
+
"id": "dataQuality.json#",
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
|
+
"description": "schema for dataQuality",
|
5
|
+
"type": "object",
|
6
|
+
"required": ["scope"],
|
7
|
+
"additionalProperties": false,
|
8
|
+
"properties": {
|
9
|
+
"scope": {
|
10
|
+
"type": "string"
|
11
|
+
},
|
12
|
+
"lineage": {
|
13
|
+
"$ref": "#/definitions/lineage"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"definitions": {
|
17
|
+
"lineage": {
|
18
|
+
"type": "object",
|
19
|
+
"additionalProperties": false,
|
20
|
+
"properties": {
|
21
|
+
"statement": {
|
22
|
+
"type": "string"
|
23
|
+
},
|
24
|
+
"processStep": {
|
25
|
+
"type": "array",
|
26
|
+
"items": {
|
27
|
+
"$ref": "#/definitions/processStep"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"source": {
|
31
|
+
"type": "array",
|
32
|
+
"items": {
|
33
|
+
"$ref": "#/definitions/source"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"processStep": {
|
39
|
+
"type": "object",
|
40
|
+
"required": ["description"],
|
41
|
+
"additionalProperties": false,
|
42
|
+
"properties": {
|
43
|
+
"stepId": {
|
44
|
+
"type": "string"
|
45
|
+
},
|
46
|
+
"description": {
|
47
|
+
"type": "string"
|
48
|
+
},
|
49
|
+
"rationale": {
|
50
|
+
"type": "string"
|
51
|
+
},
|
52
|
+
"dateTime": {
|
53
|
+
"$ref": "../schema.json#definitions/date"
|
54
|
+
},
|
55
|
+
"processor": {
|
56
|
+
"type": "array",
|
57
|
+
"items": {
|
58
|
+
"$ref": "contact.json#/definitions/contactRef"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"source": {
|
64
|
+
"type": "object",
|
65
|
+
"additionalProperties": false,
|
66
|
+
"properties": {
|
67
|
+
"description": {
|
68
|
+
"type": "string"
|
69
|
+
},
|
70
|
+
"citation": {
|
71
|
+
"$ref": "./citation.json#"
|
72
|
+
},
|
73
|
+
"processStep": {
|
74
|
+
"type": "array",
|
75
|
+
"items": {
|
76
|
+
"$ref": "#/definitions/processStep"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"id": "distributor.json#",
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
|
+
"description": "schema for a distributor entry",
|
5
|
+
"type": "object",
|
6
|
+
"required": ["distributorContact"],
|
7
|
+
"additionalProperties": false,
|
8
|
+
"properties": {
|
9
|
+
"distributorContact": {
|
10
|
+
"$ref": "contact.json#/definitions/contactRef"
|
11
|
+
},
|
12
|
+
"distributionOrderProcess": {
|
13
|
+
"type": "array",
|
14
|
+
"items": {
|
15
|
+
"type": "object",
|
16
|
+
"additionalProperties": false,
|
17
|
+
|
18
|
+
"properties": {
|
19
|
+
"fees": {
|
20
|
+
"type": "string"
|
21
|
+
},
|
22
|
+
"plannedAvailabilityDateTime": {
|
23
|
+
"$ref": "../schema.json#definitions/date"
|
24
|
+
},
|
25
|
+
"orderingInstructions": {
|
26
|
+
"type": "string"
|
27
|
+
},
|
28
|
+
"turnaround": {
|
29
|
+
"type": "string"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"distributorFormat": {
|
35
|
+
"type": "array",
|
36
|
+
"items": {
|
37
|
+
"$ref": "#/definitions/format"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
"distributorTransferOptions": {
|
41
|
+
"type": "array",
|
42
|
+
"items": {
|
43
|
+
"type": "object",
|
44
|
+
"additionalProperties": false,
|
45
|
+
|
46
|
+
"properties": {
|
47
|
+
"online": {
|
48
|
+
"type": "array",
|
49
|
+
"items": {
|
50
|
+
"$ref": "./onlineResource.json#"
|
51
|
+
},
|
52
|
+
"uniqueItems": true
|
53
|
+
},
|
54
|
+
"offline": {
|
55
|
+
"type": "object",
|
56
|
+
"additionalProperties": false,
|
57
|
+
|
58
|
+
"properties": {
|
59
|
+
"name": {
|
60
|
+
"type": "string"
|
61
|
+
},
|
62
|
+
"mediumFormat": {
|
63
|
+
"type": "string"
|
64
|
+
},
|
65
|
+
"mediumNote": {
|
66
|
+
"type": "string"
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"definitions": {
|
75
|
+
"format": {
|
76
|
+
"type": "object",
|
77
|
+
"required": ["formatName"],
|
78
|
+
"additionalProperties": false,
|
79
|
+
"properties": {
|
80
|
+
"formatName": {
|
81
|
+
"type": "string"
|
82
|
+
},
|
83
|
+
"version": {
|
84
|
+
"type": "string"
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|