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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +14 -3
- data/adiwg-json_schemas.gemspec +2 -2
- data/bower.json +0 -1
- data/examples/additionalDocumentation.json +9 -60
- data/examples/address.json +14 -10
- data/examples/allocation.json +12 -0
- data/examples/associatedResource.json +10 -118
- data/examples/attribute.json +27 -0
- data/examples/attributeGroup.json +17 -0
- data/examples/boundingBox.json +6 -0
- data/examples/citation.json +69 -127
- data/examples/computedBbox.json +399 -0
- data/examples/constraint.json +62 -0
- data/examples/contact.json +40 -207
- data/examples/coverageDescription.json +21 -0
- data/examples/date.json +8 -19
- data/examples/dictionary.json +58 -0
- data/examples/dimension.json +11 -0
- data/examples/distribution.json +26 -0
- data/examples/distributor.json +22 -142
- data/examples/domain.json +29 -0
- data/examples/domainItem.json +11 -0
- data/examples/duration.json +17 -0
- data/examples/entity.json +48 -0
- data/examples/entityAttribute.json +31 -0
- data/examples/entityForeignKey.json +17 -0
- data/examples/entityIndex.json +8 -0
- data/examples/extent.json +60 -0
- data/examples/featureCollection.json +58 -0
- data/examples/featureProperties.json +16 -0
- data/examples/format.json +7 -14
- data/examples/funding.json +33 -0
- data/examples/geoJson.json +185 -0
- data/examples/geographicExtent.json +22 -0
- data/examples/geometryCollection.json +14 -0
- data/examples/geometryFeature.json +12 -0
- data/examples/geometryObject.json +90 -0
- data/examples/georectifiedRepresentation.json +28 -0
- data/examples/georeferencableRepresentation.json +25 -0
- data/examples/gmlIdentifier.json +8 -0
- data/examples/graphic.json +33 -0
- data/examples/gridRepresentation.json +14 -0
- data/examples/identifier.json +9 -0
- data/examples/imageDescription.json +15 -0
- data/examples/keyword.json +14 -0
- data/examples/keywordObject.json +12 -0
- data/examples/legalConstraint.json +21 -0
- data/examples/lineage.json +21 -0
- data/examples/locale.json +12 -3
- data/examples/maintenance.json +38 -0
- data/examples/mdJson.json +99 -0
- data/examples/measure.json +5 -0
- data/examples/medium.json +16 -0
- data/examples/metadata.json +102 -0
- data/examples/metadataInfo.json +68 -101
- data/examples/onlineResource.json +13 -17
- data/examples/orderProcess.json +6 -0
- data/examples/party.json +21 -0
- data/examples/phone.json +9 -0
- data/examples/processStep.json +34 -0
- data/examples/releasability.json +28 -0
- data/examples/resourceInfo.json +230 -1256
- data/examples/responsibleParty.json +31 -0
- data/examples/schema.json +8 -0
- data/examples/scope.json +33 -0
- data/examples/scopeDescription.json +8 -0
- data/examples/securityConstraint.json +13 -0
- data/examples/series.json +9 -0
- data/examples/source.json +23 -0
- data/examples/spatialReference.json +34 -0
- data/examples/spatialRepresentation.json +59 -0
- data/examples/spatialResolution.json +11 -0
- data/examples/taxonomicClassification.json +59 -0
- data/examples/taxonomicSystem.json +13 -0
- data/examples/taxonomy.json +79 -188
- data/examples/temporalExtent.json +11 -0
- data/examples/timeInstant.json +13 -0
- data/examples/timeInterval.json +8 -0
- data/examples/timePeriod.json +26 -0
- data/examples/transferOption.json +36 -0
- data/examples/usage.json +48 -33
- data/examples/vectorObject.json +4 -0
- data/examples/vectorRepresentation.json +10 -0
- data/examples/verticalExtent.json +10 -17
- data/examples/voucher.json +12 -0
- data/lib/adiwg/mdjson_schemas/utils.rb +45 -15
- data/lib/adiwg/mdjson_schemas/validator.rb +6 -7
- data/lib/adiwg/mdjson_schemas/version.rb +1 -1
- data/lib/adiwg/mdjson_schemas.rb +4 -2
- data/schema/additionalDocumentation.json +29 -0
- data/schema/associatedResource.json +49 -0
- data/schema/attribute.json +157 -0
- data/schema/attributeGroup.json +29 -0
- data/schema/{schema/geojson/bbox.json → bbox.json} +2 -2
- data/schema/{schema/citation.json → citation.json} +73 -99
- data/schema/common.json +49 -0
- data/schema/{schema/resourceConstraint.json → constraint.json} +83 -13
- data/schema/contact.json +234 -0
- data/schema/coverageDescription.json +50 -0
- data/schema/dataDictionary.json +71 -0
- data/schema/distribution.json +35 -0
- data/schema/distributor.json +46 -0
- data/schema/domain.json +65 -0
- data/schema/entity.json +235 -0
- data/schema/extent.json +59 -0
- data/schema/format.json +37 -0
- data/schema/funding.json +67 -0
- data/schema/geographicExtent.json +87 -0
- data/schema/{schema/geojson/geojson.json → geojson.json} +16 -44
- data/schema/{schema/geojson/geometry.json → geometry.json} +2 -1
- data/schema/georectifiedRepresentation.json +89 -0
- data/schema/georeferencableRepresentation.json +49 -0
- data/schema/{schema/graphicOverview.json → graphic.json} +19 -6
- data/schema/{schema/gridInfo.json → gridRepresentation.json} +7 -13
- data/schema/identifier.json +47 -0
- data/schema/imageDescription.json +92 -0
- data/schema/{schema/keyword.json → keyword.json} +18 -4
- data/schema/{schema/dataQuality.json → lineage.json} +92 -57
- data/schema/{schema/maintInfo.json → maintInfo.json} +24 -6
- data/schema/measure.json +31 -0
- data/schema/medium.json +55 -0
- data/schema/metadata.json +77 -0
- data/schema/metadataInfo.json +112 -0
- data/schema/{schema/onlineResource.json → onlineResource.json} +1 -1
- data/schema/orderProcess.json +45 -0
- data/schema/releasability.json +42 -0
- data/schema/{schema/resourceInfo.json → resourceInfo.json} +112 -189
- data/schema/responsibility.json +56 -0
- data/schema/schema.json +16 -31
- data/schema/scope.json +55 -0
- data/schema/spatialReference.json +26 -0
- data/schema/spatialRepresentation.json +83 -0
- data/schema/spatialResolution.json +54 -0
- data/schema/taxonomy.json +178 -0
- data/schema/temporalExtent.json +42 -0
- data/schema/timeInstant.json +46 -0
- data/schema/timePeriod.json +126 -0
- data/schema/transferOption.json +61 -0
- data/schema/{schema/usage.json → usage.json} +34 -4
- data/schema/vectorRepresentation.json +51 -0
- data/schema/verticalExtent.json +37 -0
- data/test/helper.rb +32 -0
- data/test/tc_additionalDocumentation.rb +8 -0
- data/test/tc_address.rb +8 -0
- data/test/tc_associatedResource.rb +8 -0
- data/test/tc_attribute.rb +8 -0
- data/test/tc_attributeGroup.rb +8 -0
- data/test/tc_boundingBox.rb +8 -0
- data/test/tc_citation.rb +8 -0
- data/test/tc_constraint.rb +8 -0
- data/test/tc_contact.rb +8 -0
- data/test/tc_coverageDescription.rb +8 -0
- data/test/tc_dataDictionary.rb +8 -0
- data/test/tc_dimension.rb +8 -0
- data/test/tc_distribution.rb +8 -0
- data/test/tc_distributor.rb +8 -0
- data/test/tc_domain.rb +8 -0
- data/test/tc_domainItem.rb +8 -0
- data/test/tc_duration.rb +8 -0
- data/test/tc_entity.rb +20 -0
- data/test/tc_extent.rb +8 -0
- data/test/tc_featureCollection.rb +8 -0
- data/test/tc_featureProperties.rb +8 -0
- data/test/tc_format.rb +8 -0
- data/test/tc_funding.rb +8 -0
- data/test/tc_geographicElement.rb +12 -0
- data/test/tc_geographicExtent.rb +8 -0
- data/test/tc_geometryCollection.rb +8 -0
- data/test/tc_geometryFeature.rb +8 -0
- data/test/tc_geometryObject.rb +8 -0
- data/test/tc_georectifiedRepresentation.rb +8 -0
- data/test/tc_georeferencableRepresentation.rb +8 -0
- data/test/tc_graphic.rb +8 -0
- data/test/tc_gridRepresentation.rb +8 -0
- data/test/tc_identifier.rb +8 -0
- data/test/tc_imageDescription.rb +8 -0
- data/test/tc_jsonschema.rb +16 -0
- data/test/tc_keyword.rb +8 -0
- data/test/tc_lineage.rb +8 -0
- data/test/tc_maintInfo.rb +8 -0
- data/test/tc_measure.rb +8 -0
- data/test/tc_medium.rb +8 -0
- data/test/tc_metadata.rb +8 -0
- data/test/tc_metadataInfo.rb +8 -0
- data/test/tc_onlineResource.rb +8 -0
- data/test/tc_orderProcess.rb +8 -0
- data/test/tc_party.rb +8 -0
- data/test/tc_processStep.rb +8 -0
- data/test/tc_releasability.rb +8 -0
- data/test/tc_resourceInfo.rb +8 -0
- data/test/tc_responsibility.rb +8 -0
- data/test/tc_schema.rb +8 -0
- data/test/tc_scope.rb +8 -0
- data/test/tc_source.rb +8 -0
- data/test/tc_spatialReference.rb +8 -0
- data/test/tc_spatialRepresentation.rb +8 -0
- data/test/tc_spatialResolution.rb +8 -0
- data/test/tc_taxonomicClassification.rb +8 -0
- data/test/tc_taxonomicSystem.rb +8 -0
- data/test/tc_taxonomy.rb +8 -0
- data/test/tc_temporalExtent.rb +8 -0
- data/test/tc_timeInstant.rb +8 -0
- data/test/tc_timePeriod.rb +8 -0
- data/test/tc_transferOption.rb +8 -0
- data/test/tc_uri.rb +8 -0
- data/test/tc_usage.rb +8 -0
- data/test/tc_utils.rb +8 -11
- data/test/tc_vectorRepresentation.rb +13 -0
- data/test/tc_verticalExtent.rb +8 -0
- data/test/tc_voucher.rb +8 -0
- metadata +264 -57
- data/examples/contactRef.json +0 -12
- data/examples/coverageInfo.json +0 -148
- data/examples/dataDictionary.json +0 -549
- data/examples/dataQuality.json +0 -272
- data/examples/extent_linestring.json +0 -288
- data/examples/extent_point.json +0 -246
- data/examples/extent_polygon.json +0 -353
- data/examples/full_example.json +0 -3065
- data/examples/full_example2.json +0 -2325
- data/examples/geojson.json +0 -446
- data/examples/graphicOverview.json +0 -28
- data/examples/gridInfo.json +0 -23
- data/examples/hierarchyLevel.json +0 -90
- data/examples/keywords.json +0 -144
- data/examples/lcc_project_example.json +0 -326
- data/examples/legalConstraints.json +0 -17
- data/examples/maintInfo.json +0 -34
- data/examples/minimum_example.json +0 -35
- data/examples/resolution.json +0 -9
- data/examples/resourceMaintenance.json +0 -10
- data/examples/securityConstraints.json +0 -13
- data/examples/spatialRef.json +0 -14
- data/examples/temporalElement.json +0 -29
- data/schema/schema/contact.json +0 -262
- data/schema/schema/coverageInfo.json +0 -303
- data/schema/schema/dataDictionary.json +0 -335
- data/schema/schema/distributor.json +0 -216
- data/schema/schema/extent.json +0 -215
- data/schema/schema/geojson/crs.json +0 -99
- data/schema/schema/metadata.json +0 -188
- data/schema/schema/resolution.json +0 -51
- data/schema/schema/taxonomy.json +0 -122
- data/test/tc_schemas.rb +0 -243
- /data/schema/{schema/locale.json → locale.json} +0 -0
data/test/tc_party.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestParty < TestHelper
|
4
|
+
def test_party
|
5
|
+
errors = JSON::Validator.fully_validate('responsibility.json', @@example + 'party.json', strict: @@strict, list: false, :fragment => "#/properties/party")
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestProcessStep < TestHelper
|
4
|
+
def test_processStep
|
5
|
+
errors = JSON::Validator.fully_validate('lineage.json', @@example + 'processStep.json', :fragment => "#/definitions/processStep", 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 TestReleasability < TestHelper
|
4
|
+
def test_releasability
|
5
|
+
errors = JSON::Validator.fully_validate('releasability.json', @@example + 'releasability.json', 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 TestResponsibility < TestHelper
|
4
|
+
def test_responsibility
|
5
|
+
errors = JSON::Validator.fully_validate('responsibility.json', @@example + 'responsibleParty.json', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
data/test/tc_schema.rb
ADDED
data/test/tc_scope.rb
ADDED
data/test/tc_source.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestSource < TestHelper
|
4
|
+
def test_source
|
5
|
+
errors = JSON::Validator.fully_validate('lineage.json', @@example + 'source.json', :fragment => "#/definitions/source", 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 TestSpatialReference < TestHelper
|
4
|
+
def test_spatialReference
|
5
|
+
errors = JSON::Validator.fully_validate('spatialReference.json', @@example + 'spatialReference.json', 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 TestSpatialRepresentation < TestHelper
|
4
|
+
def test_spatialRepresentation
|
5
|
+
errors = JSON::Validator.fully_validate('spatialRepresentation.json', @@example + 'spatialRepresentation.json', 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 TestSpatialResolution < TestHelper
|
4
|
+
def test_spatialResolution
|
5
|
+
errors = JSON::Validator.fully_validate('spatialResolution.json', @@example + 'spatialResolution.json', 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 TestTaxonomicClassification < TestHelper
|
4
|
+
def test_taxonomicClassification
|
5
|
+
errors = JSON::Validator.fully_validate('taxonomy.json', @@example + 'taxonomicClassification.json', fragment:'#/definitions/taxonomicClassification', 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 TestTaxonomicSystem < TestHelper
|
4
|
+
def test_taxonomicSystem
|
5
|
+
errors = JSON::Validator.fully_validate('taxonomy.json', @@example + 'taxonomicSystem.json', fragment:'#/definitions/taxonomicSystem', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
data/test/tc_taxonomy.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestTemporalExtent < TestHelper
|
4
|
+
def test_temporalExtent
|
5
|
+
errors = JSON::Validator.fully_validate('temporalExtent.json', @@example + 'temporalExtent.json', 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 TestTransferOption < TestHelper
|
4
|
+
def test_transferOption
|
5
|
+
errors = JSON::Validator.fully_validate('transferOption.json', @@example + 'transferOption.json', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
data/test/tc_uri.rb
ADDED
data/test/tc_usage.rb
ADDED
data/test/tc_utils.rb
CHANGED
@@ -1,26 +1,23 @@
|
|
1
|
-
|
2
|
-
*
|
3
|
-
*
|
4
|
-
* Date: 2014-05-06
|
5
|
-
* License: Public Domain
|
6
|
-
=end
|
1
|
+
# * Description: Test Utility functions
|
2
|
+
# * Author: Josh Bradley
|
3
|
+
# * License: Public Domain
|
7
4
|
|
8
5
|
require 'minitest/autorun'
|
9
|
-
require File.join(File.dirname(__FILE__),'..','lib', 'adiwg-mdjson_schemas.rb')
|
6
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'adiwg-mdjson_schemas.rb')
|
10
7
|
|
11
8
|
class TestUtils < Minitest::Test
|
12
9
|
def test_examples_dir
|
13
10
|
errors = File.exist?(ADIWG::MdjsonSchemas::Utils.examples_dir)
|
14
|
-
assert_equal(
|
11
|
+
assert_equal(true, errors, 'Examples directory does not exist.')
|
15
12
|
end
|
16
13
|
|
17
14
|
def test_schema_path
|
18
15
|
errors = File.file?(ADIWG::MdjsonSchemas::Utils.schema_path)
|
19
|
-
assert_equal(
|
16
|
+
assert_equal(true, errors, 'File schema.json does not exist.')
|
20
17
|
end
|
21
18
|
|
22
19
|
def test_schema_dir
|
23
20
|
errors = File.exist?(ADIWG::MdjsonSchemas::Utils.schema_dir)
|
24
|
-
assert_equal(
|
21
|
+
assert_equal(true, errors, 'Schema directory does not exist.')
|
25
22
|
end
|
26
|
-
end
|
23
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestVectorRepresentation < TestHelper
|
4
|
+
def test_vectorRepresentation
|
5
|
+
errors = JSON::Validator.fully_validate('vectorRepresentation.json', @@example + 'vectorRepresentation.json', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_vectorObject
|
10
|
+
errors = JSON::Validator.fully_validate('vectorRepresentation.json', @@example + 'vectorObject.json', fragment:'#/definitions/vectorObject', strict: @@strict, list: true)
|
11
|
+
assert(errors.empty?, errors.join("\n"))
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestVerticalExtent < TestHelper
|
4
|
+
def test_verticalExtent
|
5
|
+
errors = JSON::Validator.fully_validate('verticalExtent.json', @@example + 'verticalExtent.json', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
data/test/tc_voucher.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestVoucher < TestHelper
|
4
|
+
def test_voucher
|
5
|
+
errors = JSON::Validator.fully_validate('taxonomy.json', @@example + 'voucher.json', fragment:'#/definitions/voucher', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|