diff --git a/src/examples/datalad-dataset-version-schema/MonolithicDataladDatasetVersion-draft.yaml b/src/examples/datalad-dataset-version-schema/MonolithicDataladDatasetVersion-draft.yaml index 1272a77..75133c5 100644 --- a/src/examples/datalad-dataset-version-schema/MonolithicDataladDatasetVersion-draft.yaml +++ b/src/examples/datalad-dataset-version-schema/MonolithicDataladDatasetVersion-draft.yaml @@ -3,15 +3,18 @@ is_version_of: has_annex_remote: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf: uuid: 7e0bf3e7-7d46-4093-813e-b4009826c3bf +has_part: + gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58: + meta_type: dlco:AnnexedFile + gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 + distribution: + byte_size: 3425 + checksum: + algorithm: md5 + digest: 32a617360d10e3dcbfdd0885e8d64ab8 + qualified_access: + access_id: MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt + relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf qualified_part: - at_location: README.txt - relation: - meta_type: dlco:AnnexedFile - distribution: - byte_size: 3425 - checksum: - algorithm: md5 - digest: 32a617360d10e3dcbfdd0885e8d64ab8 - qualified_access: - access_id: MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt - relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf + # relation: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 diff --git a/src/linkml/datalad-dataset-version-schema.yaml b/src/linkml/datalad-dataset-version-schema.yaml index 348da88..0b8a584 100644 --- a/src/linkml/datalad-dataset-version-schema.yaml +++ b/src/linkml/datalad-dataset-version-schema.yaml @@ -15,6 +15,7 @@ prefixes: DCAT: http://www.w3.org/ns/dcat# dct: http://purl.org/dc/terms/ dlco: https://concepts.datalad.org/ontology/ + gitsha: https://concepts.datalad.org/namespace/gitsha/ prov: http://www.w3.org/ns/prov# spdx: http://spdx.org/rdf/terms# imports: @@ -35,8 +36,18 @@ classes: has_annex_remote: multivalued: true inlined: true + has_part: + range: FileInGit + multivalued: true + inlined: true + inlined_as_list: true is_version_of: inlined: true + qualified_part: + range: QualifiedGitTrackedPart + multivalued: true + inlined: true + inlined_as_list: true comments: - The property `has_annex_remote` is for defining all remotes inline with a meta_id index key, such that they can be referenced in a diff --git a/src/linkml/datasets.yaml b/src/linkml/datasets.yaml index 6732467..083c5f9 100644 --- a/src/linkml/datasets.yaml +++ b/src/linkml/datasets.yaml @@ -118,6 +118,7 @@ classes: slot_usage: has_part: range: Resource + multivalued: true qualified_part: multivalued: true inlined: true diff --git a/src/linkml/git-annex.yaml b/src/linkml/git-annex.yaml index 3a7e00a..eaa11df 100644 --- a/src/linkml/git-annex.yaml +++ b/src/linkml/git-annex.yaml @@ -8,6 +8,7 @@ prefixes: dlco: https://concepts.datalad.org/ontology/ imports: - datasets + - git - properties default_prefix: dlco @@ -42,7 +43,7 @@ classes: range: AnnexRemote AnnexedFile: - is_a: File + is_a: FileInGit description: >- A file in a Git repository that is managed by git-annex. slot_usage: diff --git a/src/linkml/git.yaml b/src/linkml/git.yaml index ae568ab..1cae778 100644 --- a/src/linkml/git.yaml +++ b/src/linkml/git.yaml @@ -7,6 +7,7 @@ prefixes: gitsha: https://concepts.datalad.org/namespace/gitsha/ dlco: https://concepts.datalad.org/ontology/ imports: + - datasets - meta_utils - types default_prefix: dlco @@ -29,6 +30,8 @@ classes: - gitsha - meta_id slot_usage: + gitsha: + required: true meta_id: description: >- SHA1 based identifier in the form of a CURIE with an explicit @@ -39,3 +42,19 @@ classes: - Because there can only be a single main `identifier`, this mixin cannot be used on classes that already have or inherited another property declared as `identifier:true`. + + QualifiedGitTrackedPart: + is_a: QualifiedPart + description: >- + TODO we may need this to make relation point to resources with a + (Git) identifier only, such that we could reference by key + slot_usage: + relation: + range: FileInGit + + FileInGit: + is_a: File + mixins: + - GitTracked + description: >- + A `File` that is tracked with Git.