adiwg-mdjson_schemas 1.1.3 → 2.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/README.md +14 -3
  4. data/adiwg-json_schemas.gemspec +2 -2
  5. data/bower.json +0 -1
  6. data/examples/additionalDocumentation.json +9 -60
  7. data/examples/address.json +14 -10
  8. data/examples/allocation.json +12 -0
  9. data/examples/associatedResource.json +10 -118
  10. data/examples/attribute.json +27 -0
  11. data/examples/attributeGroup.json +17 -0
  12. data/examples/boundingBox.json +6 -0
  13. data/examples/citation.json +69 -127
  14. data/examples/computedBbox.json +399 -0
  15. data/examples/constraint.json +62 -0
  16. data/examples/contact.json +40 -207
  17. data/examples/coverageDescription.json +21 -0
  18. data/examples/date.json +8 -19
  19. data/examples/dictionary.json +58 -0
  20. data/examples/dimension.json +11 -0
  21. data/examples/distribution.json +26 -0
  22. data/examples/distributor.json +22 -142
  23. data/examples/domain.json +29 -0
  24. data/examples/domainItem.json +11 -0
  25. data/examples/duration.json +17 -0
  26. data/examples/entity.json +48 -0
  27. data/examples/entityAttribute.json +31 -0
  28. data/examples/entityForeignKey.json +17 -0
  29. data/examples/entityIndex.json +8 -0
  30. data/examples/extent.json +60 -0
  31. data/examples/featureCollection.json +58 -0
  32. data/examples/featureProperties.json +16 -0
  33. data/examples/format.json +7 -14
  34. data/examples/funding.json +33 -0
  35. data/examples/geoJson.json +185 -0
  36. data/examples/geographicExtent.json +22 -0
  37. data/examples/geometryCollection.json +14 -0
  38. data/examples/geometryFeature.json +12 -0
  39. data/examples/geometryObject.json +90 -0
  40. data/examples/georectifiedRepresentation.json +28 -0
  41. data/examples/georeferencableRepresentation.json +25 -0
  42. data/examples/gmlIdentifier.json +8 -0
  43. data/examples/graphic.json +33 -0
  44. data/examples/gridRepresentation.json +14 -0
  45. data/examples/identifier.json +9 -0
  46. data/examples/imageDescription.json +15 -0
  47. data/examples/keyword.json +14 -0
  48. data/examples/keywordObject.json +12 -0
  49. data/examples/legalConstraint.json +21 -0
  50. data/examples/lineage.json +21 -0
  51. data/examples/locale.json +12 -3
  52. data/examples/maintenance.json +38 -0
  53. data/examples/mdJson.json +99 -0
  54. data/examples/measure.json +5 -0
  55. data/examples/medium.json +16 -0
  56. data/examples/metadata.json +102 -0
  57. data/examples/metadataInfo.json +68 -101
  58. data/examples/onlineResource.json +13 -17
  59. data/examples/orderProcess.json +6 -0
  60. data/examples/party.json +21 -0
  61. data/examples/phone.json +9 -0
  62. data/examples/processStep.json +34 -0
  63. data/examples/releasability.json +28 -0
  64. data/examples/resourceInfo.json +230 -1256
  65. data/examples/responsibleParty.json +31 -0
  66. data/examples/schema.json +8 -0
  67. data/examples/scope.json +33 -0
  68. data/examples/scopeDescription.json +8 -0
  69. data/examples/securityConstraint.json +13 -0
  70. data/examples/series.json +9 -0
  71. data/examples/source.json +23 -0
  72. data/examples/spatialReference.json +34 -0
  73. data/examples/spatialRepresentation.json +59 -0
  74. data/examples/spatialResolution.json +11 -0
  75. data/examples/taxonomicClassification.json +59 -0
  76. data/examples/taxonomicSystem.json +13 -0
  77. data/examples/taxonomy.json +79 -188
  78. data/examples/temporalExtent.json +11 -0
  79. data/examples/timeInstant.json +13 -0
  80. data/examples/timeInterval.json +8 -0
  81. data/examples/timePeriod.json +26 -0
  82. data/examples/transferOption.json +36 -0
  83. data/examples/usage.json +48 -33
  84. data/examples/vectorObject.json +4 -0
  85. data/examples/vectorRepresentation.json +10 -0
  86. data/examples/verticalExtent.json +10 -17
  87. data/examples/voucher.json +12 -0
  88. data/lib/adiwg/mdjson_schemas/utils.rb +45 -15
  89. data/lib/adiwg/mdjson_schemas/validator.rb +6 -7
  90. data/lib/adiwg/mdjson_schemas/version.rb +1 -1
  91. data/lib/adiwg/mdjson_schemas.rb +4 -2
  92. data/schema/additionalDocumentation.json +29 -0
  93. data/schema/associatedResource.json +49 -0
  94. data/schema/attribute.json +157 -0
  95. data/schema/attributeGroup.json +29 -0
  96. data/schema/{schema/geojson/bbox.json → bbox.json} +2 -2
  97. data/schema/{schema/citation.json → citation.json} +73 -99
  98. data/schema/common.json +49 -0
  99. data/schema/{schema/resourceConstraint.json → constraint.json} +83 -13
  100. data/schema/contact.json +234 -0
  101. data/schema/coverageDescription.json +50 -0
  102. data/schema/dataDictionary.json +71 -0
  103. data/schema/distribution.json +35 -0
  104. data/schema/distributor.json +46 -0
  105. data/schema/domain.json +65 -0
  106. data/schema/entity.json +235 -0
  107. data/schema/extent.json +59 -0
  108. data/schema/format.json +37 -0
  109. data/schema/funding.json +67 -0
  110. data/schema/geographicExtent.json +87 -0
  111. data/schema/{schema/geojson/geojson.json → geojson.json} +16 -44
  112. data/schema/{schema/geojson/geometry.json → geometry.json} +2 -1
  113. data/schema/georectifiedRepresentation.json +89 -0
  114. data/schema/georeferencableRepresentation.json +49 -0
  115. data/schema/{schema/graphicOverview.json → graphic.json} +19 -6
  116. data/schema/{schema/gridInfo.json → gridRepresentation.json} +7 -13
  117. data/schema/identifier.json +47 -0
  118. data/schema/imageDescription.json +92 -0
  119. data/schema/{schema/keyword.json → keyword.json} +18 -4
  120. data/schema/{schema/dataQuality.json → lineage.json} +92 -57
  121. data/schema/{schema/maintInfo.json → maintInfo.json} +24 -6
  122. data/schema/measure.json +31 -0
  123. data/schema/medium.json +55 -0
  124. data/schema/metadata.json +77 -0
  125. data/schema/metadataInfo.json +112 -0
  126. data/schema/{schema/onlineResource.json → onlineResource.json} +1 -1
  127. data/schema/orderProcess.json +45 -0
  128. data/schema/releasability.json +42 -0
  129. data/schema/{schema/resourceInfo.json → resourceInfo.json} +112 -189
  130. data/schema/responsibility.json +56 -0
  131. data/schema/schema.json +16 -31
  132. data/schema/scope.json +55 -0
  133. data/schema/spatialReference.json +26 -0
  134. data/schema/spatialRepresentation.json +83 -0
  135. data/schema/spatialResolution.json +54 -0
  136. data/schema/taxonomy.json +178 -0
  137. data/schema/temporalExtent.json +42 -0
  138. data/schema/timeInstant.json +46 -0
  139. data/schema/timePeriod.json +126 -0
  140. data/schema/transferOption.json +61 -0
  141. data/schema/{schema/usage.json → usage.json} +34 -4
  142. data/schema/vectorRepresentation.json +51 -0
  143. data/schema/verticalExtent.json +37 -0
  144. data/test/helper.rb +32 -0
  145. data/test/tc_additionalDocumentation.rb +8 -0
  146. data/test/tc_address.rb +8 -0
  147. data/test/tc_associatedResource.rb +8 -0
  148. data/test/tc_attribute.rb +8 -0
  149. data/test/tc_attributeGroup.rb +8 -0
  150. data/test/tc_boundingBox.rb +8 -0
  151. data/test/tc_citation.rb +8 -0
  152. data/test/tc_constraint.rb +8 -0
  153. data/test/tc_contact.rb +8 -0
  154. data/test/tc_coverageDescription.rb +8 -0
  155. data/test/tc_dataDictionary.rb +8 -0
  156. data/test/tc_dimension.rb +8 -0
  157. data/test/tc_distribution.rb +8 -0
  158. data/test/tc_distributor.rb +8 -0
  159. data/test/tc_domain.rb +8 -0
  160. data/test/tc_domainItem.rb +8 -0
  161. data/test/tc_duration.rb +8 -0
  162. data/test/tc_entity.rb +20 -0
  163. data/test/tc_extent.rb +8 -0
  164. data/test/tc_featureCollection.rb +8 -0
  165. data/test/tc_featureProperties.rb +8 -0
  166. data/test/tc_format.rb +8 -0
  167. data/test/tc_funding.rb +8 -0
  168. data/test/tc_geographicElement.rb +12 -0
  169. data/test/tc_geographicExtent.rb +8 -0
  170. data/test/tc_geometryCollection.rb +8 -0
  171. data/test/tc_geometryFeature.rb +8 -0
  172. data/test/tc_geometryObject.rb +8 -0
  173. data/test/tc_georectifiedRepresentation.rb +8 -0
  174. data/test/tc_georeferencableRepresentation.rb +8 -0
  175. data/test/tc_graphic.rb +8 -0
  176. data/test/tc_gridRepresentation.rb +8 -0
  177. data/test/tc_identifier.rb +8 -0
  178. data/test/tc_imageDescription.rb +8 -0
  179. data/test/tc_jsonschema.rb +16 -0
  180. data/test/tc_keyword.rb +8 -0
  181. data/test/tc_lineage.rb +8 -0
  182. data/test/tc_maintInfo.rb +8 -0
  183. data/test/tc_measure.rb +8 -0
  184. data/test/tc_medium.rb +8 -0
  185. data/test/tc_metadata.rb +8 -0
  186. data/test/tc_metadataInfo.rb +8 -0
  187. data/test/tc_onlineResource.rb +8 -0
  188. data/test/tc_orderProcess.rb +8 -0
  189. data/test/tc_party.rb +8 -0
  190. data/test/tc_processStep.rb +8 -0
  191. data/test/tc_releasability.rb +8 -0
  192. data/test/tc_resourceInfo.rb +8 -0
  193. data/test/tc_responsibility.rb +8 -0
  194. data/test/tc_schema.rb +8 -0
  195. data/test/tc_scope.rb +8 -0
  196. data/test/tc_source.rb +8 -0
  197. data/test/tc_spatialReference.rb +8 -0
  198. data/test/tc_spatialRepresentation.rb +8 -0
  199. data/test/tc_spatialResolution.rb +8 -0
  200. data/test/tc_taxonomicClassification.rb +8 -0
  201. data/test/tc_taxonomicSystem.rb +8 -0
  202. data/test/tc_taxonomy.rb +8 -0
  203. data/test/tc_temporalExtent.rb +8 -0
  204. data/test/tc_timeInstant.rb +8 -0
  205. data/test/tc_timePeriod.rb +8 -0
  206. data/test/tc_transferOption.rb +8 -0
  207. data/test/tc_uri.rb +8 -0
  208. data/test/tc_usage.rb +8 -0
  209. data/test/tc_utils.rb +8 -11
  210. data/test/tc_vectorRepresentation.rb +13 -0
  211. data/test/tc_verticalExtent.rb +8 -0
  212. data/test/tc_voucher.rb +8 -0
  213. metadata +264 -57
  214. data/examples/contactRef.json +0 -12
  215. data/examples/coverageInfo.json +0 -148
  216. data/examples/dataDictionary.json +0 -549
  217. data/examples/dataQuality.json +0 -272
  218. data/examples/extent_linestring.json +0 -288
  219. data/examples/extent_point.json +0 -246
  220. data/examples/extent_polygon.json +0 -353
  221. data/examples/full_example.json +0 -3065
  222. data/examples/full_example2.json +0 -2325
  223. data/examples/geojson.json +0 -446
  224. data/examples/graphicOverview.json +0 -28
  225. data/examples/gridInfo.json +0 -23
  226. data/examples/hierarchyLevel.json +0 -90
  227. data/examples/keywords.json +0 -144
  228. data/examples/lcc_project_example.json +0 -326
  229. data/examples/legalConstraints.json +0 -17
  230. data/examples/maintInfo.json +0 -34
  231. data/examples/minimum_example.json +0 -35
  232. data/examples/resolution.json +0 -9
  233. data/examples/resourceMaintenance.json +0 -10
  234. data/examples/securityConstraints.json +0 -13
  235. data/examples/spatialRef.json +0 -14
  236. data/examples/temporalElement.json +0 -29
  237. data/schema/schema/contact.json +0 -262
  238. data/schema/schema/coverageInfo.json +0 -303
  239. data/schema/schema/dataDictionary.json +0 -335
  240. data/schema/schema/distributor.json +0 -216
  241. data/schema/schema/extent.json +0 -215
  242. data/schema/schema/geojson/crs.json +0 -99
  243. data/schema/schema/metadata.json +0 -188
  244. data/schema/schema/resolution.json +0 -51
  245. data/schema/schema/taxonomy.json +0 -122
  246. data/test/tc_schemas.rb +0 -243
  247. /data/schema/{schema/locale.json → locale.json} +0 -0
