Skip to content

Commit

Permalink
Merge pull request #92 from psychoinformatics-de/reorg
Browse files Browse the repository at this point in the history
Establish schema object hierarchy; removed unnecessary class
  • Loading branch information
mih authored Mar 10, 2024
2 parents b5ff7b4 + 3e96df2 commit b26ae9f
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 60 deletions.
2 changes: 1 addition & 1 deletion src/linkml/ontology/datalad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classes:
- has_annex_remote
slot_usage:
distribution:
range: FilesystemDirectory
range: FileContainer
equals_expression: "{tree}"
is_version_of:
range: DataladDataset
Expand Down
19 changes: 8 additions & 11 deletions src/linkml/ontology/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,31 +347,28 @@ classes:
broad_mappings:
- foaf:Document

FilesystemDirectory:
class_uri: dlco:FilesystemDirectory
FileContainer:
class_uri: dlco:FileContainer
mixin: true
is_a: Distribution
description: >-
Filesystem structure which contains references to files,
or other directories.
Container that holds references to files, or other containers.
slots:
- qualified_part
slot_usage:
qualified_part:
range: FilesystemDirectoryItem
exact_mappings:
range: FileContainerItem
close_mappings:
- ncit:NCIT_C62486
broad_mappings:
- ncit:NCIT_C49057
narrow_mappings:
- ncit:NCIT_C172256

FilesystemDirectoryItem:
class_uri: dlco:FilesystemDirectoryItem
FileContainerItem:
class_uri: dlco:FileContainerItem
mixin: true
is_a: QualifiedPart
description: >-
Named reference of a content item in the context of a `FilesystemDirectory`
Named reference of a content item in the context of a `FileContainer`
DataService:
class_uri: dlco:DataService
Expand Down
2 changes: 1 addition & 1 deletion src/linkml/ontology/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ classes:

GitTree:
mixin: true
is_a: FilesystemDirectory
is_a: FileContainer
mixins:
- GitShaIDed
description: >-
Expand Down
64 changes: 59 additions & 5 deletions src/linkml/ontology/schema_objects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ classes:
- HasRequiredMetaTypeDesignator
description: >-
Base class for any recognized metadata object type.
This class should never be used directly, only its subclasses.
DistributionObject:
class_uri: dlco:DistributionObject
is_a: TypedObject
description: >-
Metadata object for a [Distribution](https://concepts.datalad.org/ontology/Distribution).
mixins:
- Distribution
slots:
- meta_code
slot_usage:
has_part:
multivalued: true
range: DistributionObject
license:
range: LicenseDocumentObject

GUIDedTypedObject:
class_uri: dlco:GUIDedTypedObject
Expand Down Expand Up @@ -155,15 +172,15 @@ classes:
slot_usage:
qualified_part:
multivalued: true
range: FilesystemDirectoryItemObject
range: FileContainerItemObject

FilesystemDirectoryItemObject:
class_uri: dlco:FilesystemDirectoryItemObject
FileContainerItemObject:
class_uri: dlco:FileContainerItemObject
is_a: MetadataObject
mixins:
- FilesystemDirectoryItem
- FileContainerItem
description: >-
Metadata object for a [FilesystemDirectoryItem](https://concepts.datalad.org/ontology/FilesystemDirectoryItem).
Metadata object for a [FileContainerItem](https://concepts.datalad.org/ontology/FileContainerItem).
slots:
- relation
slot_usage:
Expand All @@ -172,6 +189,7 @@ classes:
#any_of:
# - range: GitShaIDedObject
# - range: StableAnnexKeyObject
# TODO try making range `DistributionObject`
range: GUIDedTypedObject
todos:
- figure out why a union range specification is not working
Expand Down Expand Up @@ -246,3 +264,39 @@ classes:
qualified_access:
multivalued: true
range: AnnexAccessObject

EntityObject:
class_uri: dlco:EntityObject
is_a: MetadataObject
mixins:
- Entity
slots:
- meta_type
description: >-
Metadata object for a [Entity](https://concepts.datalad.org/ontology/Entity).
GrantObject:
class_uri: dlco:GrantObject
is_a: EntityObject
mixins:
- Grant
description: >-
Metadata object for a [Grant](https://concepts.datalad.org/ontology/Grant).
LicenseDocumentObject:
class_uri: dlco:LicenseDocumentObject
is_a: MetadataObject
mixins:
- LicenseDocument
description: >-
Metadata object for a [LicenseDocument](https://concepts.datalad.org/ontology/LicenseDocument).
slots:
- meta_id

PublicationObject:
class_uri: dlco:PublicationObject
is_a: EntityObject
mixins:
- Publication
description: >-
Metadata object for a [Publication](https://concepts.datalad.org/ontology/Publication).
10 changes: 5 additions & 5 deletions src/linkml/schemas/datalad-dataset-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ classes:
inlined: true
inlined_as_list: true
multivalued: true
range: FilesystemDirectoryItemObject
range: FileContainerItemObject

FilesystemDirectoryItemObject:
class_uri: dlco:FilesystemDirectoryItemObject
FileContainerItemObject:
class_uri: dlco:FileContainerItemObject
is_a: MetadataObject
mixins:
- FilesystemDirectoryItem
- FileContainerItem
description: >-
Metadata object for a `FilesystemDirectoryItem`.
Metadata object for a `FileContainerItem`.
slots:
- relation
slot_usage:
Expand Down
68 changes: 31 additions & 37 deletions src/linkml/schemas/dataset-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,13 @@ classes:
mixins:
- HasRequiredMetaTypeDesignator
description: >-
Base class for any object with a type designator slot. This class
should never be used directly, only its subclasses.
DUIDedTypedObject:
class_uri: dlco:DUIDedTypedObject
is_a: TypedObject
description: >-
Metadata object that is uniquely identified within a
metadata document by some code.
slots:
- meta_code
Schema-specific implementation of [TypedObject](https://concepts.datalad.org/ontology/TypedObject).
DistributionObject:
class_uri: dlco:DistributionObject
is_a: TypedObject
description: >-
TODO
Schema-specific implementation of [Object](https://concepts.datalad.org/ontology/Object).
mixins:
- Distribution
slots:
Expand All @@ -83,10 +73,9 @@ classes:
class_uri: dlco:FileContainerObject
is_a: DistributionObject
mixins:
# this should be FileContainer and a FilesystemDirectory a subclass of it
- FilesystemDirectory
- FileContainer
description: >-
TODO
Schema-specific implementation of [FileContainerObject](https://concepts.datalad.org/ontology/FileContainerObject).
slot_usage:
qualified_part:
multivalued: true
Expand All @@ -96,36 +85,35 @@ classes:

FileContainerItemObject:
class_uri: dlco:FileContainerItemObject
is_a: MetadataObject
mixins:
- QualifiedPart
- FileContainerItem
description: >-
Metadata object for a `QualifiedPart`, where the part is
a `DistributionObject`.
Schema-specific implementation of [FileContainerItemObject](https://concepts.datalad.org/ontology/FileContainerItemObject).
slot_usage:
relation:
inlined: false
range: DistributionObject


DigitalDocumentObject:
class_uri: dlco:DigitalDocumentObject
is_a: DistributionObject
mixins:
- DigitalDocument
description: >-
TODO
Schema-specific implementation of [DigitalDocumentObject](https://concepts.datalad.org/ontology/DigitalDocumentObject).
slot_usage:
license:
inlined: false
range: LicenseDocumentObject


DatasetVersionObject:
class_uri: dlco:DatasetVersionObject
is_a: MetadataObject
mixins:
- Dataset
description: >-
TODO
Schema-specific implementation of [DatasetVersionObject](https://concepts.datalad.org/ontology/DatasetVersionObject).
attributes:
custom_licenses:
multivalued: true
Expand Down Expand Up @@ -171,28 +159,29 @@ classes:

AgentObject:
class_uri: dlco:AgentObject
is_a: MetadataObject
mixins:
- Agent
description: >-
Schema-specific implementation of [AgentObject](https://concepts.datalad.org/ontology/AgentObject).
slots:
- meta_type
description: >-
TODO

PersonObject:
class_uri: dlco:PersonObject
is_a: AgentObject
mixins:
- Person
description: >-
TODO
Schema-specific implementation of [PersonObject](https://concepts.datalad.org/ontology/PersonObject).
ResearchContributorObject:
class_uri: dlco:ResearchContributorObject
is_a: PersonObject
mixins:
- ResearchContributor
description: >-
TODO
Schema-specific implementation of [ResearchContributorObject](https://concepts.datalad.org/ontology/ResearchContributorObject).
slot_usage:
affiliation:
range: OrganizationObject
Expand All @@ -202,27 +191,28 @@ classes:
is_a: AgentObject
mixins:
- Organization
description: >-
Schema-specific implementation of [OrganizationObject](https://concepts.datalad.org/ontology/OrganizationObject).
slots:
- meta_code

description: >-
TODO
EntityObject:
class_uri: dlco:EntityObject
is_a: MetadataObject
mixins:
- Entity
slots:
- meta_type
description: >-
TODO
Schema-specific implementation of [EntityObject](https://concepts.datalad.org/ontology/EntityObject).
AgentRoleObject:
class_uri: dlco:AgentRoleObject
is_a: MetadataObject
mixins:
- Role
description: >-
TODO
Schema-specific implementation of [AgentRoleObject](https://concepts.datalad.org/ontology/AgentRoleObject).
slots:
- meta_id
id_prefixes:
Expand All @@ -239,10 +229,11 @@ classes:

AgentInfluenceObject:
class_uri: dlco:AgentInfluenceObject
is_a: MetadataObject
mixins:
- AgentInfluence
description: >-
TODO
Schema-specific implementation of [AgentInfluenceObject](https://concepts.datalad.org/ontology/AgentInfluenceObject).
slot_usage:
agent:
inlined: true
Expand All @@ -253,10 +244,11 @@ classes:

EntityInfluenceObject:
class_uri: dlco:EntityInfluenceObject
is_a: MetadataObject
mixins:
- EntityInfluence
description: >-
TODO
Schema-specific implementation of [EntityInfluenceObject](https://concepts.datalad.org/ontology/EntityInfluenceObject).
slot_usage:
entity:
inlined: true
Expand All @@ -267,10 +259,11 @@ classes:

EntityRoleObject:
class_uri: dlco:EntityRoleObject
is_a: MetadataObject
mixins:
- Role
description: >-
TODO
Schema-specific implementation of [EntityRoleObject](https://concepts.datalad.org/ontology/EntityRoleObject).
slots:
- meta_id
id_prefixes:
Expand All @@ -288,14 +281,15 @@ classes:
mixins:
- Grant
description: >-
TODO
Schema-specific implementation of [GrantObject](https://concepts.datalad.org/ontology/GrantObject).
LicenseDocumentObject:
class_uri: dlco:LicenseDocumentObject
is_a: MetadataObject
mixins:
- LicenseDocument
description: >-
TODO
Schema-specific implementation of [LicenseDocumentObject](https://concepts.datalad.org/ontology/LicenseDocumentObject).
slots:
- meta_id

Expand All @@ -305,4 +299,4 @@ classes:
mixins:
- Publication
description: >-
TODO
Schema-specific implementation of [PublicationObject](https://concepts.datalad.org/ontology/PublicationObject).

0 comments on commit b26ae9f

Please sign in to comment.