forked from enola-dev/enola
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (modl): Very first initial use of LinkML! (see enola-dev#757)
- Loading branch information
Showing
10 changed files
with
189 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright 2024 The Enola <https://enola.dev> Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# https://linkml.io/linkml/schemas/linter.html | ||
extends: recommended | ||
|
||
rules: | ||
# TODO https://github.com/linkml/prefixmaps/issues/73 | ||
canonical_prefixes: | ||
level: disabled | ||
|
||
no_empty_title: | ||
# name becomes title, if no title; that's fine | ||
level: disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright 2024 The Enola <https://enola.dev> Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
id: https://enola.dev/ontology | ||
name: Enola | ||
created_by: https://www.vorburger.ch | ||
license: ASL | ||
prefixes: | ||
enola: https://enola.dev/ | ||
linkml: https://w3id.org/linkml/ | ||
# TODO schema: https://schema.org/ | ||
imports: | ||
- linkml:types | ||
default_range: string | ||
default_prefix: enola | ||
|
||
# TODO Shouldn't (can't) [all] slot_uri be automatically inferred?! | ||
|
||
types: | ||
GKG: | ||
description: | ||
ID in Google's Public Knowledge Graph (formerly AKA Freebase), see e.g. | ||
https://developers.google.com/knowledge-graph/; starts without slash, but with 'm' or 'g' following by a slash and | ||
lower case characters, numbers and underscores. | ||
uri: https://enola.dev/GKG | ||
base: string | ||
examples: | ||
- value: g/11bwcf511s | ||
description: Alphabet Inc. | ||
object: https://g.co/kg/g/11bwcf511s | ||
|
||
slots: | ||
url: | ||
description: | ||
URL of this Thing (to be typed into a web browser, for a human to look at HTML). Not to be confused with each | ||
Thing's IRI Identity! | ||
# TODO range: GKG # TODO Replace *WRONG* local DataType GKG from initial testing with schema:url, once that works... | ||
|
||
wikipedia: | ||
description: Wikipedia EN page ID (not URL), e.g. 'Wikipedia' (for https://en.wikipedia.org/wiki/Wikipedia) | ||
slot_uri: https://enola.dev/wikipedia | ||
pattern: "^[a-zA-Z0-9_]+$" | ||
# TODO How-to? schema:image <https://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg> | ||
# TODO How-to? schema:url "https://en.wikipedia.org/wiki/{VALUE}"^^enola:IRITemplate | ||
# for https://docs.enola.dev/models/example.org/templates/ | ||
|
||
classes: | ||
Software: | ||
description: | ||
Parent (abstract) Class for 'soft ware', i.e. 'virtual computer stuff' - you can think of but cannot physically | ||
touch this. | ||
# TODO enola:wikipedia "Software". # https://en.wikipedia.org/wiki/Software | ||
|
||
SoftwareWithURL: | ||
subclass_of: Software | ||
description: | ||
Parent (abstract) Class for a piece of [[Software]] which has a URL that you can type into a web browser to look | ||
at (the UI of) it. | ||
slots: | ||
- url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright 2024 The Enola <https://enola.dev> Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
id: https://enola.dev/Files | ||
name: Files | ||
created_by: https://www.vorburger.ch | ||
license: ASL | ||
prefixes: | ||
enola: https://enola.dev/ | ||
linkml: https://w3id.org/linkml/ | ||
xsd: http://www.w3.org/2001/XMLSchema# | ||
imports: | ||
- enola.linkml | ||
- linkml:types | ||
|
||
slots: | ||
# TODO Are names adjusted in generation? https://linkml.io/linkml/schemas/linter.html#standard-naming | ||
parent_folder: | ||
description: Parent Folder which this File or Folder is in. | ||
# TODO subproperty_of: parent | ||
range: Folder | ||
|
||
classes: | ||
File: | ||
description: File holds [[Data]], identified by a [[Path]] on a [[Filesystem]], with a [[MediaType]]. | ||
subclass_of: SoftwareWithURL | ||
slots: | ||
- parent_folder | ||
attributes: | ||
size: | ||
description: Number of bytes of data. | ||
range: integer # TODO xsd:unsignedLong | ||
examples: | ||
- value: https://enola.dev/file/localhost/tmp/example.txt | ||
# TODO enola:iriTemplate "https://enola.dev/file/{FILESYSTEM}/{PATH}"; | ||
# TODO enola:filesystem "fs:{FILESYSTEM}"^^enola:IRITemplate; | ||
# TODO enola:wikipedia "Computer_file"; # https://en.wikipedia.org/wiki/Computer_file | ||
# TODO enola:emoji "🗎". | ||
|
||
Folder: | ||
description: Folder is a [[Container]] of other Folders and [[File]]s. | ||
subclass_of: SoftwareWithURL | ||
slots: | ||
- parent_folder | ||
# TODO enola:wikipedia "Directory_(computing)"; # https://en.wikipedia.org/wiki/Directory_(computing) | ||
# TODO enola:emoji "📁". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters