From e307010f72e7d00a6535050511ed1592d72d3cf5 Mon Sep 17 00:00:00 2001 From: Juha-Matti Lehtinen Date: Tue, 12 Jun 2018 11:25:47 +0300 Subject: [PATCH 1/2] CSCMETAX-419: [REF] Updated mrd schema: concept.in_scheme and variable.representation are now simple uris instead of referring to a ConceptScheme object. Update test data accordingly. --- .../rest/base/schemas/att_dataset_schema.json | 52 +- .../schemas/harvester_dataset_schema.json | 48 +- .../rest/base/schemas/ida_dataset_schema.json | 48 +- ...og_record_test_data_template_full_att.json | 106 +-- ...og_record_test_data_template_full_ida.json | 115 +-- .../tests/testdata/generate_test_data.py | 18 +- src/metax_api/tests/testdata/test_data.json | 663 ++---------------- 7 files changed, 131 insertions(+), 919 deletions(-) diff --git a/src/metax_api/api/rest/base/schemas/att_dataset_schema.json b/src/metax_api/api/rest/base/schemas/att_dataset_schema.json index b9b2e962..2b64fb23 100644 --- a/src/metax_api/api/rest/base/schemas/att_dataset_schema.json +++ b/src/metax_api/api/rest/base/schemas/att_dataset_schema.json @@ -2,7 +2,7 @@ { "@id":"http://uri.suomi.fi/datamodel/ns/mrd#", "title":"Metax Research Datasets", - "modified":"Wed, 30 May 2018 12:05:20 GMT", + "modified":"Mon, 11 Jun 2018 10:12:12 GMT", "$schema":"http://json-schema.org/draft-04/schema#", "type":"object", "allOf":[ @@ -300,40 +300,10 @@ "$ref":"#/definitions/langString" }, "in_scheme":{ - "@id":"http://www.w3.org/2004/02/skos/core#inScheme", - "title":"Is in scheme", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#inScheme", + "title":"In scheme", "description":"Relates a resource (for example a concept) to a concept scheme in which it is included.", - "@type":"@id", - "type":"array", - "items":{ - "type":"object", - "$ref":"#/definitions/ConceptScheme" - } - } - }, - "required":[ - "identifier" - ] - }, - "ConceptScheme":{ - "title":"Concept Scheme", - "type":"object", - "@id":"http://www.w3.org/2004/02/skos/core#ConceptScheme", - "description":"A set of concepts, optionally including statements about semantic relationships between those concepts.", - "properties":{ - "pref_label":{ - "@id":"http://www.w3.org/2004/02/skos/core#prefLabel", - "title":"Preferred label", - "description":"The preferred lexical label for a resource, in a given language. A resource has no more than one value of skos:prefLabel per language tag, and no more than one value of skos:prefLabel without language tag. The range of skos:prefLabel is the class of RDF plain literals. skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise\n disjoint properties.", - "@type":"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", - "type":"object", - "$ref":"#/definitions/langString" - }, - "identifier":{ - "@id":"http://purl.org/dc/terms/identifier", - "title":"Identifier", - "description":"URI of the Concept Scheme", - "@type":"@id", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", "type":"string", "format":"uri" } @@ -837,8 +807,8 @@ } }, "ResearchAgent":{ - "type":"object", "title":"Agent", + "type":"object", "@id":"http://xmlns.com/foaf/0.1/Agent", "oneOf":[ {"$ref": "#/definitions/Person"}, @@ -1397,12 +1367,12 @@ "$ref":"#/definitions/Concept" }, "representation":{ - "@id":"http://rdf-vocabulary.ddialliance.org/discovery#representation", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#representation", "title":"Representation", - "description":"Defines the possible values of a variable", - "@type":"@id", - "type":"object", - "$ref":"#/definitions/ConceptScheme" + "description":"Defines reference to a Concept Scheme that includes the possible values of a variable.", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", + "type":"string", + "format":"uri" } }, "required":[ @@ -1545,4 +1515,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/metax_api/api/rest/base/schemas/harvester_dataset_schema.json b/src/metax_api/api/rest/base/schemas/harvester_dataset_schema.json index e33d5473..a7bdcb36 100644 --- a/src/metax_api/api/rest/base/schemas/harvester_dataset_schema.json +++ b/src/metax_api/api/rest/base/schemas/harvester_dataset_schema.json @@ -2,7 +2,7 @@ { "@id":"http://uri.suomi.fi/datamodel/ns/mrd#", "title":"Metax Research Datasets", - "modified":"Wed, 30 May 2018 12:05:20 GMT", + "modified":"Mon, 11 Jun 2018 10:12:12 GMT", "$schema":"http://json-schema.org/draft-04/schema#", "type":"object", "allOf":[ @@ -300,40 +300,10 @@ "$ref":"#/definitions/langString" }, "in_scheme":{ - "@id":"http://www.w3.org/2004/02/skos/core#inScheme", - "title":"Is in scheme", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#inScheme", + "title":"In scheme", "description":"Relates a resource (for example a concept) to a concept scheme in which it is included.", - "@type":"@id", - "type":"array", - "items":{ - "type":"object", - "$ref":"#/definitions/ConceptScheme" - } - } - }, - "required":[ - "identifier" - ] - }, - "ConceptScheme":{ - "title":"Concept Scheme", - "type":"object", - "@id":"http://www.w3.org/2004/02/skos/core#ConceptScheme", - "description":"A set of concepts, optionally including statements about semantic relationships between those concepts.", - "properties":{ - "pref_label":{ - "@id":"http://www.w3.org/2004/02/skos/core#prefLabel", - "title":"Preferred label", - "description":"The preferred lexical label for a resource, in a given language. A resource has no more than one value of skos:prefLabel per language tag, and no more than one value of skos:prefLabel without language tag. The range of skos:prefLabel is the class of RDF plain literals. skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise\n disjoint properties.", - "@type":"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", - "type":"object", - "$ref":"#/definitions/langString" - }, - "identifier":{ - "@id":"http://purl.org/dc/terms/identifier", - "title":"Identifier", - "description":"URI of the Concept Scheme", - "@type":"@id", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", "type":"string", "format":"uri" } @@ -1536,12 +1506,12 @@ "$ref":"#/definitions/Concept" }, "representation":{ - "@id":"http://rdf-vocabulary.ddialliance.org/discovery#representation", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#representation", "title":"Representation", - "description":"Defines the possible values of a variable", - "@type":"@id", - "type":"object", - "$ref":"#/definitions/ConceptScheme" + "description":"Defines reference to a Concept Scheme that includes the possible values of a variable.", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", + "type":"string", + "format":"uri" } }, "required":[ diff --git a/src/metax_api/api/rest/base/schemas/ida_dataset_schema.json b/src/metax_api/api/rest/base/schemas/ida_dataset_schema.json index fdb6e07f..e779cb1c 100644 --- a/src/metax_api/api/rest/base/schemas/ida_dataset_schema.json +++ b/src/metax_api/api/rest/base/schemas/ida_dataset_schema.json @@ -2,7 +2,7 @@ { "@id":"http://uri.suomi.fi/datamodel/ns/mrd#", "title":"Metax Research Datasets", - "modified":"Wed, 30 May 2018 12:05:20 GMT", + "modified":"Mon, 11 Jun 2018 10:12:12 GMT", "$schema":"http://json-schema.org/draft-04/schema#", "type":"object", "allOf":[ @@ -274,40 +274,10 @@ "$ref":"#/definitions/langString" }, "in_scheme":{ - "@id":"http://www.w3.org/2004/02/skos/core#inScheme", - "title":"Is in scheme", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#inScheme", + "title":"In scheme", "description":"Relates a resource (for example a concept) to a concept scheme in which it is included.", - "@type":"@id", - "type":"array", - "items":{ - "type":"object", - "$ref":"#/definitions/ConceptScheme" - } - } - }, - "required":[ - "identifier" - ] - }, - "ConceptScheme":{ - "title":"Concept Scheme", - "type":"object", - "@id":"http://www.w3.org/2004/02/skos/core#ConceptScheme", - "description":"A set of concepts, optionally including statements about semantic relationships between those concepts.", - "properties":{ - "pref_label":{ - "@id":"http://www.w3.org/2004/02/skos/core#prefLabel", - "title":"Preferred label", - "description":"The preferred lexical label for a resource, in a given language. A resource has no more than one value of skos:prefLabel per language tag, and no more than one value of skos:prefLabel without language tag. The range of skos:prefLabel is the class of RDF plain literals. skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise\n disjoint properties.", - "@type":"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", - "type":"object", - "$ref":"#/definitions/langString" - }, - "identifier":{ - "@id":"http://purl.org/dc/terms/identifier", - "title":"Identifier", - "description":"URI of the Concept Scheme", - "@type":"@id", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", "type":"string", "format":"uri" } @@ -1456,12 +1426,12 @@ "$ref":"#/definitions/Concept" }, "representation":{ - "@id":"http://rdf-vocabulary.ddialliance.org/discovery#representation", + "@id":"http://uri.suomi.fi/datamodel/ns/mrd#representation", "title":"Representation", - "description":"Defines the possible values of a variable", - "@type":"@id", - "type":"object", - "$ref":"#/definitions/ConceptScheme" + "description":"Defines reference to a Concept Scheme that includes the possible values of a variable.", + "@type":"http://www.w3.org/2001/XMLSchema#anyURI", + "type":"string", + "format":"uri" } }, "required":[ diff --git a/src/metax_api/tests/testdata/catalog_record_test_data_template_full_att.json b/src/metax_api/tests/testdata/catalog_record_test_data_template_full_att.json index e12ff7f1..b7f7f975 100644 --- a/src/metax_api/tests/testdata/catalog_record_test_data_template_full_att.json +++ b/src/metax_api/tests/testdata/catalog_record_test_data_template_full_att.json @@ -75,14 +75,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.accessrights.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "restriction_grounds": { "identifier": "http://purl.org/att/es/reference_data/restriction_grounds/restriction_grounds_1" @@ -133,14 +126,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.some.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } }, { @@ -166,14 +152,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.other.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } } ], @@ -186,14 +165,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.that.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } ], "theme": [ @@ -205,14 +177,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } ], "provenance": [ @@ -240,14 +205,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.provenance.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "used_entity": [ { @@ -266,14 +224,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.used.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } } ], @@ -307,14 +258,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.variable.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "universe": { "identifier": "universeconceptidentifier", @@ -324,21 +268,9 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.universe.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, - "representation": { - "pref_label": { - "en": "Preferred label" - }, - "identifier": "identifierheretoo" - } + "representation": "http://uri.of.filetype.concept/scheme" } ] }, @@ -586,14 +518,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.resource.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "has_object_characteristics": { "title": "File type name", @@ -642,14 +567,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.resource.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "mediatype": "image/gif", "use_category": { diff --git a/src/metax_api/tests/testdata/catalog_record_test_data_template_full_ida.json b/src/metax_api/tests/testdata/catalog_record_test_data_template_full_ida.json index e8d030f6..12c19174 100644 --- a/src/metax_api/tests/testdata/catalog_record_test_data_template_full_ida.json +++ b/src/metax_api/tests/testdata/catalog_record_test_data_template_full_ida.json @@ -75,14 +75,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.accessrights.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "restriction_grounds": { "identifier": "http://purl.org/att/es/reference_data/restriction_grounds/restriction_grounds_1" @@ -133,14 +126,7 @@ "definition":{ "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.some.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } }, { @@ -166,14 +152,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.other.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } } ], @@ -186,14 +165,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.that.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } ], "theme": [ @@ -205,14 +177,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, { "identifier": "http://www.yso.fi/onto/koko/p76312", @@ -222,14 +187,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } ], "provenance": [ @@ -257,14 +215,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.provenance.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "used_entity": [ { @@ -283,14 +234,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.used.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" } } ], @@ -324,14 +268,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.variable.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "universe": { "identifier": "universeconceptidentifier", @@ -341,21 +278,9 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.universe.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, - "representation": { - "pref_label": { - "en": "Preferred label" - }, - "identifier": "identifierheretoo" - } + "representation": "http://uri.of.filetype.concept/scheme" } ] }, @@ -594,14 +519,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.filetype.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "use_category": { "identifier": "configuration" @@ -616,14 +534,7 @@ "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.filetype.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "use_category": { "identifier": "http://purl.org/att/es/reference_data/use_category/use_category_publication" diff --git a/src/metax_api/tests/testdata/generate_test_data.py b/src/metax_api/tests/testdata/generate_test_data.py index dd822a11..ade97ce8 100644 --- a/src/metax_api/tests/testdata/generate_test_data.py +++ b/src/metax_api/tests/testdata/generate_test_data.py @@ -569,14 +569,7 @@ def generate_catalog_records(basic_catalog_record_max_rows, data_catalogs_list, "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.filetype.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "use_category": { "identifier": "configuration" @@ -591,14 +584,7 @@ def generate_catalog_records(basic_catalog_record_max_rows, data_catalogs_list, "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, - "in_scheme": [ - { - "pref_label": { - "en": "The preferred lexical label for a resource" - }, - "identifier": "http://uri.of.filetype.concept/scheme" - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "use_category": { "identifier": "http://purl.org/att/es/reference_data/use_category/use_category_publication" diff --git a/src/metax_api/tests/testdata/test_data.json b/src/metax_api/tests/testdata/test_data.json index 46be5aa3..19fa1308 100644 --- a/src/metax_api/tests/testdata/test_data.json +++ b/src/metax_api/tests/testdata/test_data.json @@ -6717,14 +6717,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -6871,14 +6864,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -6892,14 +6878,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_video", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:1", "title": "file title", @@ -6914,14 +6893,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_software", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:2", "title": "file title", @@ -7009,14 +6981,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -7042,14 +7007,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -7067,14 +7025,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -7105,14 +7056,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -7126,14 +7070,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -7144,25 +7081,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -7375,14 +7300,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p32202", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -7392,14 +7310,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p76312", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -7465,14 +7376,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -7619,14 +7523,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -7640,14 +7537,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_video", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:1", "title": "file title", @@ -7662,14 +7552,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_software", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:2", "title": "file title", @@ -7757,14 +7640,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -7790,14 +7666,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -7815,14 +7684,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -7853,14 +7715,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -7874,14 +7729,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -7892,25 +7740,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -8123,14 +7959,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p32202", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -8140,14 +7969,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p76312", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -8281,14 +8103,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -8459,14 +8274,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -8480,14 +8288,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_video", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:6", "title": "file title 6", @@ -8502,14 +8303,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_software", - "in_scheme": [ - { - "identifier": "http://uri.of.filetype.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "identifier": "pid:urn:10", "title": "file title 10", @@ -8597,14 +8391,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -8630,14 +8417,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -8655,14 +8435,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -8693,14 +8466,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -8714,14 +8480,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -8732,25 +8491,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -8963,14 +8710,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p32202", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -8980,14 +8720,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p76312", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -9910,14 +9643,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -10046,14 +9772,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -10138,14 +9857,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -10171,14 +9883,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -10196,14 +9901,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -10234,14 +9932,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -10255,14 +9946,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -10273,25 +9957,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -10471,14 +10143,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_image", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "has_object_characteristics": { "description": "Description of file type", @@ -10542,14 +10207,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/resource_type/resource_type_api", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "title": "A name given to the second distribution", "use_category": { @@ -10612,14 +10270,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p18199", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -10660,14 +10311,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -10796,14 +10440,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -10888,14 +10525,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -10921,14 +10551,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -10946,14 +10569,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -10984,14 +10600,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -11005,14 +10614,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -11023,25 +10625,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -11221,14 +10811,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_image", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "has_object_characteristics": { "description": "Description of file type", @@ -11292,14 +10875,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/resource_type/resource_type_api", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "title": "A name given to the second distribution", "use_category": { @@ -11362,14 +10938,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p18199", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } @@ -11410,14 +10979,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/access_type/access_type_open_access", - "in_scheme": [ - { - "identifier": "http://uri.of.accessrights.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -11546,14 +11108,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/okm-tieteenala/ta414", - "in_scheme": [ - { - "identifier": "http://uri.of.that.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -11638,14 +11193,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "doi", - "in_scheme": [ - { - "identifier": "http://uri.of.some.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -11671,14 +11219,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/identifier_type/identifier_type_urn", - "in_scheme": [ - { - "identifier": "http://uri.of.other.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for y" } @@ -11696,14 +11237,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/lifecycle_event/lifecycle_event_collected", - "in_scheme": [ - { - "identifier": "http://uri.of.provenance.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "spatial": { "alt": "11.111", @@ -11734,14 +11268,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "thisisnotenoughconcepts", - "in_scheme": [ - { - "identifier": "http://uri.of.used.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for this type" } @@ -11755,14 +11282,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "variableconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.variable.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -11773,25 +11293,13 @@ "pref_label": { "en": "Preferred label" }, - "representation": { - "identifier": "identifierheretoo", - "pref_label": { - "en": "Preferred label" - } - }, + "representation": "http://uri.of.filetype.concept/scheme", "universe": { "definition": { "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "universeconceptidentifier", - "in_scheme": [ - { - "identifier": "http://uri.of.universe.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label" } @@ -11971,14 +11479,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/file_type/file_type_image", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "has_object_characteristics": { "description": "Description of file type", @@ -12042,14 +11543,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://purl.org/att/es/reference_data/resource_type/resource_type_api", - "in_scheme": [ - { - "identifier": "http://uri.of.resource.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ] + "in_scheme": "http://uri.of.filetype.concept/scheme" }, "title": "A name given to the second distribution", "use_category": { @@ -12112,14 +11606,7 @@ "en": "A statement or formal explanation of the meaning of a concept." }, "identifier": "http://www.yso.fi/onto/koko/p18199", - "in_scheme": [ - { - "identifier": "http://uri.of.concept/scheme", - "pref_label": { - "en": "The preferred lexical label for a resource" - } - } - ], + "in_scheme": "http://uri.of.filetype.concept/scheme", "pref_label": { "en": "pref label for theme" } From 237d88d65f7740c86cdcbb2090c3907de3100b9a Mon Sep 17 00:00:00 2001 From: Juha-Matti Lehtinen Date: Tue, 12 Jun 2018 17:34:19 +0300 Subject: [PATCH 2/2] CSCMETAX-419: [ADD] Read scheme attribute from es to cache. Use scheme attribute in reference data automatic populations and populate the new in_scheme field with that value. --- .../services/data_catalog_service.py | 6 ++-- .../services/reference_data_mixin.py | 2 ++ .../api/rest/base/views/datasets/write.py | 28 +++++++++++++++++-- src/metax_api/utils/reference_data_loader.py | 4 +++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/metax_api/services/data_catalog_service.py b/src/metax_api/services/data_catalog_service.py index 0d3f52c5..56d780c1 100644 --- a/src/metax_api/services/data_catalog_service.py +++ b/src/metax_api/services/data_catalog_service.py @@ -44,7 +44,7 @@ def validate_reference_data(cls, data_catalog, cache): if access_rights: for rights_statement_type in access_rights.get('access_type', []): ref_entry = cls.check_ref_data(refdata['access_type'], rights_statement_type['identifier'], - 'data_catalog_json.rights.access_type.identifier', errors) + 'data_catalog_json.access_rights.access_type.identifier', errors) if ref_entry: cls.populate_from_ref_data(ref_entry, rights_statement_type, label_field='pref_label') @@ -52,7 +52,7 @@ def validate_reference_data(cls, data_catalog, cache): license_url = license.get('license', None) ref_entry = cls.check_ref_data(refdata['license'], license['identifier'], - 'data_catalog_json.rights.license.identifier', errors) + 'data_catalog_json.access_rights.license.identifier', errors) if ref_entry: cls.populate_from_ref_data(ref_entry, license, label_field='title') @@ -67,7 +67,7 @@ def validate_reference_data(cls, data_catalog, cache): if 'has_rights_related_agent' in access_rights: for agent in access_rights.get('has_rights_related_agent', []): cls.process_org_obj_against_ref_data(orgdata['organization'], agent, - 'data_catalog_json.rights.has_rights_related_agent') + 'data_catalog_json.access_rights.has_rights_related_agent') publisher = data_catalog.get('publisher', None) if publisher: diff --git a/src/metax_api/services/reference_data_mixin.py b/src/metax_api/services/reference_data_mixin.py index 7f34e302..e466c2a8 100644 --- a/src/metax_api/services/reference_data_mixin.py +++ b/src/metax_api/services/reference_data_mixin.py @@ -88,6 +88,8 @@ def populate_from_ref_data(ref_entry, obj, uri_field='identifier', label_field=N obj[uri_field] = ref_entry['uri'] if label_field and 'label' in ref_entry: obj[label_field] = ref_entry['label'] + if 'scheme' in ref_entry: + obj['in_scheme'] = ref_entry['scheme'] def _raise_reference_data_reload_error(error): """ diff --git a/src/metax_api/tests/api/rest/base/views/datasets/write.py b/src/metax_api/tests/api/rest/base/views/datasets/write.py index 2659d218..831e7cd4 100644 --- a/src/metax_api/tests/api/rest/base/views/datasets/write.py +++ b/src/metax_api/tests/api/rest/base/views/datasets/write.py @@ -956,13 +956,14 @@ def test_create_catalog_record_populate_fields_from_reference_data(self): 'code': entry['code'], 'uri': entry['uri'], 'label': entry.get('label', None), - 'wkt': entry.get('wkt', None) + 'wkt': entry.get('wkt', None), + 'scheme': entry.get('scheme', None) } refs['organization'] = { 'uri': orgdata['organization'][0]['uri'], 'code': orgdata['organization'][0]['code'], - 'label': orgdata['organization'][0]['label'], + 'label': orgdata['organization'][0]['label'] } # replace the relations with objects that have only the identifier set with code as value, @@ -1074,6 +1075,29 @@ def _assert_uri_copied_to_identifier(self, refs, new_rd): self.assertEqual(refs['lifecycle_event']['uri'], new_rd['provenance'][0]['lifecycle_event']['identifier']) self.assertEqual(refs['preservation_event']['uri'], new_rd['provenance'][1]['preservation_event']['identifier']) + def _assert_scheme_copied_to_in_scheme(self, refs, new_rd): + self.assertEqual(refs['keyword']['scheme'], new_rd['theme'][0]['in_scheme']) + self.assertEqual(refs['field_of_science']['scheme'], new_rd['field_of_science'][0]['in_scheme']) + self.assertEqual(refs['language']['scheme'], new_rd['language'][0]['in_scheme']) + self.assertEqual(refs['access_type']['scheme'], new_rd['access_rights']['access_type']['in_scheme']) + self.assertEqual(refs['restriction_grounds']['scheme'], + new_rd['access_rights']['restriction_grounds']['in_scheme']) + self.assertEqual(refs['license']['scheme'], new_rd['access_rights']['license'][0]['in_scheme']) + self.assertEqual(refs['identifier_type']['scheme'], new_rd['other_identifier'][0]['type']['in_scheme']) + self.assertEqual(refs['location']['scheme'], new_rd['spatial'][0]['place_uri']['in_scheme']) + self.assertEqual(refs['file_type']['scheme'], new_rd['files'][0]['file_type']['in_scheme']) + self.assertEqual(refs['use_category']['scheme'], new_rd['files'][0]['use_category']['in_scheme']) + + self.assertEqual(refs['use_category']['scheme'], new_rd['directories'][0]['use_category']['in_scheme']) + self.assertEqual(refs['research_infra']['scheme'], new_rd['infrastructure'][0]['in_scheme']) + self.assertEqual(refs['contributor_role']['scheme'], new_rd['creator'][0]['contributor_role']['in_scheme']) + self.assertEqual(refs['funder_type']['scheme'], new_rd['is_output_of'][0]['funder_type']['in_scheme']) + self.assertEqual(refs['relation_type']['scheme'], new_rd['relation'][0]['relation_type']['in_scheme']) + self.assertEqual(refs['resource_type']['scheme'], new_rd['relation'][0]['entity']['type']['in_scheme']) + self.assertEqual(refs['lifecycle_event']['scheme'], new_rd['provenance'][0]['lifecycle_event']['in_scheme']) + self.assertEqual(refs['preservation_event']['scheme'], + new_rd['provenance'][1]['preservation_event']['in_scheme']) + def _assert_label_copied_to_pref_label(self, refs, new_rd): self.assertEqual(refs['keyword']['label'], new_rd['theme'][0].get('pref_label', None)) self.assertEqual(refs['field_of_science']['label'], new_rd['field_of_science'][0].get('pref_label', None)) diff --git a/src/metax_api/utils/reference_data_loader.py b/src/metax_api/utils/reference_data_loader.py index 5f237e64..bf41b7bf 100644 --- a/src/metax_api/utils/reference_data_loader.py +++ b/src/metax_api/utils/reference_data_loader.py @@ -99,11 +99,15 @@ def _fetch_reference_data(cls, settings): index_name, type_name, row)) label = row['_source'].get('label', None) + scheme = row['_source'].get('scheme', None) # dont want empty dicts loitering in the cache if label: entry['label'] = label + if scheme: + entry['scheme'] = scheme + if type_name == 'location': entry['wkt'] = row['_source'].get('wkt', None)