Skip to content

Commit

Permalink
Possibility to express arbitrary properties (precisely)
Browse files Browse the repository at this point in the history
This is simply using a basic implementation of `rdfs:Property`.

This document

```yaml
name: growing-dataset
properties:
  - type: http://purl.obolibrary.org/obo/NCIT_C90437
    label: Planned Number of Female Subjects
    range: xsd:nonNegativeInteger
    value: 54
```

will translate to this set of triples (blank node identifiers shortened)

```ntriples
OBJ0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://concepts.datalad.org/ontology/DatasetVersionObject> .
OBJ0 <https://concepts.datalad.org/ontology/name> "growing-dataset" .
OBJ0 <http://www.w3.org/2000/01/rdf-schema#property> OBJ1 .
OBJ1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Property> .
OBJ1 <http://www.w3.org/2000/01/rdf-schema#type> "http://purl.obolibrary.org/obo/NCIT_C90437"^^<http://www.w3.org/2001/XMLSchema#anyURI> .
OBJ1 <http://www.w3.org/2000/01/rdf-schema#value> "54" .
OBJ1 <http://www.w3.org/2000/01/rdf-schema#label> "Planned Number of Female Subjects" .
OBJ1 <http://www.w3.org/2000/01/rdf-schema#range> "xsd:nonNegativeInteger"^^<http://www.w3.org/2001/XMLSchema#anyURI> .
```
  • Loading branch information
mih committed Mar 13, 2024
1 parent fc2ebcd commit 8b39663
Show file tree
Hide file tree
Showing 12 changed files with 233 additions and 98 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"properties": [
{
"label": "Planned Number of Female Subjects",
"range": "xsd:nonNegativeInteger",
"type": "http://purl.obolibrary.org/obo/NCIT_C90437",
"value": [
"54"
]
}
],
"name": "growing-dataset",
"@type": "DatasetVersionObject"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: growing-dataset
properties:
- type: http://purl.obolibrary.org/obo/NCIT_C90437
label: Planned Number of Female Subjects
range: xsd:nonNegativeInteger
value: 54
108 changes: 108 additions & 0 deletions src/examples/dataset-version/DatasetVersionObject-dats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"properties": [
{
"label": "Total number of sessions",
"value": [
"521"
]
},
{
"label": "logo",
"value": [
"logo.png"
]
},
{
"label": "CONP_status",
"value": [
"CONP"
]
},
{
"label": "files",
"value": [
"3771"
]
},
{
"label": "subjects",
"type": "http://purl.obolibrary.org/obo/NCIT_C98703",
"value": [
"1"
]
},
{
"label": "origin_consortium",
"value": [
"IBIS"
]
},
{
"label": "origin_institution",
"value": [
"McGill Centre for Integrative Neuroscience"
]
},
{
"label": "origin_city",
"value": [
"Montreal"
]
},
{
"label": "origin_province",
"value": [
"Quebec"
]
},
{
"label": "origin_country",
"type": "http://purl.obolibrary.org/obo/HSO_0000360",
"value": [
"Canada"
]
}
],
"license": "licenses:CC-BY-ND-4.0",
"was_attributed_to": [
{
"meta_code": "MCIN",
"meta_type": "dlco:OrganizationObject",
"name": "McGill Center for Integrative Neuroscience"
},
{
"meta_code": "ACEvans",
"meta_type": "dlco:ResearchContributorObject",
"name": "Alan C. Evans"
}
],
"was_generated_by": [
{
"at_location": {
"name": "North America",
"description": "13 scanners in 6 sites across North America"
},
"started_at": "2008-04-25T00:00:00",
"ended_at": "2019-04-15T00:00:00"
}
],
"qualified_attribution": [
{
"agent": "ACEvans",
"had_role": [
"marcrel:ccp",
"marcrel:cre",
"marcrel:ldr",
"marcrel:rth"
]
}
],
"description": "Longitudinal brain scans of a single human phantom acquired on multiple MRI devices across North America over a period of 11 years. In addition to the human brain images, lego phantom scans have been acquired in parallel for quality assessments over time across sites.",
"keyword": [
"phantom",
"MRI"
],
"title": "Multicenter Single Subject Human MRI Phantom",
"version": "2.0",
"@type": "DatasetVersionObject"
}
110 changes: 25 additions & 85 deletions src/examples/dataset-version/DatasetVersionObject-dats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ was_generated_by:
ended_at: "2019-04-15T00:00:00"
at_location:
name: North America
description: 13 scanners in 6 sites accross North America
description: 13 scanners in 6 sites across North America
was_attributed_to:
- meta_type: dlco:OrganizationObject
meta_code: MCIN
Expand All @@ -29,7 +29,7 @@ qualified_attribution:
- marcrel:ccp
# creator
- marcrel:cre
# laboratory dirctor
# laboratory director
- marcrel:ldr
# research team head
- marcrel:rth
Expand Down Expand Up @@ -124,86 +124,26 @@ license: licenses:CC-BY-ND-4.0
keyword:
- phantom
- MRI
# "extraProperties": [
# {
# "category": "Total number of sessions",
# "values": [
# {
# "value": "521"
# }
# ]
# },
# {
# "category": "logo",
# "values": [
# {
# "value": "logo.png"
# }
# ]
# },
# {
# "category": "CONP_status",
# "values": [
# {
# "value": "CONP"
# }
# ]
# },
# {
# "category": "files",
# "values": [
# {
# "value": "3771"
# }
# ]
# },
# {
# "category": "subjects",
# "values": [
# {
# "value": "1"
# }
# ]
# },
# {
# "category": "origin_consortium",
# "values": [
# {
# "value": "IBIS"
# }
# ]
# },
# {
# "category": "origin_institution",
# "values": [
# {
# "value": "McGill Centre for Integrative Neuroscience"
# }
# ]
# },
# {
# "category": "origin_city",
# "values": [
# {
# "value": "Montreal"
# }
# ]
# },
# {
# "category": "origin_province",
# "values": [
# {
# "value": "Quebec"
# }
# ]
# },
# {
# "category": "origin_country",
# "values": [
# {
# "value": "Canada"
# }
# ]
# }
# ]

properties:
- label: Total number of sessions
value: 521
- label: logo
value: logo.png
- label: CONP_status
value: CONP
- label: files
value: 3771
- label: subjects
type: http://purl.obolibrary.org/obo/NCIT_C98703
value: 1
- label: origin_consortium
value: IBIS
- label: origin_institution
value: McGill Centre for Integrative Neuroscience
- label: origin_city
value: Montreal
- label: origin_province
value: Quebec
- label: origin_country
type: http://purl.obolibrary.org/obo/HSO_0000360
value: Canada
4 changes: 2 additions & 2 deletions src/linkml/ontology/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prefixes:
linkml: https://w3id.org/linkml/
iao: http://purl.obolibrary.org/obo/
pav: http://purl.org/pav/
rdfs: http://www.w3.org/2000/01/rdf-schema#
RDFS: http://www.w3.org/2000/01/rdf-schema#
schema: http://schema.org/
sio: http://semanticscience.org/resource/
spdx: http://spdx.org/rdf/terms#
Expand Down Expand Up @@ -93,7 +93,7 @@ slots:
slot_uri: dlco:name
description: Name of an item or entity.
exact_mappings:
- rdfs:label
- RDFS:label
- schema:name
- foaf:name
range: string
Expand Down
2 changes: 1 addition & 1 deletion src/linkml/ontology/datalad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >
prefixes:
dlco: https://concepts.datalad.org/ontology/
dcterms: http://purl.org/dc/terms/
rdfs: http://www.w3.org/2000/01/rdf-schema#
RDFS: http://www.w3.org/2000/01/rdf-schema#
imports:
- ../ontology/datasets
- ../ontology/git
Expand Down
9 changes: 0 additions & 9 deletions src/linkml/ontology/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ slots:
todos:
- Rename to `named_part`? See also todo for `QualifiedPart`

type:
slot_uri: dlco:type
description: >-
The nature of the resource.
range: string
exact_mappings:
- dcterms:type

keyword:
slot_uri: dlco:keyword
description: >-
Expand Down Expand Up @@ -186,7 +178,6 @@ classes:
- qualified_part
- relation
- title
- type
- version
- was_attributed_to
- was_generated_by
Expand Down
2 changes: 1 addition & 1 deletion src/linkml/ontology/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ prefixes:
dlco: https://concepts.datalad.org/ontology/
linkml: https://w3id.org/linkml/
iao: http://purl.obolibrary.org/obo/
rdfs: http://www.w3.org/2000/01/rdf-schema#
RDFS: http://www.w3.org/2000/01/rdf-schema#
schema: http://schema.org/
spdx: http://spdx.org/rdf/terms#
reproduceme: https://w3id.org/reproduceme#
Expand Down
67 changes: 67 additions & 0 deletions src/linkml/ontology/rdfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
id: https://concepts.datalad.org/ontology/rdfs
name: meta_utils
title: RDFS elements
description: >-
TODO
prefixes:
RDFS: http://www.w3.org/2000/01/rdf-schema#
emit_prefixes:
- RDFS
imports:
- ../ontology/types


slots:
comment:
slot_uri: RDFS:comment
description: >-
A human-readable description.
range: string

label:
slot_uri: RDFS:label
description: >-
A human-readable version of a resource's name.
range: string

range:
slot_uri: RDFS:range
description: >-
State that the values of a property are instances a class.
range: uriorcurie

type:
slot_uri: RDFS:type
description: >-
State that the subject is an instance of a class.
range: uriorcurie

value:
slot_uri: RDFS:value
description: >-
Value of a resource.
range: string
multivalued: true
relational_role: OBJECT

properties:
slot_uri: RDFS:property
description: >-
Container for arbitrary (extra) properties that are not covered by
other dedicated properties.
range: Property
multivalued: true
relational_role: PREDICATE


classes:
Property:
class_uri: RDFS:Property
description: >-
RDFS based class to describe arbitrary properties.
slots:
- comment
- label
- range
- type
- value
Loading

0 comments on commit 8b39663

Please sign in to comment.