From ddfcf7abbab5862d561b51b412da517e1dd94317 Mon Sep 17 00:00:00 2001 From: Nick Juty <3739470+nsjuty@users.noreply.github.com> Date: Thu, 6 Apr 2023 16:45:01 +0100 Subject: [PATCH 1/4] Add files via upload - added sameAs - removed irrelevant text from description field --- Sample/jsonld/Sample_v0.3-DRAFT.jsonld | 546 +++++++++++++++++++++++++ 1 file changed, 546 insertions(+) create mode 100644 Sample/jsonld/Sample_v0.3-DRAFT.jsonld diff --git a/Sample/jsonld/Sample_v0.3-DRAFT.jsonld b/Sample/jsonld/Sample_v0.3-DRAFT.jsonld new file mode 100644 index 0000000..4ff6205 --- /dev/null +++ b/Sample/jsonld/Sample_v0.3-DRAFT.jsonld @@ -0,0 +1,546 @@ +{ + "@context": { + "schema": "http://schema.org/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "extendSample": "https://discovery.biothings.io/view/extendSample/", + "bioschemas": "https://discovery.biothings.io/view/bioschemas/" + }, + "@graph": [ + { + "@id": "extendSample:Sample", + "@type": "rdfs:Class", + "rdfs:comment": "To deliver on the identified use cases for samples, we have identified a minimal set of properties to encapsulate identification, linking, and metadata descriptions. Some of these properties are existing standard schema.org properties, others require Bioschemas extensions. \n\nv0.3-DRAFT\n\nSummary of change\n- added sameAs\n- modified by Nick and Ginger\n- removed irrelevant text from description", + "rdfs:label": "Sample", + "rdfs:subClassOf": { + "@id": "bioschemas:Sample" + }, + "$validation": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "additionalProperty": { + "description": "A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ", + "oneOf": [ + { + "@type": "PropertyValue", + "optional": [ + "unitCode", + "unitText" + ], + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "format": "uri", + "type": "string" + } + ] + }, + "unitText": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "valueReference": { + "oneOf": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + }, + { + "items": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + } + ], + "type": "array" + } + ] + } + }, + "recommended": [ + "valueReference" + ], + "required": [ + "name", + "value" + ], + "type": "object" + }, + { + "items": { + "@type": "PropertyValue", + "optional": [ + "unitCode", + "unitText" + ], + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "format": "uri", + "type": "string" + } + ] + }, + "unitText": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "valueReference": { + "oneOf": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + }, + { + "items": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + } + ], + "type": "array" + } + ] + } + }, + "recommended": [ + "valueReference" + ], + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + } + ], + "owl:cardinality": "many" + }, + "description": { + "description": "A description of the item.", + "owl:cardinality": "one", + "type": "string" + }, + "identifier": { + "description": "The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.\n ", + "anyOf": [ + { + "@type": "PropertyValue", + "optional": [ + "unitCode", + "unitText" + ], + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "format": "uri", + "type": "string" + } + ] + }, + "unitText": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "valueReference": { + "oneOf": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + }, + { + "items": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + } + ], + "type": "array" + } + ] + } + }, + "recommended": [ + "valueReference" + ], + "required": [ + "name", + "value" + ], + "type": "object" + }, + { + "items": { + "@type": "PropertyValue", + "optional": [ + "unitCode", + "unitText" + ], + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "format": "uri", + "type": "string" + } + ] + }, + "unitText": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "valueReference": { + "oneOf": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + }, + { + "items": [ + { + "@type": "CategoryCode", + "properties": { + "codeValue": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ], + "type": "object" + } + ], + "type": "array" + } + ] + } + }, + "recommended": [ + "valueReference" + ], + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "format": "uri", + "type": "string" + }, + { + "items": { + "format": "uri", + "type": "string" + }, + "type": "array" + } + ], + "owl:cardinality": "many" + }, + "name": { + "description": "The name of the item.", + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "owl:cardinality": "many" + }, + "sameAs": { + "description": "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.", + "owl:cardinality": "many" + }, + "subjectOf": { + "description": "A CreativeWork or Event about this Thing.", + "oneOf": [ + { + "@type": "CreativeWork", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + { + "items": { + "@type": "CreativeWork", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + } + ], + "owl:cardinality": "many" + }, + "url": { + "description": "URL of the item.", + "format": "uri", + "owl:cardinality": "one", + "type": "string" + } + }, + "required": [ + "identifier" + ], + "recommended": [ + "sameAs", + "url" + ], + "optional": [ + "additionalProperty", + "description", + "name", + "subjectOf" + ] + } + } + ] +} \ No newline at end of file From 470edebbc1fdf671b5c69e6c9d54dc2e27711b9d Mon Sep 17 00:00:00 2001 From: gtsueng Date: Thu, 6 Apr 2023 10:22:15 -0700 Subject: [PATCH 2/4] Update and rename Sample_v0.3-DRAFT.jsonld to Sample_v0.3-DRAFT.json Fix parent class, formatting of summary of changes, add validation rules --- ....3-DRAFT.jsonld => Sample_v0.3-DRAFT.json} | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) rename Sample/jsonld/{Sample_v0.3-DRAFT.jsonld => Sample_v0.3-DRAFT.json} (95%) diff --git a/Sample/jsonld/Sample_v0.3-DRAFT.jsonld b/Sample/jsonld/Sample_v0.3-DRAFT.json similarity index 95% rename from Sample/jsonld/Sample_v0.3-DRAFT.jsonld rename to Sample/jsonld/Sample_v0.3-DRAFT.json index 4ff6205..ee397b1 100644 --- a/Sample/jsonld/Sample_v0.3-DRAFT.jsonld +++ b/Sample/jsonld/Sample_v0.3-DRAFT.json @@ -3,17 +3,18 @@ "schema": "http://schema.org/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "extendSample": "https://discovery.biothings.io/view/extendSample/", + "bioschemasdrafts": "https://discovery.biothings.io/view/bioschemasdrafts/", + "bioschemastypesdrafts": "https://discovery.biothings.io/view/bioschemastypesdrafts, "bioschemas": "https://discovery.biothings.io/view/bioschemas/" }, "@graph": [ { - "@id": "extendSample:Sample", + "@id": "bioschemasdrafts:Sample", "@type": "rdfs:Class", - "rdfs:comment": "To deliver on the identified use cases for samples, we have identified a minimal set of properties to encapsulate identification, linking, and metadata descriptions. Some of these properties are existing standard schema.org properties, others require Bioschemas extensions. \n\nv0.3-DRAFT\n\nSummary of change\n- added sameAs\n- modified by Nick and Ginger\n- removed irrelevant text from description", + "rdfs:comment": "To deliver on the identified use cases for samples, we have identified a minimal set of properties to encapsulate identification, linking, and metadata descriptions. Some of these properties are existing standard schema.org properties, others require Bioschemas extensions. Version 0.3-DRAFT

Summary of Changes

Changes since 0.2-DRAFT", "rdfs:label": "Sample", "rdfs:subClassOf": { - "@id": "bioschemas:Sample" + "@id": "bioschemastypesdrafts:Sample" }, "$validation": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -475,7 +476,20 @@ }, "sameAs": { "description": "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.", - "owl:cardinality": "many" + "owl:cardinality": "many", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] }, "subjectOf": { "description": "A CreativeWork or Event about this Thing.", @@ -543,4 +557,4 @@ } } ] -} \ No newline at end of file +} From e75a5836215e724505bd19f44e3d882fb9532082 Mon Sep 17 00:00:00 2001 From: gtsueng Date: Thu, 6 Apr 2023 10:22:41 -0700 Subject: [PATCH 3/4] Update Sample_v0.3-DRAFT.json fix typo --- Sample/jsonld/Sample_v0.3-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sample/jsonld/Sample_v0.3-DRAFT.json b/Sample/jsonld/Sample_v0.3-DRAFT.json index ee397b1..541f703 100644 --- a/Sample/jsonld/Sample_v0.3-DRAFT.json +++ b/Sample/jsonld/Sample_v0.3-DRAFT.json @@ -4,7 +4,7 @@ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "bioschemasdrafts": "https://discovery.biothings.io/view/bioschemasdrafts/", - "bioschemastypesdrafts": "https://discovery.biothings.io/view/bioschemastypesdrafts, + "bioschemastypesdrafts": "https://discovery.biothings.io/view/bioschemastypesdrafts", "bioschemas": "https://discovery.biothings.io/view/bioschemas/" }, "@graph": [ From bec3a22a12c89999729e1f3f513a2084da21334a Mon Sep 17 00:00:00 2001 From: gtsueng Date: Thu, 6 Apr 2023 10:27:21 -0700 Subject: [PATCH 4/4] Update Sample_v0.3-DRAFT.json --- Sample/jsonld/Sample_v0.3-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sample/jsonld/Sample_v0.3-DRAFT.json b/Sample/jsonld/Sample_v0.3-DRAFT.json index 541f703..df8fb95 100644 --- a/Sample/jsonld/Sample_v0.3-DRAFT.json +++ b/Sample/jsonld/Sample_v0.3-DRAFT.json @@ -4,7 +4,7 @@ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "bioschemasdrafts": "https://discovery.biothings.io/view/bioschemasdrafts/", - "bioschemastypesdrafts": "https://discovery.biothings.io/view/bioschemastypesdrafts", + "bioschemastypesdrafts": "https://discovery.biothings.io/view/bioschemastypesdrafts/", "bioschemas": "https://discovery.biothings.io/view/bioschemas/" }, "@graph": [