Skip to content

Commit

Permalink
Merge pull request #54 from psychoinformatics-de/rf-49
Browse files Browse the repository at this point in the history
Various concept simplifications
  • Loading branch information
mih authored Feb 26, 2024
2 parents 4085e11 + 2afc2ce commit 41dc75e
Show file tree
Hide file tree
Showing 16 changed files with 267 additions and 145 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ convert-examples-%: src/linkml/schemas/%.yaml src/examples/%
linkml-convert \
-s "$<" \
--target-class-from-path \
--infer \
-t "$$outf" \
"$$ex" \
> $${ex%.yaml}.$${outf}.tmp && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"meta_id": "gitsha:558275f650574389dcbbf7cd8ab5046482473fc8",
"meta_type": "dlccs:DataladDatasetVersionSE",
"gitsha": "558275f650574389dcbbf7cd8ab5046482473fc8",
"distribution": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"is_version_of": "datalad:0b76362c-aa27-11ee-be29-b3b123281259",
"tree": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"was_generated_by": {
"was_associated_with": {
"name": "Jane Doe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ components:
meta_type: dlccs:DataladDatasetVersionSE
gitsha: 558275f650574389dcbbf7cd8ab5046482473fc8
is_version_of: datalad:0b76362c-aa27-11ee-be29-b3b123281259
tree: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
was_generated_by:
was_associated_with:
name: Jane Doe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,60 @@
"meta_id": "gitsha:558275f650574389dcbbf7cd8ab5046482473fc8",
"meta_type": "dlccs:DataladDatasetVersionSE",
"gitsha": "558275f650574389dcbbf7cd8ab5046482473fc8",
"distribution": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"has_annex_remote": [
"annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf"
],
"has_part": [
"gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"gitsha:56094a33cf330fef5b375aa813fc4dc07147729f"
],
"is_version_of": "datalad:0b76362c-aa27-11ee-be29-b3b123281259",
"qualified_part": [
{
"relation": "gitsha:56094a33cf330fef5b375aa813fc4dc07147729f",
"at_location": "subdir/README.txt"
},
{
"relation": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"at_location": "subdir/data.bin"
}
],
"tree": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"was_generated_by": {
"was_associated_with": {
"name": "Jane Doe",
"email": "[email protected]"
}
}
},
{
"meta_id": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"meta_type": "dlccs:GitTreeSE",
"gitsha": "712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"qualified_part": [
{
"relation": "gitsha:13ffd94a94e32f9482528fc65d59562b011f6f87",
"name": "subdir"
}
]
},
{
"meta_id": "gitsha:13ffd94a94e32f9482528fc65d59562b011f6f87",
"meta_type": "dlccs:GitTreeSE",
"gitsha": "13ffd94a94e32f9482528fc65d59562b011f6f87",
"qualified_part": [
{
"relation": "annexkey:MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin",
"name": "data.bin"
},
{
"relation": "gitsha:56094a33cf330fef5b375aa813fc4dc07147729f",
"name": "README.txt"
}
]
},
{
"meta_id": "gitsha:56094a33cf330fef5b375aa813fc4dc07147729f",
"meta_type": "dlccs:GitBlobSE",
"gitsha": "56094a33cf330fef5b375aa813fc4dc07147729f"
},
{
"meta_id": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"meta_type": "dlccs:AnnexedFileSE",
"gitsha": "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"distribution": {
"qualified_access": [
{
"relation": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"access_id": "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt"
}
],
"byte_size": 3425
}
"meta_id": "annexkey:MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin",
"meta_type": "dlccs:StableAnnexKeySE",
"qualified_access": [
{
"relation": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"access_id": "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin"
}
],
"byte_size": 3425
},
{
"meta_id": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,43 @@ components:
- meta_id: gitsha:558275f650574389dcbbf7cd8ab5046482473fc8
meta_type: dlccs:DataladDatasetVersionSE
gitsha: 558275f650574389dcbbf7cd8ab5046482473fc8
tree: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
was_generated_by:
was_associated_with:
name: Jane Doe
email: [email protected]
is_version_of: datalad:0b76362c-aa27-11ee-be29-b3b123281259
has_annex_remote:
- annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
has_part:
# could link an entire tree as one part, which would have parts
# of its own
# such a tree would also need to support `qualified_part`
- gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
- gitsha:56094a33cf330fef5b375aa813fc4dc07147729f
# root tree of dataset version
- meta_id: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
meta_type: dlccs:GitTreeSE
gitsha: 712f54082540c4f07f4f18e50fcd47e2ae9b95ed
qualified_part:
- at_location: subdir/README.txt
- name: subdir
relation: gitsha:13ffd94a94e32f9482528fc65d59562b011f6f87
# subdir tree of dataset version
- meta_id: gitsha:13ffd94a94e32f9482528fc65d59562b011f6f87
meta_type: dlccs:GitTreeSE
gitsha: 13ffd94a94e32f9482528fc65d59562b011f6f87
qualified_part:
- name: data.bin
relation: annexkey:MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin
- name: README.txt
relation: gitsha:56094a33cf330fef5b375aa813fc4dc07147729f
- at_location: subdir/data.bin
relation: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
# git blob
- meta_id: gitsha:56094a33cf330fef5b375aa813fc4dc07147729f
meta_type: dlccs:GitBlobSE
gitsha: 56094a33cf330fef5b375aa813fc4dc07147729f
# annexed file
- meta_id: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
meta_type: dlccs:AnnexedFileSE
gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
distribution:
byte_size: 3425
qualified_access:
- access_id: MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt
relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
- meta_id: annexkey:MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin
meta_type: dlccs:StableAnnexKeySE
byte_size: 3425
qualified_access:
# TODO access_id is not needed in most cases, should likely
# because some kind of `STATE` report
- access_id: MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.bin
relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
# annex remote
- meta_id: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
meta_type: dlccs:AnnexRemoteSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"components": [
{
"meta_id": "gitsha:558275f650574389dcbbf7cd8ab5046482473fc8",
"meta_type": "dlccs:DataladDatasetVersionSE",
"gitsha": "558275f650574389dcbbf7cd8ab5046482473fc8",
"distribution": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"has_part": [
"gitsha:d956832059a7837ad31e60a84ec1399b3460e0e3"
],
"tree": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"was_generated_by": {
"was_associated_with": {
"name": "Jane Doe",
"email": "[email protected]"
}
}
},
{
"meta_id": "gitsha:d956832059a7837ad31e60a84ec1399b3460e0e3",
"meta_type": "dlccs:DataladDatasetVersionSE",
"gitsha": "d956832059a7837ad31e60a84ec1399b3460e0e3",
"distribution": "gitsha:0dc0410fd3328c608ca8d89802fb0f9f4a84abf9",
"tree": "gitsha:0dc0410fd3328c608ca8d89802fb0f9f4a84abf9",
"was_generated_by": {
"was_associated_with": {
"name": "John Doe",
"email": "[email protected]"
}
}
},
{
"meta_id": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"meta_type": "dlccs:GitTreeSE",
"gitsha": "712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"qualified_part": [
{
"relation": "gitsha:0dc0410fd3328c608ca8d89802fb0f9f4a84abf9",
"name": "subds"
}
]
}
],
"@type": "ContainerSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
components:
# (super)dataset version
- meta_id: gitsha:558275f650574389dcbbf7cd8ab5046482473fc8
meta_type: dlccs:DataladDatasetVersionSE
gitsha: 558275f650574389dcbbf7cd8ab5046482473fc8
tree: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
has_part:
# the DataladDatasetVersion instance is the part
- gitsha:d956832059a7837ad31e60a84ec1399b3460e0e3
was_generated_by:
was_associated_with:
name: Jane Doe
email: [email protected]
# (sub)dataset version
- meta_id: gitsha:d956832059a7837ad31e60a84ec1399b3460e0e3
meta_type: dlccs:DataladDatasetVersionSE
gitsha: d956832059a7837ad31e60a84ec1399b3460e0e3
tree: gitsha:0dc0410fd3328c608ca8d89802fb0f9f4a84abf9
was_generated_by:
was_associated_with:
name: John Doe
email: [email protected]
# root tree of (super)dataset version
- meta_id: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
meta_type: dlccs:GitTreeSE
gitsha: 712f54082540c4f07f4f18e50fcd47e2ae9b95ed
qualified_part:
- name: subds
# link (sub)dataset version tree directly
relation: gitsha:0dc0410fd3328c608ca8d89802fb0f9f4a84abf9
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"meta_id": "gitsha:558275f650574389dcbbf7cd8ab5046482473fc8",
"meta_type": "dlccs:DataladDatasetVersionSE",
"gitsha": "558275f650574389dcbbf7cd8ab5046482473fc8",
"distribution": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"tree": "gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed",
"was_derived_from": [
"gitsha:a52963ce19a3e3628e9976555ffc8c422b29f054"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gitsha: 558275f650574389dcbbf7cd8ab5046482473fc8
description: >
This message describes the changes done for this particular
Dataset version.
tree: gitsha:712f54082540c4f07f4f18e50fcd47e2ae9b95ed
was_derived_from:
- gitsha:a52963ce19a3e3628e9976555ffc8c422b29f054
was_generated_by:
Expand Down
3 changes: 3 additions & 0 deletions src/linkml/ontology/datalad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ classes:
slots:
- has_annex_remote
slot_usage:
distribution:
range: FilesystemDirectory
equals_expression: "{tree}"
is_version_of:
range: DataladDataset
todos:
Expand Down
71 changes: 31 additions & 40 deletions src/linkml/ontology/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ classes:
inlined_as_list: true
type:
description: >-
Type of resource, e.g. `Dataset`, `Directory`, or `File`.
Type of resource, e.g. `Dataset`.
QualifiedAccess:
description: >-
Expand All @@ -153,15 +153,12 @@ classes:
broad_mappings:
- DCAT:Relationship
slots:
- name
- relation
- at_location
slot_usage:
at_location:
name:
description: >-
The relative location of the part within the containing entity.
range: PosixRelPath
relation:
range: Resource
The name of the part within the containing entity.
comments:
- This class is a key element of the data model. It enables referencing
a particular resource (e.g., a file's content, or versioned directory
Expand All @@ -185,39 +182,6 @@ classes:
- distribution
- is_version_of

Directory:
is_a: Resource
description: >-
Cataloging structure which contains references to other files,
and possibly other directories (or datasets).
exact_mappings:
- ncit:NCIT_C62486
broad_mappings:
- ncit:NCIT_C49057
narrow_mappings:
- ncit:NCIT_C172256

File:
mixin: true
is_a: Resource
description: >-
Resource for storing information, which is available to a computer
program and is usually based on some kind of durable storage.
A file is a conceptual entity, and can be represented by one or more
distributions that serialize the file for transfer. Distributions of
a file can be provided via data services.
slots:
- distribution
exact_mappings:
- afo:AFR_0000639
comments:
- Being a conceptual entity, this class does not include properties
for exact identification of a file's content. This is the domain
of a `Distribution`.
- It would make sense to avoid assigning a global identifier to an
instance of this class and instead specify inline within its
immediate context (e.g., a `QualifiedPart` of another `Resource`).

Distribution:
mixin: true
description: >-
Expand All @@ -235,6 +199,33 @@ classes:
Compared to `DCAT:Distribution` this class has a `qualified_access`
property to enable the specification of access-related parameters
that cannot be inferred from a standard `DCAT:Distribution`.
todos:
- Now that there is a `Directory` subclass, re-evaluate the utility
of the `checksum` property at this level.

FilesystemDirectory:
mixin: true
is_a: Distribution
description: >-
Filesystem structure which contains references to files,
or other directories.
slots:
- qualified_part
slot_usage:
qualified_part:
range: FilesystemDirectoryItem
exact_mappings:
- ncit:NCIT_C62486
broad_mappings:
- ncit:NCIT_C49057
narrow_mappings:
- ncit:NCIT_C172256

FilesystemDirectoryItem:
mixin: true
is_a: QualifiedPart
description: >-
Named reference of a content item in the context of a `FilesystemDirectory`
DataService:
class_uri: dlco:DataService
Expand Down
Loading

0 comments on commit 41dc75e

Please sign in to comment.