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.
@@ -76,6 +76,7 @@
76
76
  ],
77
77
  "definitions": {
78
78
  "position": {
79
+ "title": "position",
79
80
  "description": "A single position",
80
81
  "type": "array",
81
82
  "minItems": 2,
@@ -86,6 +87,7 @@
86
87
  "additionalItems": false
87
88
  },
88
89
  "positionArray": {
90
+ "title": "positionArray",
89
91
  "description": "An array of positions",
90
92
  "type": "array",
91
93
  "items": {
@@ -93,11 +95,13 @@
93
95
  }
94
96
  },
95
97
  "lineString": {
98
+ "title": "lineString",
96
99
  "description": "An array of two or more positions",
97
100
  "allOf": [
98
101
  {
99
102
  "$ref": "#/definitions/positionArray"
100
103
  }, {
104
+ "title": "minimum 2",
101
105
  "minItems": 2
102
106
  }
103
107
  ]
@@ -108,6 +112,7 @@
108
112
  {
109
113
  "$ref": "#/definitions/positionArray"
110
114
  }, {
115
+ "title": "minimum 4",
111
116
  "minItems": 4
112
117
  }
113
118
  ]
@@ -16,7 +16,7 @@
16
16
  "type": "string"
17
17
  },
18
18
  "fileLink": {
19
- "$ref": "../schema.json#definitions/url"
19
+ "$ref": "../schema.json#/definitions/url"
20
20
  }
21
21
  }
22
22
  }
@@ -26,10 +26,10 @@
26
26
  "additionalProperties": false,
27
27
  "properties": {
28
28
  "thesaurusLink": {
29
- "$ref": "../schema.json#definitions/url"
29
+ "$ref": "../schema.json#/definitions/url"
30
30
  },
31
31
  "citation": {
32
- "$ref": "citation.json#definitions/citationBase"
32
+ "$ref": "citation.json#/definitions/citationBase"
33
33
  }
34
34
  }
35
35
  }
@@ -34,13 +34,13 @@
34
34
  "type": "string"
35
35
  },
36
36
  "metadataCreationDate": {
37
- "$ref": "../schema.json#definitions/date"
37
+ "$ref": "../schema.json#/definitions/date"
38
38
  },
39
39
  "metadataLastUpdate": {
40
- "$ref": "../schema.json#definitions/date"
40
+ "$ref": "../schema.json#/definitions/date"
41
41
  },
42
42
  "metadataUri": {
43
- "$ref": "../schema.json#definitions/uri"
43
+ "$ref": "../schema.json#/definitions/uri"
44
44
  },
45
45
  "metadataStatus": {
46
46
  "type": "string"
@@ -61,18 +61,31 @@
61
61
  }
62
62
  },
63
63
  "associatedResource": {
64
- "additionalProperties": false,
65
64
  "type": "array",
66
65
  "minItems": 1,
67
66
  "items": {
68
- "associationType": {
69
- "type": "string"
70
- },
71
- "resourceType": {
72
- "type": "string"
73
- },
74
- "resourceCitation": {
75
- "$ref": "./citation.json#"
67
+ "type": "object",
68
+ "required": ["associationType", "resourceType"],
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "associationType": {
72
+ "type": "string"
73
+ },
74
+ "resourceType": {
75
+ "type": "string"
76
+ },
77
+ "resourceCitation": {
78
+ "$ref": "./citation.json#"
79
+ },
80
+ "metadataCitation": {
81
+ "$ref": "./citation.json#"
82
+ },
83
+ "resourceIdentifier": {
84
+ "type": "array",
85
+ "items": {
86
+ "$ref": "./citation.json#/definitions/resourceIdentifier"
87
+ }
88
+ }
76
89
  }
77
90
  }
78
91
  },
@@ -7,7 +7,7 @@
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "uri": {
10
- "$ref": "../schema.json#definitions/uri"
10
+ "$ref": "../schema.json#/definitions/uri"
11
11
  },