@@ -6,22 +6,19 @@
6
6
  "ISO 19115-2": ["CI_Citation"]
7
7
  },
8
8
  "type": "object",
9
- "required": ["title", "date"],
10
- "allOf": [
11
- {
12
- "$ref": "#/definitions/citationFull"
13
- }
14
- ],
9
+ "required": ["title"],
10
+ "allOf": [{
11
+ "$ref": "#/definitions/citationFull"
12
+ }],
15
13
  "definitions": {
16
- "citationBase": {
17
- "title": "base citation",
18
- "description": "A minimal citation object supporting only basic attributes.",
19
- "example": "../../examples/full_example.json#/metadata/resourceInfo/citation/identifier/0/authority",
14
+ "citationFull": {
15
+ "type": "object",
16
+ "title": "full citation",
17
+ "description": "A full citation object, all attributes are supported.",
18
+ "example": "",
20
19
  "translation": {
21
20
  "FGDC CSDGM": ["idinfo > citation > citeinfo"]
22
21
  },
23
- "type": "object",
24
- "required": ["title"],
25
22
  "properties": {
26
23
  "title": {
27
24
  "type": "string",
@@ -32,10 +29,13 @@
32
29
  }
33
30
  },
34
31
  "alternateTitle": {
35
- "type": "string",
32
+ "type": "array",
36
33
  "description": "Alias by which the cited resource is known.",
37
34
  "translation": {
38
35
  "ISO 19115-2": ["CI_Citation > alternateTitle"]
36
+ },
37
+ "items": {
38
+ "type": "string"
39
39
  }
40
40
  },
41
41
  "date": {
@@ -47,7 +47,7 @@
47
47
  "minItems": 1,
48
48
  "items": {
49
49
  "type": "object",
50
- "example": "../../examples/full_example.json#/metadata/resourceInfo/citation/date",
50
+ "example": "",
51
51
  "required": ["date", "dateType"],
52
52
  "properties": {
53
53
  "date": {
@@ -55,7 +55,7 @@
55
55
  "ISO 19115-2": ["CI_Date > date", "FC_FeatureCatalogue > versionDate"],
56
56
  "FGDC CSDGM": ["idinfo > citation > citeinfo > pubdate"]
57
57
  },
58
- "$ref": "../schema.json#/definitions/date"
58
+ "$ref": "common.json#/definitions/date"
59
59
  },
60
60
  "dateType": {
61
61
  "type": "string",
@@ -67,6 +67,14 @@
67
67
  }
68
68
  }
69
69
  },
70
+ "edition": {
71
+ "type": "string",
72
+ "description": "Version identifier for the resource.",
73
+ "translation": {
74
+ "ISO 19115-2": ["CI_Citation > edition"],
75
+ "FGDC CSDGM": ["idinfo > citation > edition"]
76
+ }
77
+ },
70
78
  "responsibleParty": {
71
79
  "type": "array",
72
80
  "description": "Identification of, and means of communication with, person(s) and organization(s) associated with the cited resource.",
@@ -76,33 +84,7 @@
76
84
  },
77
85
  "minItems": 1,
78
86
  "items": {
79
- "$ref": "contact.json#/definitions/contactRef"
80
- }
81
- },
82
- "onlineResource": {
83
- "type": "array",
84
- "description": "On-line information related to the citation.",
85
- "translation": {
86
- "ISO 19115-2": ["CI_Citation > citedResponsibleParty > CI_ResponsibleParty > contact > CI_Contact > onlineResource > CI_OnlineResource"]
87
- },
88
- "items": {
89
- "$ref": "onlineResource.json#"
90
- }
91
- }
92
- }
93
- },
94
- "citationFull": {
95
- "type": "object",
96
- "title": "full citation",
97
- "description": "A full citation object, all attributes are supported.",
98
- "example": "../../examples/full_example.json#/metadata/resourceInfo/citation",
99
- "properties": {
100
- "edition": {
101
- "type": "string",
102
- "description": "Version identifier for the resource.",
103
- "translation": {
104
- "ISO 19115-2": ["CI_Citation > edition"],
105
- "FGDC CSDGM": ["idinfo > citation > edition"]
87
+ "$ref": "responsibility.json#"
106
88
  }
107
89
  },
108
90
  "presentationForm": {
@@ -123,71 +105,65 @@
123
105
  "ISO 19115-2": ["CI_Citation > identifier"]
124
106
  },
125
107
  "items": {
126
- "$ref": "#/definitions/identifier"
127
- }
128
- }
129
- },
130
- "allOf": [
131
- {
132
- "$ref": "#/definitions/citationBase"
133
- }
134
- ]
135
- },
136
- "identifier": {
137
- "title": "identifier",
138
- "description": "Assigned identifier for a resource.",
139
- "example": "../../examples/full_example.json#/metadata/resourceInfo/citation/identifier",
140
- "translation": {
141
- "ISO 19115-2": ["MD_Identifier"]
142
- },
143
- "type": "object",
144
- "required": ["identifier"],
145
- "properties": {
146
- "identifier": {
147
- "type": "string",
148
- "description": "A name that is used to identify the resource.",
149
- "translation": {
150
- "ISO 19115-2": ["MD_Identifier > code"]
108
+ "$ref": "./identifier.json#"
151
109
  }
152
110
  },
153
- "namespace": {
154
- "type": "string",
155
- "description": "A string which unambiguously defines the namespace for the identifier.",
156
- "translation": {
157
- "ISO 19115-2": ["RS_Identifier > codeSpace"]
111
+ "series": {
112
+ "$ref": "#/definitions/series"
113
+
114
+ },
115
+ "otherCitationDetails": {
116
+ "type": "array",
117
+ "description": "Other information required to complete the citation that is not recorded elsewhere.",
118
+ "example": "",
119
+ "translation": {},
120
+ "items": {
121
+ "type": "string"
158
122
  }
159
123
  },
160
- "version": {
161
- "type": "string",
162
- "description": "The version of the identifier.",
124
+ "onlineResource": {
125
+ "type": "array",
126
+ "description": "On-line information related to the citation.",
163
127
  "translation": {
164
- "ISO 19115-2": ["RS_Identifier > version"]
128
+ "ISO 19115-2": ["CI_Citation > citedResponsibleParty > CI_ResponsibleParty > contact > CI_Contact > onlineResource > CI_OnlineResource"]
129
+ },
130
+ "items": {
131
+ "$ref": "onlineResource.json#"
165
132
  }
166
133
  },
167
- "description": {
168
- "type": "string",
169
- "description": "A natural language description of the meaning of the identifier value."
170
- },
171
- "type": {
172
- "type": "string",
173
- "description": "The type of identifier, e.g. doi, isbn, issn, etc.",
174
- "translation": {
175
- "ISO 19115-2": ["CI_Citation > ISBN", "CI_Citation > ISSN"]
134
+ "graphic": {
135
+ "type": "array",
136
+ "description": "Online graphic associated with the citation",
137
+ "example": "",
138
+ "translation": {},
139
+ "items": {
140
+ "$ref": "./graphic.json#"
176
141
  }
142
+ }
143
+ }
144
+ },
145
+ "series": {
146
+ "type": "object",
147
+ "description": "Information about the series, or aggregate resource, to which a resource belongs.",
148
+ "example": "",
149
+ "translation": {},
150
+ "minProperties": 1,
151
+ "additionalProperties": true,
152
+ "properties": {
153
+ "seriesName": {
154
+ "type": "string"
177
155
  },
178
- "authority": {
179
- "description": "Citation for the authority issuing the identifier.",
180
- "example": "../../examples/full_example.json#/metadata/resourceInfo/citation/identifier",
181
- "translation": {
182
- "ISO 19115-2": ["MD_Identifier > authority > CI_Citation"]
183
- },
184
- "$ref": "#/definitions/citationBase"
156
+ "seriesIssue": {
157
+ "type": "string"
158
+ },
159
+ "issuePage": {
160
+ "type": "string"
185
161
  }
186
162
  }
187
163
  },
188
164
  "dictionary": {
189
165
  "type": "object",
190
- "example": "../../examples/full_example.json#/dataDictionary/0/dictionaryInfo/citation",
166
+ "example": "",
191
167
  "required": ["title", "date"],
192
168
  "title": "dictionary citation",
193
169
  "description": "A citation object for data dictionaries.",
@@ -200,11 +176,9 @@
200
176
  }
201
177
  }
202
178
  },
203
- "allOf": [
204
- {
205
- "$ref": "#/definitions/citationBase"
206
- }
207
- ]
179
+ "allOf": [{
180
+ "$ref": "#/definitions/citationFull"
181
+ }]
208
182
  }
209
183
  }
210
- }
184
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "id": "common.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "schema definitions for reusable properties",
5
+ "definitions": {
6
+ "url": {
7
+ "type": "string",
8
+ "pattern": "(https?|ftp):\\/\\/(-\\.)?([^\\s\\/?\\.#-]+\\.?)+(\\/[^\\s]*)?$"
9
+ },
10
+ "uri": {
11
+ "type": "string",
12
+ "description": "Location (address) for on-line access using a Uniform Resource Identifier, usually in the form of a Uniform Resource Locator (URL).",
13
+ "example": "../examples/uri.json",
14
+ "translation": {
15
+ "ISO 19115-2": ["CI_OnlineResource > linkage"]
16
+ },
17
+ "pattern": "([A-Za-z][A-Za-z0-9+\\-.]*):(?:(//)(?:((?:[A-Za-z0-9\\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)?((?:\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\\.[A-Za-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*))(?::([0-9]*))?((?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|/((?:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?)|((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|)(?:\\?((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?(?:\\#((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?"
18
+ },
19
+ "date": {
20
+ "type": "string",
21
+ "description": "An ISO 8601 date/timestamp.",
22
+ "example": "../examples/date.json",
23
+ "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})?)?$)"
24
+ },
25
+ "dateObject": {
26
+ "type": "object",
27
+ "description": "An ISO 8601 date/timestamp and type.",
28
+ "example": "",
29
+ "required": ["date", "dateType"],
30
+ "additionalProperties": true,
31
+ "properties": {
32
+ "date": {
33
+ "$ref": "#/definitions/date"
34
+ },
35
+ "dateType": {
36
+ "type": "string",
37
+ "description": "The type of date.",
38
+ "example": "",
39
+ "translation": {},
40
+ "minLength": 1
41
+ },
42
+ "description": {
43
+ "type" : "string",
44
+ "description" : "Supplemental information describing the date context."
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -1,26 +1,94 @@
1
1
  {
2
- "id": "resourceConstraint.json#",
2
+ "id": "constraint.json#",
3
3
  "$schema": "http://json-schema.org/draft-04/schema#",
4
4
  "description": "schema for resource constraint",
5
5
  "example": "../../examples/full_example.json#/metadata/resourceInfo/constraint",
6
- "anyOf": [
7
- {
8
- "$ref": "#/definitions/useLimitation"
9
- }, {
10
- "$ref": "#/definitions/legalConstraint"
11
- }, {
12
- "$ref": "#/definitions/securityConstraint"
6
+ "anyOf": [{
7
+ "type": "object",
8
+ "title": "useLimitation is required",
9
+ "required": ["useLimitation"]
10
+ }, {
11
+ "type": "object",
12
+ "title": "security is required",
13
+ "required": ["security"],
14
+ "properties": {
15
+ "type": {
16
+ "enum": ["security"]
17
+ }
13
18
  }
14
- ],
15
- "definitions": {
16
- "useLimitation": {
19
+ }, {
20
+ "type": "object",
21
+ "title": "legal is required",
22
+ "required": ["legal"],
23
+ "properties": {
24
+ "type": {
25
+ "enum": ["legal"]
26
+ }
27
+ }
28
+ }],
29
+ "properties": {
30
+ "type": {
17
31
  "type": "string",
32
+ "description": "Indicates the type of constraint.",
33
+ "example": "",
34
+ "enum": ["use", "legal", "security"]
35
+ },
36
+ "useLimitation": {
37
+ "type": "array",
18
38
  "description": "Limitation affecting the fitness for use of the resource or metadata. For example, \"not to be used for navigation\".",
19
- "example": "../../examples/full_example.json#/metadata/resourceInfo/constraint/useLimitation",
39
+ "example": "",
20
40
  "translation": {
21
41
  "ISO 19115-2": ["MD_Constraints > useLimitation"]
42
+ },
43
+ "items": {}
44
+ },
45
+ "scope": {
46
+ "description": "temporal extent and or level of the application of the constraint restrictions.",
47
+ "example": "",
48
+ "$ref": "./scope.json#"
49
+ },
50
+ "graphic": {
51
+ "type": "array",
52
+ "description": "Graphic or symbol indicating the constraint",
53
+ "example": "",
54
+ "items": {
55
+ "$ref": "./graphic.json#"
56
+ }
57
+ },
58
+ "reference": {
59
+ "type": "array",
60
+ "description": "Citation for the limitation or constraint",
61
+ "example": "",
62
+ "translation": {},
63
+ "items": {
64
+ "$ref": "./citation.json#"
65
+ }
66
+ },
67
+ "releasability": {
68
+ "$ref": "./releasability.json#",
69
+ "description": "Information concerning the parties to who the resource can or cannot be released.",
70
+ "example": ""
71
+ },
72
+ "responsibleParty": {
73
+ "type": "array",
74
+ "description": "Entity responsible for the resource constraint",
75
+ "example": "",
76
+ "translation": {},
77
+ "items": {
78
+ "$ref": "./responsibility.json#"
22
79
  }
23
80
  },
81
+ "legal": {
82
+ "$ref": "#/definitions/legalConstraint"
83
+ },
84
+ "security": {
85
+ "$ref": "#/definitions/securityConstraint"
86
+
87
+ }
88
+
89
+
90
+ },
91
+ "definitions": {
24
92
  "legalConstraint": {
25
93
  "type": "object",
26
94
  "description": "Restrictions and legal prerequisites for accessing and using the resource or metadata.",
@@ -29,6 +97,7 @@
29
97
  "ISO 19115-2": ["MD_LegalConstraints"]
30
98
  },
31
99
  "additionalProperties": true,
100
+ "minProperties": 1,
32
101
  "properties": {
33
102
  "accessConstraint": {
34
103
  "type": "array",
@@ -72,6 +141,7 @@
72
141
  "ISO 19115-2": ["MD_SecurityConstraints"]
73
142
  },
74
143
  "required": ["classification"],
144
+ "minProperties": 1,
75
145
  "additionalProperties": true,
76
146
  "properties": {
77
147
  "classification": {
@@ -105,4 +175,4 @@
105
175
  }
106
176
  }
107
177
  }
108
- }
178
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "id": "contact.json#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "Basic information for a contact.",
5
+ "translation": {
6
+ "ISO 19115-2": ["Contact > CI_ResponsibleParty"],
7
+ "FGDC CSDGM": ["cntinfo"]
8
+ },
9
+ "example": "../../examples/contact.json",
10
+ "type": "object",
11
+ "title": "contact",
12
+ "required": ["contactId", "name", "isOrganization"],
13
+ "additionalProperties": true,
14
+ "properties": {
15
+ "contactId": {
16
+ "type": "string",
17
+ "description": "Unique identifier for the contact.",
18
+ "example": "../../examples/full_example.json#/contact/1"
19
+ },
20
+ "isOrganization": {
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "name": {
25
+ "type": "string",
26
+ "example": "",
27
+ "description": "",
28
+ "translation": {
29
+ "ISO 19115-2": ["CI_ResponsibleParty > individualName",
30
+ "CI_ResponsibleParty > organisationName"
31
+ ],
32
+ "FGDC CSDGM": ["cntinfo > cntperp > cntper",
33
+ "cntinfo > cntperp > cntorg"
34
+ ]
35
+ }
36
+ },
37
+ "positionName": {
38
+ "type": "string",
39
+ "example": "../../examples/full_example.json#/contact/1",
40
+ "description": "Role or position of the person, usually within a given organization.",
41
+ "translation": {
42
+ "ISO 19115-2": ["CI_ResponsibleParty > positionName"],
43
+ "FGDC CSDGM": ["cntinfo > cntpos"]
44
+ }
45
+ },
46
+ "memberOfOrganization": {
47
+ "type": "array",
48
+ "description": "Organizations that this contact is related to.",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "logoGraphic": {
54
+ "type": "array",
55
+ "description": "Logo for contact.",
56
+ "example": "../../examples/",
57
+ "translation": {
58
+ "ISO 19115-2": [""],
59
+ "FGDC CSDGM": [""]
60
+ },
61
+ "items": [{
62
+ "$ref": "graphic.json#"
63
+ }]
64
+ },
65
+ "phone": {
66
+ "type": "array",
67
+ "description": "Supplemental instructions on how or when to contact the individual or organization.",
68
+ "example": "../../examples/full_example.json#/contact/1",
69
+ "translation": {
70
+ "ISO 19115-2": ["CI_Contact > contactInstructions"],
71
+ "FGDC CSDGM": ["cntinfo > cntinst"]
72
+ },
73
+ "items": {
74
+ "$ref": "#/definitions/phone"
75
+ }
76
+ },
77
+ "address": {
78
+ "type": "array",
79
+ "description": "Addresses for this contact.",
80
+ "example": "../../examples/address.json",
81
+ "items": {
82
+ "$ref": "#/definitions/address"
83
+ }
84
+ },
85
+ "onlineResource": {
86
+ "type": "array",
87
+ "description": "Information about accessing on-line resources and services. This may be a website, profile page, GitHub page, etc. related to the contact.",
88
+ "example": "../../examples/full_example.json#/contact/1",
89
+ "translation": {
90
+ "ISO 19115-2": [
91
+ "CI_ResponsibleParty > contactInfo > CI_Contact > onlineResource > CI_OnlineResource"
92
+ ]
93
+ },
94
+ "items": {
95
+ "$ref": "onlineResource.json#"
96
+ },
97
+ "uniqueItems": true
98
+ },
99
+ "hoursOfService": {
100
+ "type": "array",
101
+ "description": "",
102
+ "items": {
103
+ "type": "string"
104
+ }
105
+ },
106
+ "contactInstructions": {
107
+ "type": "string",
108
+ "description": "Supplemental instructions on how or when to contact the individual or organization.",
109
+ "example": "../../examples/full_example.json#/contact/1",
110
+ "translation": {
111
+ "ISO 19115-2": ["CI_Contact > contactInstructions"],
112
+ "FGDC CSDGM": ["cntinfo > cntinst"]
113
+ }
114
+ },
115
+ "contactType": {
116
+ "type": "string",
117
+ "description": "User defined contact type.",
118
+ "example": "../../examples/"
119
+ }
120
+ },
121
+ "not": {
122
+ "properties": {
123
+ "isOrganization": {
124
+ "type": "boolean",
125
+ "enum": [true]
126
+ },
127
+ "positionName": {
128
+ "type": "string"
129
+ }
130
+ }
131
+ },
132
+ "definitions": {
133
+ "phone": {
134
+ "type": "object",
135
+ "example": "../../examples/full_example.json#/contact/1/phoneBook",
136
+ "required": ["phoneNumber"],
137
+ "properties": {
138
+ "phoneName": {
139
+ "type": "string",
140
+ "description": "Descriptive name of the phone number."
141
+ },
142
+ "phoneNumber": {
143
+ "type": "string",
144
+ "description": "Telephone number. Recommended format is to use 'x' or 'ext' to denote extensions.",
145
+ "translation": {
146
+ "ISO 19115-2": ["CI_Telephone > voice | facsimile"],
147
+ "FGDC CSDGM": ["cntinfo > cntvoice"]
148
+ },
149
+ "pattern": "^[0-9+()#. \/ext-]+$"
150
+ },
151
+ "service": {
152
+ "type": "array",
153
+ "description": "Type(s) of phone number, e.g. voice, sms.",
154
+ "items": {
155
+ "type": "string"
156
+ },
157
+ "uniqueItems": true
158
+ }
159
+ },
160
+ "additionalProperties": true
161
+ },
162
+ "address": {
163
+ "type": "object",
164
+ "example": "../../examples/full_example.json#/contact/1/address",
165
+ "description": "Physical and email address at which the organization or individual may be contacted.",
166
+ "translation": {
167
+ "ISO 19115-2": [
168
+ "CI_ResponsibleParty > contactInfo > CI_Contact > address > CI_Address"
169
+ ],
170
+ "FGDC CSDGM": ["cntinfo > cntaddr"]
171
+ },
172
+ "properties": {
173
+ "deliveryPoint": {
174
+ "type": "array",
175
+ "description": "Address line for the location.",
176
+ "translation": {
177
+ "ISO 19115-2": ["CI_Address > deliveryPoint"],
178
+ "FGDC CSDGM": ["cntinfo > cntaddr > address"]
179
+ },
180
+ "items": {
181
+ "type": "string"
182
+ },
183
+ "uniqueItems": true
184
+ },
185
+ "city": {
186
+ "type": "string",
187
+ "description": "City of the location.",
188
+ "translation": {
189
+ "ISO 19115-2": ["CI_Address > city"],
190
+ "FGDC CSDGM": ["cntinfo > cntaddr > city"]
191
+ }
192
+ },
193
+ "administrativeArea": {
194
+ "type": "string",
195
+ "description": "State, province of the location.",
196
+ "translation": {
197
+ "ISO 19115-2": ["CI_Address > administrativeArea"],
198
+ "FGDC CSDGM": ["cntinfo > cntaddr > state"]
199
+ }
200
+ },
201
+ "postalCode": {
202
+ "type": "string",
203
+ "description": "ZIP or other postal code.",
204
+ "translation": {
205
+ "ISO 19115-2": ["CI_Address > postalCode"],
206
+ "FGDC CSDGM": ["cntinfo > cntaddr > postal"]
207
+ }
208
+ },
209
+ "country": {
210
+ "type": "string",
211
+ "description": "ZIP or other postal code.",
212
+ "translation": {
213
+ "ISO 19115-2": ["CI_Address > postalCode"],
214
+ "FGDC CSDGM": ["cntinfo > cntaddr > postal"]
215
+ }
216
+ },
217
+ "electronicMailAddress": {
218
+ "type": "array",
219
+ "description": "E-mail or electronic mailbox address.",
220
+ "translation": {
221
+ "ISO 19115-2": ["CI_Address > electronicMailAddress"],
222
+ "FGDC CSDGM": ["cntinfo > cntemail"]
223
+ },
224
+ "items": {
225
+ "type": "string",
226
+ "pattern": "^.+@.+\\..+$"
227
+ },
228
+ "uniqueItems": true
229
+ }
230
+ },
231
+ "additionalProperties": true
232
+ }
233
+ }
234
+ }