adiwg-mdjson_schemas 2.0.0.pre.alpha.1 → 2.0.0.pre.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/examples/address.json +1 -0
  3. data/examples/allocation.json +8 -12
  4. data/examples/computedBbox.json +363 -376
  5. data/examples/legalConstraint.json +14 -21
  6. data/examples/locale.json +11 -14
  7. data/examples/phone.json +5 -9
  8. data/examples/securityConstraint.json +6 -13
  9. data/examples/series.json +5 -9
  10. data/examples/timeInterval.json +4 -8
  11. data/lib/adiwg/mdjson_schemas/version.rb +1 -1
  12. data/schema/additionalDocumentation.json +1 -0
  13. data/schema/associatedResource.json +44 -44
  14. data/schema/attribute.json +2 -3
  15. data/schema/attributeGroup.json +1 -1
  16. data/schema/bbox.json +1 -0
  17. data/schema/citation.json +4 -5
  18. data/schema/common.json +1 -2
  19. data/schema/constraint.json +7 -12
  20. data/schema/contact.json +13 -14
  21. data/schema/coverageDescription.json +1 -3
  22. data/schema/dataDictionary.json +1 -3
  23. data/schema/distribution.json +2 -5
  24. data/schema/distributor.json +1 -2
  25. data/schema/domain.json +2 -1
  26. data/schema/entity.json +8 -8
  27. data/schema/extent.json +1 -1
  28. data/schema/format.json +12 -13
  29. data/schema/funding.json +41 -35
  30. data/schema/geographicExtent.json +5 -10
  31. data/schema/geojson.json +63 -71
  32. data/schema/geometry.json +125 -132
  33. data/schema/georectifiedRepresentation.json +1 -9
  34. data/schema/georeferencableRepresentation.json +41 -45
  35. data/schema/graphic.json +1 -2
  36. data/schema/gridRepresentation.json +1 -1
  37. data/schema/identifier.json +1 -1
  38. data/schema/imageDescription.json +1 -1
  39. data/schema/keyword.json +15 -12
  40. data/schema/lineage.json +3 -9
  41. data/schema/locale.json +2 -2
  42. data/schema/maintInfo.json +14 -17
  43. data/schema/measure.json +5 -8
  44. data/schema/medium.json +1 -0
  45. data/schema/metadata.json +1 -5
  46. data/schema/metadataInfo.json +1 -4
  47. data/schema/onlineResource.json +2 -2
  48. data/schema/orderProcess.json +1 -1
  49. data/schema/releasability.json +4 -6
  50. data/schema/resourceInfo.json +1 -2
  51. data/schema/responsibility.json +1 -3
  52. data/schema/schema.json +2 -4
  53. data/schema/scope.json +1 -5
  54. data/schema/spatialReference.json +3 -5
  55. data/schema/spatialRepresentation.json +5 -6
  56. data/schema/spatialResolution.json +4 -4
  57. data/schema/taxonomy.json +4 -7
  58. data/schema/temporalExtent.json +1 -0
  59. data/schema/timeInstant.json +2 -4
  60. data/schema/timePeriod.json +6 -10
  61. data/schema/transferOption.json +7 -10
  62. data/schema/usage.json +2 -4
  63. data/schema/vectorRepresentation.json +42 -45
  64. data/schema/verticalExtent.json +2 -3
  65. data/test/tc_allocation.rb +8 -0
  66. data/test/tc_geographicExtent.rb +4 -0
  67. data/test/tc_legalConstraint.rb +8 -0
  68. data/test/tc_locale.rb +8 -0
  69. data/test/tc_phone.rb +8 -0
  70. data/test/tc_securityConstraint.rb +8 -0
  71. data/test/tc_series.rb +8 -0
  72. data/test/tc_timePeriod.rb +4 -0
  73. metadata +14 -6
  74. data/examples/gmlIdentifier.json +0 -8
  75. data/examples/keywordObject.json +0 -12
  76. data/examples/schema.json +0 -8
  77. data/examples/scopeDescription.json +0 -8
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "id": "timeInstant.json#",
4
4
  "type": "object",
5
- "example": "",
5
+ "example": "../examples/timeInstant.json",
6
6
  "required": ["dateTime"],
7
7
  "additionalProperties": true,
8
8
  "properties": {
@@ -15,8 +15,7 @@
15
15
  },
16
16
  "identifier": {
17
17
  "$ref": "./identifier.json#",
18
- "description": "Identifier assigned to the timeInstant.",
19
- "example": ""
18
+ "description": "Identifier assigned to the timeInstant."
20
19
  },
21
20
  "description": {
22
21
  "type": "string",
@@ -29,7 +28,6 @@
29
28
  "type": "array",
30
29
  "title": "",
31
30
  "description": "Name of the timeInstant",
32
- "example": "",
33
31
  "translation": {},
34
32
  "items": {
35
33
  "type": "string"
@@ -3,7 +3,7 @@
3
3
  "id": "timePeriod.json#",
4
4
  "type": "object",
5
5
  "description": "A span of time represented by a starting date-time and an ending date-time.",
6
- "example": "",
6
+ "example": "../examples/timePeriod.json",
7
7
  "minProperties": 1,
8
8
  "additionalProperties": true,
9
9
 
@@ -22,15 +22,13 @@
22
22
  "ISO 19115-2": ["EX_TemporalExtent > extent > TimePeriod > description "]
23
23
  }
24
24
  },
25
- "identifier":{
26
- "$ref" : "./identifier.json#",
27
- "description" : "Identifier for the timePeriod.",
28
- "example": ""
25
+ "identifier": {
26
+ "$ref": "./identifier.json#",
27
+ "description": "Identifier for the timePeriod."
29
28
  },
30
29
  "periodName": {
31
30
  "type": "array",
32
31
  "description": "Names associated with the time period.",
33
- "example": "",
34
32
  "translation": {},
35
33
  "minItems": 1,
36
34
  "items": {
@@ -71,7 +69,7 @@
71
69
  "duration": {
72
70
  "type": "object",
73
71
  "description": "Object for collecting information about a duration or period of time.",
74
- "example": "",
72
+ "example": "../examples/duration.json",
75
73
  "translation": {},
76
74
  "minProperties": 1,
77
75
  "additionalProperties": true,
@@ -102,7 +100,7 @@
102
100
  "timeInterval": {
103
101
  "type": "object",
104
102
  "description": "Defines a length of time in sepcific units.",
105
- "example": "",
103
+ "example": "../examples/timeInterval.json",
106
104
  "translation": {},
107
105
  "required": ["interval", "units"],
108
106
  "additionalProperties": true,
@@ -110,13 +108,11 @@
110
108
  "interval": {
111
109
  "type": "number",
112
110
  "description": "The amount of time.",
113
- "example": "",
114
111
  "translation": {}
115
112
  },
116
113
  "units": {
117
114
  "type": "string",
118
115
  "description": "The unit of time for the interval.",
119
- "example": "",
120
116
  "translation": {},
121
117
  "minLength": 1
122
118
  }
@@ -8,7 +8,7 @@
8
8
  "ISO 19115-2": ["MD_Distributor > distributorTransferOptions > MD_DigitalTransferOptions"],
9
9
  "FGDC CSDGM": ["distinfo > stdorder > digform > digtopt"]
10
10
  },
11
- "example": "",
11
+ "example": "../examples/transferOption.json",
12
12
  "required": [],
13
13
  "additionalProperties": true,
14
14
  "properties": {
@@ -22,7 +22,6 @@
22
22
  },
23
23
  "onlineOption": {
24
24
  "type": "array",
25
- "example": "",
26
25
  "description": "Information about obtaining the resource on-line.",
27
26
  "translation": {
28
27
  "ISO 19115-2": ["MD_DigitalTransferOptions > online > CI_OnlineResource"],
@@ -35,7 +34,6 @@
35
34
  },
36
35
  "offlineOption": {
37
36
  "type": "array",
38
- "example": "",
39
37
  "description": "Information about obtaining the resource through off-line procedure.",
40
38
  "translation": {
41
39
  "ISO 19115-2": ["MD_DigitalTransferOptions > offline > MD_Medium"],
@@ -47,13 +45,12 @@
47
45
  }
48
46
  },
49
47
  "transferFrequency": {
50
- "type" : "array",
51
- "description" : "The rate of occurrence of distribution.",
52
- "example": "",
53
- "translation": {},
54
- "items" : {
55
- "$ref": "./timePeriod.json#/definitions/duration"
56
- }
48
+ "type": "array",
49
+ "description": "The rate of occurrence of distribution.",
50
+ "translation": {},
51
+ "items": {
52
+ "$ref": "./timePeriod.json#/definitions/duration"
53
+ }
57
54
  },
58
55
  "distributionFormat": {
59
56
  "type": "array",
data/schema/usage.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "$schema": "http://json-schema.org/draft-04/schema#",
4
4
  "type": "object",
5
5
  "description": "Description of ways in which the resource is currently or has been used.",
6
- "example": "",
6
+ "example": "../examples/usage.json",
7
7
  "translation": {
8
8
  "ISO 19115-2": ["MD_Usage"]
9
9
  },
@@ -42,13 +42,11 @@
42
42
  },
43
43
  "documentedIssue": {
44
44
  "$ref": "./citation.json#",
45
- "description": "Citation of a description of known issues associated with the resource along with proposed solutions if available.",
46
- "example": ""
45
+ "description": "Citation of a description of known issues associated with the resource along with proposed solutions if available."
47
46
  },
48
47
  "additionalDocumentation": {
49
48
  "type": "array",
50
49
  "description": "Publications that describe usage of data.",
51
- "example": "",
52
50
  "translation": {},
53
51
  "items": {
54
52
  "$ref": "./citation.json#"
@@ -1,51 +1,48 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "id" : "vectorRepresentation.json#",
4
- "type" : "object",
5
- "description" : "Information about the vector spatial objects in the resource",
6
- "minProperties" : 1,
7
- "additionalProperties" : true,
8
- "properties" : {
9
- "topologyLevel": {
10
- "type" : "string",
11
- "description" : "Identifies the degree of complexity of the spatial relationships",
12
- "example": "",
13
- "translation": {},
14
- "minLength" : 1
15
- },
16
- "vectorObject": {
17
- "type" : "array",
18
- "description" : "Information about the geometric objects used in the resource",
19
- "example": "",
20
- "translation": {},
21
- "items" : {
22
- "$ref": "#/definitions/vectorObject"
23
- }
24
- }
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "vectorRepresentation.json#",
4
+ "type": "object",
5
+ "description": "Information about the vector spatial objects in the resource",
6
+ "example": "../examples/vectorRepresentation.json",
7
+ "minProperties": 1,
8
+ "additionalProperties": true,
9
+ "properties": {
10
+ "topologyLevel": {
11
+ "type": "string",
12
+ "description": "Identifies the degree of complexity of the spatial relationships",
13
+ "translation": {},
14
+ "minLength": 1
25
15
  },
26
- "definitions" : {
27
- "vectorObject": {
28
- "type" : "object",
29
- "description" : "Information about the geometric objects used in the resource.",
30
- "example": "",
16
+ "vectorObject": {
17
+ "type": "array",
18
+ "description": "Information about the geometric objects used in the resource",
19
+ "translation": {},
20
+ "items": {
21
+ "$ref": "#/definitions/vectorObject"
22
+ }
23
+ }
24
+ },
25
+ "definitions": {
26
+ "vectorObject": {
27
+ "type": "object",
28
+ "description": "Information about the geometric objects used in the resource.",
29
+ "example": "../examples/vectorObject.json",
30
+ "translation": {},
31
+ "required": ["objectType"],
32
+ "additionalProperties": true,
33
+ "properties": {
34
+ "objectType": {
35
+ "type": "string",
36
+ "description": "Name of point or vector objects used to locate zero-, one-, two-, or three-dimensional spatial locations in the resource.",
31
37
  "translation": {},
32
- "required" : ["objectType"],
33
- "additionalProperties" : true,
34
- "properties" : {
35
- "objectType": {
36
- "type" : "string",
37
- "description" : "Name of point or vector objects used to locate zero-, one-, two-, or three-dimensional spatial locations in the resource.",
38
- "example": "",
39
- "translation": {},
40
- "minLength" : 1
41
- },
42
- "objectCount": {
43
- "type" : "integer",
44
- "description" : "The total number of point or vector objects occurring in the dataset.",
45
- "example": "",
46
- "translation": {}
47
- }
48
- }
38
+ "minLength": 1
39
+ },
40
+ "objectCount": {
41
+ "type": "integer",
42
+ "description": "The total number of point or vector objects occurring in the dataset.",
43
+ "translation": {}
44
+ }
49
45
  }
50
46
  }
47
+ }
51
48
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "id": "verticalExtent.json#",
4
-
5
4
  "type": "object",
6
5
  "description": "Vertical element of an extent.",
6
+ "example": "../examples/verticalExtent.json",
7
7
  "translation": {
8
8
  "ISO 19115-2": ["EX_Extent > verticalElement > EX_VerticalExtent "]
9
9
  },
@@ -30,8 +30,7 @@
30
30
  },
31
31
  "crsId": {
32
32
  "$ref": "./spatialReference.json#",
33
- "description": "Identifies the vertical coordinate reference system used for the minimum and maximum values.",
34
- "example": ""
33
+ "description": "Identifies the vertical coordinate reference system used for the minimum and maximum values."
35
34
  }
36
35
  }
37
36
  }
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class Testallocation < TestHelper
4
+ def test_allocation
5
+ errors = JSON::Validator.fully_validate('funding.json', @@example + 'allocation.json',fragment: '#/definitions/allocation' , strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
@@ -5,4 +5,8 @@ class TestGeographicExtent < TestHelper
5
5
  errors = JSON::Validator.fully_validate('geographicExtent.json', @@example + 'geographicExtent.json', strict: @@strict, list: true)
6
6
  assert(errors.empty?, errors.join("\n"))
7
7
  end
8
+ def test_computedBbox
9
+ errors = JSON::Validator.fully_validate('geographicExtent.json', @@example + 'computedBbox.json', strict: @@strict, list: true)
10
+ assert(errors.empty?, errors.join("\n"))
11
+ end
8
12
  end
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class TestLegalConstraint < TestHelper
4
+ def test_legalConstraint
5
+ errors = JSON::Validator.fully_validate('constraint.json', @@example + 'legalConstraint.json', fragment: '#/definitions/legalConstraint', strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
data/test/tc_locale.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class TestLocale < TestHelper
4
+ def test_locale
5
+ errors = JSON::Validator.fully_validate('locale.json', @@example + 'locale.json', strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
data/test/tc_phone.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class Testphone < TestHelper
4
+ def test_phone
5
+ errors = JSON::Validator.fully_validate('contact.json', @@example + 'phone.json', fragment: '#/definitions/phone', strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class TestSecurityConstraint < TestHelper
4
+ def test_securityConstraint
5
+ errors = JSON::Validator.fully_validate('constraint.json', @@example + 'securityConstraint.json', fragment: '#/definitions/securityConstraint', strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
data/test/tc_series.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'helper.rb'
2
+
3
+ class TestSeries < TestHelper
4
+ def TestSeries
5
+ errors = JSON::Validator.fully_validate('citation.json', @@example + 'series.json', fragment: '#/definitions/series', strict: @@strict, list: true)
6
+ assert(errors.empty?, errors.join("\n"))
7
+ end
8
+ end
@@ -5,4 +5,8 @@ class TestTimePeriod < TestHelper
5
5
  errors = JSON::Validator.fully_validate('timePeriod.json', @@example + 'timePeriod.json', strict: @@strict, list: true)
6
6
  assert(errors.empty?, errors.join("\n"))
7
7
  end
8
+ def test_timeInterval
9
+ errors = JSON::Validator.fully_validate('timePeriod.json', @@example + 'timeInterval.json', fragment: '#/definitions/timeInterval', strict: @@strict, list: true)
10
+ assert(errors.empty?, errors.join("\n"))
11
+ end
8
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adiwg-mdjson_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.1
4
+ version: 2.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Bradley, Stan Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,13 +119,11 @@ files:
119
119
  - examples/geometryObject.json
120
120
  - examples/georectifiedRepresentation.json
121
121
  - examples/georeferencableRepresentation.json
122
- - examples/gmlIdentifier.json
123
122
  - examples/graphic.json
124
123
  - examples/gridRepresentation.json
125
124
  - examples/identifier.json
126
125
  - examples/imageDescription.json
127
126
  - examples/keyword.json
128
- - examples/keywordObject.json
129
127
  - examples/legalConstraint.json
130
128
  - examples/lineage.json
131
129
  - examples/locale.json
@@ -143,9 +141,7 @@ files:
143
141
  - examples/releasability.json
144
142
  - examples/resourceInfo.json
145
143
  - examples/responsibleParty.json
146
- - examples/schema.json
147
144
  - examples/scope.json
148
- - examples/scopeDescription.json
149
145
  - examples/securityConstraint.json
150
146
  - examples/series.json
151
147
  - examples/source.json
@@ -229,6 +225,7 @@ files:
229
225
  - test/helper.rb
230
226
  - test/tc_additionalDocumentation.rb
231
227
  - test/tc_address.rb
228
+ - test/tc_allocation.rb
232
229
  - test/tc_associatedResource.rb
233
230
  - test/tc_attribute.rb
234
231
  - test/tc_attributeGroup.rb
@@ -263,7 +260,9 @@ files:
263
260
  - test/tc_imageDescription.rb
264
261
  - test/tc_jsonschema.rb
265
262
  - test/tc_keyword.rb
263
+ - test/tc_legalConstraint.rb
266
264
  - test/tc_lineage.rb
265
+ - test/tc_locale.rb
267
266
  - test/tc_maintInfo.rb
268
267
  - test/tc_measure.rb
269
268
  - test/tc_medium.rb
@@ -272,12 +271,15 @@ files:
272
271
  - test/tc_onlineResource.rb
273
272
  - test/tc_orderProcess.rb
274
273
  - test/tc_party.rb
274
+ - test/tc_phone.rb
275
275
  - test/tc_processStep.rb
276
276
  - test/tc_releasability.rb
277
277
  - test/tc_resourceInfo.rb
278
278
  - test/tc_responsibility.rb
279
279
  - test/tc_schema.rb
280
280
  - test/tc_scope.rb
281
+ - test/tc_securityConstraint.rb
282
+ - test/tc_series.rb
281
283
  - test/tc_source.rb
282
284
  - test/tc_spatialReference.rb
283
285
  - test/tc_spatialRepresentation.rb
@@ -324,6 +326,7 @@ test_files:
324
326
  - test/helper.rb
325
327
  - test/tc_additionalDocumentation.rb
326
328
  - test/tc_address.rb
329
+ - test/tc_allocation.rb
327
330
  - test/tc_associatedResource.rb
328
331
  - test/tc_attribute.rb
329
332
  - test/tc_attributeGroup.rb
@@ -358,7 +361,9 @@ test_files:
358
361
  - test/tc_imageDescription.rb
359
362
  - test/tc_jsonschema.rb
360
363
  - test/tc_keyword.rb
364
+ - test/tc_legalConstraint.rb
361
365
  - test/tc_lineage.rb
366
+ - test/tc_locale.rb
362
367
  - test/tc_maintInfo.rb
363
368
  - test/tc_measure.rb
364
369
  - test/tc_medium.rb
@@ -367,12 +372,15 @@ test_files:
367
372
  - test/tc_onlineResource.rb
368
373
  - test/tc_orderProcess.rb
369
374
  - test/tc_party.rb
375
+ - test/tc_phone.rb
370
376
  - test/tc_processStep.rb
371
377
  - test/tc_releasability.rb
372
378
  - test/tc_resourceInfo.rb
373
379
  - test/tc_responsibility.rb
374
380
  - test/tc_schema.rb
375
381
  - test/tc_scope.rb
382
+ - test/tc_securityConstraint.rb
383
+ - test/tc_series.rb
376
384
  - test/tc_source.rb
377
385
  - test/tc_spatialReference.rb
378
386
  - test/tc_spatialRepresentation.rb
@@ -1,8 +0,0 @@
1
- {
2
- "gmlIdentifier": [
3
- {
4
- "identifier": "identifier",
5
- "namespace": "namespace"
6
- }
7
- ]
8
- }
@@ -1,12 +0,0 @@
1
- {
2
- "keywordObject": [
3
- {
4
- "keyword": "keyword0",
5
- "keywordId": "keywordId0"
6
- },
7
- {
8
- "keyword": "keyword1",
9
- "keywordId": "keywordId1"
10
- }
11
- ]
12
- }
data/examples/schema.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "schema": [
3
- {
4
- "name": "name",
5
- "version": "version"
6
- }
7
- ]
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "scopeDescription": [
3
- {
4
- "type": "dataset",
5
- "description": "description"
6
- }
7
- ]
8
- }