12
12
  "name": {
13
13
  "type": "string"
@@ -9,6 +9,12 @@
9
9
  "citation": {
10
10
  "$ref": "./citation.json#"
11
11
  },
12
+ "resourceIdentifier": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "./citation.json#/definitions/resourceIdentifier"
16
+ }
17
+ },
12
18
  "pointOfContact": {
13
19
  "type": "array",
14
20
  "minItems": 1,
@@ -26,6 +32,9 @@
26
32
  "status": {
27
33
  "type": "string"
28
34
  },
35
+ "resourceUri": {
36
+ "$ref": "../schema.json#/definitions/uri"
37
+ },
29
38
  "hasMapLocation": {
30
39
  "type": "boolean"
31
40
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": {
3
3
  "name": "adiwgJSON",
4
- "version": "0.3.0"
4
+ "version": "0.5.0"
5
5
  },
6
6
  "contact": [
7
7
  {
@@ -51,6 +51,7 @@
51
51
  "metadataCreationDate": "0000-00-00",
52
52
  "metadataLastUpdate": "0000-00-00",
53
53
  "metadataUri": "http://thisisanexample.com",
54
+ "metadataCharacterSet": "",
54
55
  "metadataStatus": "",
55
56
  "metadataMaintenance": {
56
57
  "maintenanceFrequency": "",
@@ -76,13 +77,7 @@
76
77
  "responsibleParty": [
77
78
  {
78
79
  "contactId": "",
79
- "role": "",
80
- "resourceIdentifier": [
81
- {
82
- "identifierName": "",
83
- "identifier": ""
84
- }
85
- ]
80
+ "role": ""
86
81
  }
87
82
  ],
88
83
  "presentationForm": [""],
@@ -102,6 +97,34 @@
102
97
  }
103
98
  ]
104
99
  },
100
+ "resourceIdentifier": [
101
+ {
102
+ "title": "",
103
+ "date": [
104
+ {
105
+ "date": "0000-00-00",
106
+ "dateType": ""
107
+ }
108
+ ],
109
+ "responsibleParty": [
110
+ {
111
+ "contactId": "",
112
+ "role": ""
113
+ }
114
+ ],
115
+ "onlineResource": [
116
+ {
117
+ "uri": "http://thisisanexample.com",
118
+ "protocol": "",
119
+ "name": "",
120
+ "description": "",
121
+ "function": "",
122
+ "doi": ""
123
+ }
124
+ ],
125
+ "identifier": ""
126
+ }
127
+ ],
105
128
  "pointOfContact": [
106
129
  {
107
130
  "contactId": "",
@@ -337,14 +360,30 @@
337
360
  ],
338
361
  "assignedId": [
339
362
  {
340
- "contactId": "",
341
- "role": "",
342
- "resourceIdentifier": [
363
+ "title": "",
364
+ "date": [
343
365
  {
344
- "identifierName": "",
345
- "identifier": ""
366
+ "date": "0000-00-00",
367
+ "dateType": ""
346
368
  }
347
- ]
369
+ ],
370
+ "responsibleParty": [
371
+ {
372
+ "contactId": "",
373
+ "role": ""
374
+ }
375
+ ],
376
+ "onlineResource": [
377
+ {
378
+ "uri": "http://thisisanexample.com",
379
+ "protocol": "",
380
+ "name": "",
381
+ "description": "",
382
+ "function": "",
383
+ "doi": ""
384
+ }
385
+ ],
386
+ "identifier": ""
348
387
  }
349
388
  ],
350
389
  "featureScope": "",
@@ -519,13 +558,67 @@
519
558
  "responsibleParty": [
520
559
  {
521
560
  "contactId": "",
522
- "role": "",
523
- "resourceCode": [
524
- {
525
- "codeName": "",
526
- "code": ""
527
- }
528
- ]
561
+ "role": ""
562
+ }
563
+ ],
564
+ "presentationForm": [""],
565
+ "additionalIdentifier": {
566
+ "doi": "",
567
+ "isbn": "",
568
+ "issn": ""
569
+ },
570
+ "onlineResource": [
571
+ {
572
+ "uri": "http://thisisanexample.com",
573
+ "protocol": "",
574
+ "name": "",
575
+ "description": "",
576
+ "function": "",
577
+ "doi": ""
578
+ }
579
+ ]
580
+ },
581
+ "resourceIdentifier": [
582
+ {
583
+ "title": "",
584
+ "date": [
585
+ {
586
+ "date": "0000-00-00",
587
+ "dateType": ""
588
+ }
589
+ ],
590
+ "responsibleParty": [
591
+ {
592
+ "contactId": "",
593
+ "role": ""
594
+ }
595
+ ],
596
+ "onlineResource": [
597
+ {
598
+ "uri": "http://thisisanexample.com",
599
+ "protocol": "",
600
+ "name": "",
601
+ "description": "",
602
+ "function": "",
603
+ "doi": ""
604
+ }
605
+ ],
606
+ "identifier": ""
607
+ }
608
+ ],
609
+ "metadataCitation": {
610
+ "title": "",
611
+ "date": [
612
+ {
613
+ "date": "0000-00-00",
614
+ "dateType": ""
615
+ }
616
+ ],
617
+ "edition": "",
618
+ "responsibleParty": [
619
+ {
620
+ "contactId": "",
621
+ "role": ""
529
622
  }
530
623
  ],
531
624
  "presentationForm": [""],
data/test/tc_schemas.rb CHANGED
@@ -15,18 +15,13 @@ class TestExamples < Test::Unit::TestCase
15
15
  @@ex = ADIWG::JsonSchemas::Utils.examples_dir
16
16
  @@schema = ADIWG::JsonSchemas::Utils.schema_path
17
17
 
18
- =begin def test_example
19
- errors = JSON::Validator.fully_validate(@@schema, @@data)
18
+ def test_data_template
19
+ errors = JSON::Validator.fully_validate(@@schema, @@dir + '../templates/adiwg_metadata_template.json', :strict => false)
20
20
  assert(errors.empty?, errors.join("/n"))
21
21
  end
22
22
 
23
- def test_full
24
- errors = JSON::Validator.fully_validate(@@schema, @@ex + 'full_example.json')
25
- assert(errors.empty?, errors.join("/n"))
26
- end
27
- =end
28
- def test_data_template
29
- errors = JSON::Validator.fully_validate(@@schema, @@dir + '../templates/adiwg_metadata_template.json')
23
+ def test_full_example
24
+ errors = JSON::Validator.fully_validate(@@schema , @@ex + 'full_example.json')
30
25
  assert(errors.empty?, errors.join("/n"))
31
26
  end
32
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adiwg-json_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
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: 2014-05-07 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,8 +52,22 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: JSON schemas for validating according to the the ADIwg project and data
56
- metadata standard. The schemas comply JSON Schema draft version 4.
70
+ metadata standard. The schemas comply with JSON Schema draft version 4.
57
71
  email:
58
72
  - jbradley@arcticlcc.org
59
73
  executables: []