├── .github
└── workflows
│ ├── build-publish-documentation.yaml
│ ├── codespell.yml
│ ├── main.yaml
│ ├── release.yaml
│ └── validate-yaml-syntax.yaml
├── .gitignore
├── .yamllint-config
├── 404.html
├── CONTRIBUTING.md
├── Makefile
├── README.md
├── about.yaml
├── checkout_outputs.sh
├── examples
├── date-example.yaml
├── dynamic-enums-example.yaml
├── inlining-union-example.yaml
├── path-example.yaml
├── pattern-example.yaml
├── pointer-example.yaml
├── relational-roles-example.yaml
├── rules-example.yaml
├── slot-group-example.yaml
├── structured_alias.yaml
├── unique-key-example.yaml
└── unit-example.yaml
├── gen_project_config.yaml
├── hide_test_changes.sh
├── linkml_model
├── README.md
├── __init__.py
├── annotations.py
├── array.py
├── datasets.py
├── excel
│ └── meta.xlsx
├── extensions.py
├── graphql
│ ├── README.md
│ └── meta.graphql
├── json
│ ├── README.md
│ ├── annotations.json
│ ├── datasets.json
│ ├── extensions.json
│ ├── mappings.json
│ ├── meta.json
│ ├── types.json
│ ├── units.json
│ └── validation.json
├── jsonld
│ ├── README.md
│ ├── annotations.context.jsonld
│ ├── annotations.model.context.jsonld
│ ├── context.jsonld
│ ├── datasets.context.jsonld
│ ├── datasets.model.context.jsonld
│ ├── extensions.context.jsonld
│ ├── extensions.model.context.jsonld
│ ├── mappings.context.jsonld
│ ├── mappings.model.context.jsonld
│ ├── meta.context.jsonld
│ ├── meta.jsonld
│ ├── meta.model.context.jsonld
│ ├── types.context.jsonld
│ ├── types.model.context.jsonld
│ ├── units.context.jsonld
│ ├── units.model.context.jsonld
│ ├── validation.context.jsonld
│ └── validation.model.context.jsonld
├── jsonschema
│ ├── README.md
│ ├── annotations.schema.json
│ ├── datasets.schema.json
│ ├── extensions.schema.json
│ ├── mappings.schema.json
│ ├── meta.schema.json
│ ├── types.schema.json
│ ├── units.schema.json
│ └── validation.schema.json
├── linkml_files.py
├── mappings.py
├── meta.py
├── model
│ ├── README.md
│ ├── docs
│ │ ├── credits.md
│ │ ├── home.md
│ │ └── specification
│ │ │ ├── 00preamble.md
│ │ │ ├── 01introduction.md
│ │ │ ├── 02instances.md
│ │ │ ├── 03schemas.md
│ │ │ ├── 04derived-schemas.md
│ │ │ ├── 05validation.md
│ │ │ ├── 06mapping.md
│ │ │ ├── 07codegen.md
│ │ │ └── index.md
│ ├── import_map.json
│ └── schema
│ │ ├── annotations.yaml
│ │ ├── array.yaml
│ │ ├── datasets.yaml
│ │ ├── extended_types.yaml
│ │ ├── extensions.yaml
│ │ ├── mappings.yaml
│ │ ├── meta.yaml
│ │ ├── types.yaml
│ │ ├── units.yaml
│ │ └── validation.yaml
├── owl
│ ├── README.md
│ └── meta.owl.ttl
├── prefixmap
│ └── meta.yaml
├── protobuf
│ └── meta.proto
├── rdf
│ ├── README.md
│ ├── annotations.model.ttl
│ ├── annotations.ttl
│ ├── datasets.model.ttl
│ ├── datasets.ttl
│ ├── extensions.model.ttl
│ ├── extensions.ttl
│ ├── mappings.model.ttl
│ ├── mappings.ttl
│ ├── meta.model.ttl
│ ├── meta.ttl
│ ├── types.model.ttl
│ ├── types.ttl
│ ├── units.model.ttl
│ ├── units.ttl
│ ├── validation.model.ttl
│ └── validation.ttl
├── shacl
│ └── meta.shacl.ttl
├── shex
│ ├── README.md
│ ├── annotations.shex
│ ├── annotations.shexj
│ ├── datasets.shex
│ ├── datasets.shexj
│ ├── extensions.shex
│ ├── extensions.shexj
│ ├── mappings.shex
│ ├── mappings.shexj
│ ├── meta.shex
│ ├── meta.shexj
│ ├── types.shex
│ ├── types.shexj
│ ├── units.shex
│ ├── units.shexj
│ ├── validation.shex
│ └── validation.shexj
├── sqlddl
│ └── meta.sql
├── sqlschema
│ └── meta.sql
├── types.py
├── units.py
└── validation.py
├── mkdocs.yml
├── poetry.lock
├── project.Makefile
├── pyproject.toml
├── show_test_changes.sh
├── tests
├── __init__.py
├── input
│ ├── README.md
│ ├── annotations.yaml
│ ├── examples
│ │ ├── schema_definition-array-1.yaml
│ │ ├── schema_definition-array-2.yaml
│ │ ├── schema_definition-dynamic-enums.yaml
│ │ ├── schema_definition-enum_bindings-1.yaml
│ │ ├── schema_definition-implements.yaml
│ │ ├── schema_definition-instantiates.yaml
│ │ ├── schema_definition-multivalued-in-any-of.yaml
│ │ ├── schema_definition-native-array-1.yaml
│ │ ├── schema_definition-native-array-rgb.yaml
│ │ └── schema_definition-type_mappings-1.yaml
│ ├── extensions.yaml
│ ├── mappings.yaml
│ ├── meta.yaml
│ └── types.yaml
├── test_ifabsent.py
├── test_input_against_model.py
├── test_linkml_files.py
└── test_rewrite_rules
│ ├── MAPPING.md
│ ├── __init__.py
│ ├── httpd
│ ├── .dockerignore
│ ├── Dockerfile
│ ├── README.md
│ ├── __init__.py
│ ├── build.sh
│ ├── httpd-foreground
│ ├── httpd.conf
│ └── linkml
│ │ ├── .htaccess
│ │ └── README.md
│ └── test_rewrite_rules.py
├── tox.ini
└── utils
└── get-value.sh
/.github/workflows/build-publish-documentation.yaml:
--------------------------------------------------------------------------------
1 | name: Build and deploy documentation
2 |
3 | # Controls when the action will run. Triggers the workflow on PR to main
4 | on:
5 | push:
6 | branches:
7 | - main
8 | pull_request:
9 | branches:
10 | - main
11 |
12 | jobs:
13 | github-pages:
14 | runs-on: ubuntu-latest
15 |
16 | permissions:
17 | contents: write
18 |
19 | steps:
20 | #----------------------------------------------
21 | # check-out repo and set-up python
22 | #----------------------------------------------
23 | - name: Check out repository
24 | uses: actions/checkout@v4.2.2
25 | with:
26 | fetch-depth: 0 # fetch all commits/branches so that mike works
27 |
28 | #----------------------------------------------
29 | # install & configure poetry
30 | #----------------------------------------------
31 | - name: Install Poetry
32 | run: |
33 | pipx install poetry
34 | pipx inject poetry poetry-dynamic-versioning
35 |
36 | - name: Setup Python
37 | uses: actions/setup-python@v5.6.0
38 | id: setup-python
39 | with:
40 | python-version: '3.10'
41 | cache: 'poetry'
42 |
43 | #----------------------------------------------
44 | # install dependencies
45 | #----------------------------------------------
46 | - name: Install dependencies
47 | run: poetry install --no-interaction --no-root
48 |
49 | - name: Configure git user
50 | run: |
51 | git config user.name "${GITHUB_ACTOR}"
52 | git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
53 |
54 | #----------------------------------------------
55 | # generate markdown files
56 | #----------------------------------------------
57 | - name: Generate markdown docs from schema
58 | run: make gen-doc
59 |
60 | #----------------------------------------------
61 | # deploy documentation
62 | #----------------------------------------------
63 | - name: Deploy generated docs
64 | run: |
65 | # generate HTML from markdown and put into dev version
66 | poetry run mike deploy dev
67 |
68 | # ensure the main branch is available locally
69 | git fetch origin main
70 | # switch to gh-pages branch, copy over the latest 404.html from main
71 | git checkout --force gh-pages
72 | git checkout --force origin/main -- 404.html
73 | git commit -m "Add 404.html to root" || echo "No changes to 404.html to commit"
74 |
75 | # push changes to gh-page branch
76 | git push origin gh-pages
77 |
--------------------------------------------------------------------------------
/.github/workflows/codespell.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Codespell
3 |
4 | on:
5 | pull_request:
6 | branches: [main]
7 | types: [ opened, synchronize, reopened ]
8 |
9 | permissions:
10 | contents: read
11 |
12 | jobs:
13 | codespell:
14 | name: Check for spelling errors
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Checkout
19 | uses: actions/checkout@v4.2.2
20 |
21 | - name: Codespell
22 | uses: codespell-project/actions-codespell@v2.1
23 |
--------------------------------------------------------------------------------
/.github/workflows/main.yaml:
--------------------------------------------------------------------------------
1 | # Built from:
2 | # https://docs.github.com/en/actions/guides/building-and-testing-python
3 | # https://github.com/snok/install-poetry#workflows-and-tips
4 |
5 | name: Build and test linkml-model
6 |
7 | on:
8 | pull_request:
9 | branches: [main]
10 | types: [opened, synchronize, reopened]
11 |
12 | jobs:
13 | test:
14 | runs-on: ubuntu-latest
15 |
16 | strategy:
17 | matrix:
18 | python-version: ["3.9", "3.10"]
19 |
20 | steps:
21 | #----------------------------------------------
22 | # check-out repo and set-up python
23 | #----------------------------------------------
24 | - name: Check out repository
25 | uses: actions/checkout@v4.2.2
26 | with:
27 | fetch-depth: 0
28 |
29 | #----------------------------------------------
30 | # install & configure poetry
31 | #----------------------------------------------
32 | - name: Install Poetry
33 | run: |
34 | pipx install poetry
35 | pipx inject poetry poetry-dynamic-versioning
36 |
37 | - name: Set up Python ${{ matrix.python-version }}
38 | uses: actions/setup-python@v5.6.0
39 | with:
40 | python-version: ${{ matrix.python-version }}
41 | cache: "poetry"
42 |
43 | #----------------------------------------------
44 | # install dependencies
45 | #----------------------------------------------
46 | - name: Install dependencies
47 | run: poetry install --no-interaction --all-extras --no-root
48 |
49 | #----------------------------------------------
50 | # run test suite
51 | #----------------------------------------------
52 | - name: Run tests
53 | run: make test
54 |
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | name: Publish Docs & PyPI Package
2 |
3 | on:
4 | release:
5 | types: [ created ]
6 |
7 | jobs:
8 | release:
9 | name: Create release artifacts
10 | runs-on: ubuntu-latest
11 |
12 | permissions:
13 | contents: write
14 |
15 | steps:
16 | - name: Checkout repo
17 | uses: actions/checkout@v4.2.2
18 | with:
19 | fetch-depth: 0 # fetch all commits/branches so that mike works
20 |
21 | - name: Set up Python
22 | uses: actions/setup-python@v5.6.0
23 | with:
24 | python-version: 3.10
25 |
26 | - name: Install Poetry
27 | run: |
28 | pipx install poetry
29 | pipx inject poetry poetry-dynamic-versioning
30 |
31 | - name: Install dependencies
32 | run: poetry install --no-interaction
33 |
34 | - name: Build source and wheel archives
35 | run: |
36 | poetry version $(git describe --tags --abbrev=0)
37 | poetry build
38 |
39 | - name: Publish distribution to PyPI
40 | if: github.repository == 'linkml/linkml-model'
41 | uses: pypa/gh-action-pypi-publish@v1.12.4
42 | with:
43 | user: __token__
44 | password: ${{ secrets.pypi_password }}
45 |
46 | - name: Parse version from tag
47 | id: version
48 | uses: release-kit/semver@v2.0.7
49 |
50 | - name: Configure git user
51 | run: |
52 | git config user.name "${GITHUB_ACTOR}"
53 | git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
54 |
55 | - name: Generate markdown docs from schema
56 | run: make gen-doc
57 |
58 | - name: Deploy docs
59 | if: github.event.release.prerelease == false
60 | run: |
61 | # generate HTML from markdown and put into MAJOR.MINOR version, update "latest" alias
62 | poetry run mike deploy --update-aliases ${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.x latest
63 |
64 | # copy the latest linkml_model files up to the root
65 | git checkout --force gh-pages
66 | rm -rf linkml_model
67 | cp -r latest/linkml_model .
68 | git add -A linkml_model
69 | git commit -m "Copy latest linkml_model to root level" || echo "No changes to linkml_model to commit"
70 |
71 | # copy over the latest 404.html from the tag
72 | git checkout --force ${{github.event.release.tag_name}} -- 404.html
73 | git commit -m "Add 404.html to root" || echo "No changes to 404.html to commit"
74 |
75 | # push changes to gh-page branch
76 | git push origin gh-pages
77 |
--------------------------------------------------------------------------------
/.github/workflows/validate-yaml-syntax.yaml:
--------------------------------------------------------------------------------
1 | name: validate-yaml-syntax
2 |
3 | on:
4 | push:
5 | branches: [main]
6 | pull_request:
7 | types: [opened, synchronize, reopened]
8 |
9 | jobs:
10 | validate-yaml:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Check out repository
14 | uses: actions/checkout@v4.2.2
15 |
16 | - name: Validate YAML file
17 | run: yamllint -c .yamllint-config linkml_model/model/schema/*.yaml
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Elements that are built using Make
2 | .venv/
3 | target/
4 | staging/
5 | /docs/
6 | /make-venv/
7 |
8 | # Ignore all of linkml_model except the model directory
9 | #linkml_model/*
10 | #!linkml_model/model/*
11 |
12 | # Byte-compiled / optimized / DLL files
13 | __pycache__/
14 | *.py[cod]
15 | *$py.class
16 |
17 | # C extensions
18 | *.so
19 |
20 | # Distribution / packaging
21 | .Python
22 | build/
23 | develop-eggs/
24 | dist/
25 | downloads/
26 | eggs/
27 | .eggs/
28 | lib/
29 | lib64/
30 | parts/
31 | sdist/
32 | var/
33 | wheels/
34 | share/python-wheels/
35 | *.egg-info/
36 | .installed.cfg
37 | *.egg
38 | MANIFEST
39 |
40 | # PyInstaller
41 | # Usually these files are written by a python script from a template
42 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
43 | *.manifest
44 | *.spec
45 |
46 | # Installer logs
47 | pip-log.txt
48 | pip-delete-this-directory.txt
49 |
50 | # Unit test / coverage reports
51 | htmlcov/
52 | .tox/
53 | .nox/
54 | .coverage
55 | .coverage.*
56 | .cache
57 | nosetests.xml
58 | coverage.xml
59 | *.cover
60 | *.py,cover
61 | .hypothesis/
62 | .pytest_cache/
63 | cover/
64 |
65 | # Translations
66 | *.mo
67 | *.pot
68 |
69 | # Django stuff:
70 | *.log
71 | local_settings.py
72 | db.sqlite3
73 | db.sqlite3-journal
74 |
75 | # Flask stuff:
76 | instance/
77 | .webassets-cache
78 |
79 | # Scrapy stuff:
80 | .scrapy
81 |
82 | # Sphinx documentation
83 | docs/_build/
84 |
85 | # PyBuilder
86 | .pybuilder/
87 | target/
88 |
89 | # Jupyter Notebook
90 | .ipynb_checkpoints
91 |
92 | # IPython
93 | profile_default/
94 | ipython_config.py
95 |
96 | # pyenv
97 | # For a library or package, you might want to ignore these files since the code is
98 | # intended to run in multiple environments; otherwise, check them in:
99 | .python-version
100 |
101 | # pipenv
102 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
103 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
104 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
105 | # install all needed dependencies.
106 | Pipfile.lock
107 |
108 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
109 | __pypackages__/
110 |
111 | # Celery stuff
112 | celerybeat-schedule
113 | celerybeat.pid
114 |
115 | # SageMath parsed files
116 | *.sage.py
117 |
118 | # Environments
119 | .env
120 | .venv
121 | env/
122 | venv/
123 | ENV/
124 | env.bak/
125 | venv.bak/
126 |
127 | # Spyder project settings
128 | .spyderproject
129 | .spyproject
130 |
131 | # Rope project settings
132 | .ropeproject
133 |
134 | # mkdocs documentation
135 | /site
136 |
137 | # mypy
138 | .mypy_cache/
139 | .dmypy.json
140 | dmypy.json
141 |
142 | # Pyre type checker
143 | .pyre/
144 |
145 | # pytype static type analyzer
146 | .pytype/
147 |
148 | # Cython debug symbols
149 | cython_debug/
150 |
151 | # Editors
152 | .idea/
153 | .project
154 | .classpath
155 |
156 | # make artifacts
157 | *-PREV
158 |
159 | # Apple stuff
160 | .DS_Store
161 |
--------------------------------------------------------------------------------
/.yamllint-config:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | yaml-files:
4 | - '*.yaml'
5 | - '*.yml'
6 | - '.yamllint'
7 |
8 | rules:
9 | anchors: enable
10 | braces: enable
11 | brackets: enable
12 | colons: enable
13 | commas: enable
14 | comments:
15 | level: warning
16 | comments-indentation: disable
17 | document-end: disable
18 | document-start: disable
19 | empty-lines: enable
20 | empty-values: disable
21 | float-values: disable
22 | hyphens: enable
23 | indentation: enable
24 | key-duplicates: enable
25 | key-ordering: disable
26 | line-length:
27 | level: warning
28 | max: 200
29 | allow-non-breakable-words: true
30 | allow-non-breakable-inline-mappings: false
31 | new-line-at-end-of-file: enable
32 | new-lines: enable
33 | octal-values: disable
34 | quoted-strings: disable
35 | trailing-spaces: disable
36 | truthy:
37 | level: warning
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
24 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to this repository
2 |
3 | ## Contributing to the metamodel
4 |
5 | * [linkml_model/model/schema](linkml_model/model/schema)
6 |
7 | ## Contributing to the specification
8 |
9 | The source lives in
10 |
11 | * [linkml_model/model/docs/specification](linkml_model/model/docs/specification)
12 |
13 | ## Building the site
14 |
15 | The site https://linkml.io/linkml-model/ is hosted on GitHub pages.
16 |
17 | Note: unlike most LinkML schema sites, this one *does not* use the
18 | gh-pages branch. The docs are served directly from the root folder of
19 | the main branch.
20 |
21 | The [docs](docs) folder houses the built schema index.
22 |
23 | To build the docs:
24 |
25 | ```
26 | make gen-doc
27 | ```
28 |
29 | This stages the documentation in target/docs
30 |
31 | You can test this:
32 |
33 | ```
34 | make serve
35 | ```
36 |
37 | ## Model versioning and releases
38 |
39 | See the [metamodel docs](https://linkml.io/linkml/schemas/metamodel.html) for a
40 | description of the versioning scheme.
41 |
42 | MINOR versions should be synchronized with all code frameworks such as linkml-runtime.
43 |
44 | To sync the minor version with linkml-runtime, see:
45 |
46 | - https://github.com/linkml/linkml-runtime/blob/main/Makefile
47 | - https://github.com/linkml/linkml/issues/1065
48 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | MAKEFLAGS += --warn-undefined-variables
2 | SHELL := bash
3 | .SHELLFLAGS := -eu -o pipefail -c
4 | .DEFAULT_GOAL := help
5 | .DELETE_ON_ERROR:
6 | .SUFFIXES:
7 | .SECONDARY:
8 |
9 | RUN = poetry run
10 | # get values from about.yaml file
11 | SCHEMA_NAME = linkml_model
12 | SOURCE_SCHEMA_PATH = $(shell sh ./utils/get-value.sh source_schema_path)
13 | SRC = .
14 | DEST = staging
15 | PYMODEL = linkml_model
16 | DOCDIR = docs/source
17 |
18 | $(PYMODEL):
19 | mkdir -p $@
20 |
21 | $(DEST):
22 | mkdir -p $@
23 |
24 | # basename of a YAML file in model/
25 | .PHONY: all clean
26 |
27 | help: status
28 | @echo ""
29 | @echo "make all -- makes site locally"
30 | @echo "make install -- install dependencies"
31 | @echo "make setup -- initial setup"
32 | @echo "make test -- runs tests"
33 | @echo "make testdoc -- builds docs and runs local test server"
34 | @echo "make deploy -- deploys site"
35 | @echo "make update -- updates linkml version"
36 | @echo "make help -- show this help"
37 | @echo ""
38 |
39 | status: check-config
40 | @echo "Project: $(SCHEMA_NAME)"
41 | @echo "Source: $(SOURCE_SCHEMA_PATH)"
42 |
43 | setup: install gen-project gen-doc git-init-add
44 |
45 | install:
46 | poetry install
47 | .PHONY: install
48 |
49 | all: gen-project gen-doc
50 | %.yaml: gen-project
51 | deploy: gen-doc mkd-gh-deploy
52 |
53 | # generates all project files
54 | # and updates the artifacts in linkml-model
55 | gen-project: $(PYMODEL) gen-py
56 | $(RUN) gen-project -d $(DEST) --config-file gen_project_config.yaml $(SOURCE_SCHEMA_PATH)
57 | cp -r $(DEST)/* $(PYMODEL)
58 |
59 | gen-py: $(DEST)
60 | # for all the files in the schema folder, run the gen-python command and output the result to the top
61 | # level of the project. In other repos, we'd include mergeimports=True, but we don't do that with
62 | # linkml-model.
63 | @for file in $(wildcard $(PYMODEL)/model/schema/*.yaml); do \
64 | base=$$(basename $$file); \
65 | filename_without_suffix=$${base%.*}; \
66 | $(RUN) gen-python --genmeta $$file > $(DEST)/$$filename_without_suffix.py; \
67 | done
68 | cp $(DEST)/*.py $(PYMODEL)
69 |
70 | gen-doc:
71 | $(RUN) gen-doc --genmeta --sort-by rank -d $(DOCDIR)/docs $(SOURCE_SCHEMA_PATH)
72 | cp -r linkml_model/model/docs/* $(DOCDIR)/docs
73 | cp -r $(PYMODEL) $(DOCDIR)/$(PYMODEL)
74 | rm -rf $(DOCDIR)/$(PYMODEL)/model/docs
75 | cp README.md $(DOCDIR)
76 |
77 | test: test-schema test-python test-validate-schema test-examples
78 | test-schema:
79 | $(RUN) gen-project -d tmp $(SOURCE_SCHEMA_PATH)
80 |
81 | test-python:
82 | $(RUN) python -m unittest discover
83 |
84 | # TODO: switch to linkml-run-examples when normalize is implemented
85 | test-examples: $(SOURCE_SCHEMA_PATH)
86 | $(RUN) linkml-validate -s $(SOURCE_SCHEMA_PATH) tests/input/examples/schema_definition-*.yaml
87 | # $(RUN) linkml-run-examples -s $(SOURCE_SCHEMA_PATH) -e tests/input/examples -d /tmp/
88 | # find tests/input/examples | ./utils/run-examples.pl
89 |
90 | test-validate-schema:
91 | $(RUN) linkml-normalize -s $(SOURCE_SCHEMA_PATH) $(SOURCE_SCHEMA_PATH) -o /tmp/schema
92 |
93 | check-config:
94 | @(grep my-datamodel about.yaml > /dev/null && printf "\n**Project not configured**:\n\n - Remember to edit 'about.yaml'\n\n" || exit 0)
95 |
96 | convert-examples-to-%:
97 | $(patsubst %, $(RUN) linkml-convert % -s $(SOURCE_SCHEMA_PATH) -C Person, $(shell find src/data/examples -name "*.yaml"))
98 |
99 | examples/%.yaml: src/data/examples/%.yaml
100 | $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
101 | examples/%.json: src/data/examples/%.yaml
102 | $(RUN) linkml-convert -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
103 | examples/%.ttl: src/data/examples/%.yaml
104 | $(RUN) linkml-convert -P EXAMPLE=http://example.org/ -s $(SOURCE_SCHEMA_PATH) -C Person $< -o $@
105 |
106 | upgrade:
107 | poetry add -D linkml@latest
108 |
109 | # Test documentation locally
110 | serve: mkd-serve
111 |
112 | testdoc: gen-doc serve
113 |
114 | builddoc:
115 | $(RUN) mkdocs build
116 |
117 | MKDOCS = $(RUN) mkdocs
118 | mkd-%:
119 | $(MKDOCS) $*
120 |
121 | PROJECT_FOLDERS = sqlschema shex shacl protobuf prefixmap owl jsonschema jsonld graphql excel
122 | git-init-add: git-init git-add git-commit git-status
123 | git-init:
124 | git init
125 | git-add:
126 | git add .gitignore .github Makefile LICENSE *.md examples utils about.yaml mkdocs.yml poetry.lock project.Makefile pyproject.toml src/linkml/*yaml src/*/datamodel/*py src/data
127 | git add $(patsubst %, project/%, $(PROJECT_FOLDERS))
128 | git-commit:
129 | git commit -m 'Initial commit' -a
130 | git-status:
131 | git status
132 |
133 | clean:
134 | rm -rf $(DEST)
135 | rm -rf docs
136 | rm -rf tmp
137 |
138 | spell:
139 | poetry run codespell
140 |
141 | lint:
142 | poetry run yamllint -c .yamllint-config linkml_model/model/schema/*.yaml
143 |
144 | include project.Makefile
145 |
146 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://pypi.python.org/pypi/linkml_model)
2 | 
3 | [](https://pypi.python.org/pypi/linkml_model)
4 | [](https://zenodo.org/badge/latestdoi/13996/linkml/linkml-model)
5 |
6 |
7 | # LinkML Model
8 |
9 | Metamodel schema, documentation, and specification for the Linked Open Data Modeling Language (LinkML)
10 |
11 | This documentation is best viewed through the generated web documentation:
12 |
13 | - [https://w3id.org/linkml/](https://linkml.github.io/linkml-model/docs)
14 |
15 | ## Quick Links
16 |
17 | - [Generated documentation](https://linkml.github.io/linkml-model/docs)
18 | - [Specification](https://linkml.io/linkml-model/docs/specification/00preamble/)
19 | - [Source YAML for metamodel](https://github.com/linkml/linkml-model/tree/main/linkml_model/model/schema)
20 | - [Main LinkML site](https://linkml.io)
21 |
22 | ## About LinkML
23 |
24 | LinkML is a modeling framework for building datamodels and related applications.
25 |
26 | The best place to start discovering more about linkml is on the main LinkML website, [linkml.io/linkml](https://linkml.io/linkml)
27 |
28 | LinkML is self-describing, and the underlying datamodel for describing data models is in LinkML. This repository contains that data model
29 |
30 | ## For Developers
31 |
32 | See the [contributing docs](https://linkml.io/linkml/contributing/contributing.html)
33 |
34 | ### Installation
35 |
36 | This project uses poetry:
37 |
38 | ```bash
39 | > cd linkml-model
40 | > poetry install
41 | ```
42 |
43 | ## Running tests
44 |
45 | ```bash
46 | > make test
47 | ```
48 |
--------------------------------------------------------------------------------
/about.yaml:
--------------------------------------------------------------------------------
1 | name: linkml-model
2 | description: LinkML metamodel
3 | source_schema_path: linkml_model/model/schema/meta.yaml
4 |
--------------------------------------------------------------------------------
/checkout_outputs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # checkout (update) all of the outputs to revert to what is on github
3 |
4 | git checkout docs
5 | ls linkml_model | grep -v model | xargs git checkout
6 |
--------------------------------------------------------------------------------
/examples/date-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/date
2 | title: Date Example
3 | name: date-example
4 | license: https://creativecommons.org/publicdomain/zero/1.0/
5 | see_also:
6 | - https://github.com/linkml/linkml/issues/621
7 |
8 | prefixes:
9 | linkml: https://w3id.org/linkml/
10 | ex: https://w3id.org/linkml/examples/annotations/
11 | skos: http://www.w3.org/2004/02/skos/core#
12 | pav: http://purl.org/pav/
13 | schema: http://schema.org/
14 | sh: https://w3id.org/shacl/
15 |
16 | default_prefix: ex
17 | default_range: string
18 |
19 | default_curi_maps:
20 | - semweb_context
21 |
22 | imports:
23 | - linkml:types
24 |
25 |
26 | #==================================
27 | # Classes #
28 | #==================================
29 |
30 | classes:
31 | Sample:
32 | slots:
33 | - collection_date
34 |
35 | #==================================
36 | # Slots #
37 | #==================================
38 |
39 | slots:
40 | collection_date:
41 | range: date_or_datetime
42 |
43 |
--------------------------------------------------------------------------------
/examples/dynamic-enums-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/enums
2 | title: Dynamic Enums Example
3 | name: dynamicenums-example
4 | description: This demonstrates the use of dynamic enums
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/enums/
10 | sh: https://w3id.org/shacl/
11 | bioregistry: https://bioregistry.io/registry/
12 | MONDO: http://purl.obolibrary.org/obo/MONDO_
13 | NCIT: http://purl.obolibrary.org/obo/NCIT_
14 | loinc: http://loinc.org/
15 |
16 | default_prefix: ex
17 | default_range: string
18 |
19 | default_curi_maps:
20 | - semweb_context
21 |
22 | emit_prefixes:
23 | - linkml
24 | - rdf
25 | - rdfs
26 | - xsd
27 | - owl
28 |
29 | imports:
30 | - linkml:types
31 |
32 |
33 | #==================================
34 | # Classes #
35 | #==================================
36 |
37 | classes:
38 | HumanSample:
39 | slots:
40 | - name
41 | - disease
42 |
43 |
44 | #==================================
45 | # Slots #
46 | #==================================
47 |
48 | slots:
49 | name:
50 | range: string
51 | disease:
52 | range: HumanDisease
53 | vital_status:
54 | enum_range:
55 | permissible_values:
56 | LIVING:
57 | DEAD:
58 | UNDEAD:
59 |
60 | #==================================
61 | # Enums
62 | #==================================
63 |
64 | enums:
65 | Disease:
66 | reachable_from:
67 | source_ontology: bioregistry:mondo
68 | source_nodes:
69 | - MONDO:0000001 ## disease or disorder
70 | is_direct: false
71 | relationship_types:
72 | - rdfs:subClassOf
73 | minus:
74 | - permissible_values:
75 | root_node:
76 | meaning: MONDO:0000001 ## disease or disorder
77 |
78 | HumanDisease:
79 | description: Extends the Disease value set, including NCIT neoplasms, excluding non-human diseases
80 | inherits:
81 | - Disease
82 | include:
83 | - reachable_from:
84 | source_ontology: bioregistry:ncit
85 | source_nodes:
86 | - NCIT:C3262
87 | minus:
88 | - reachable_from:
89 | source_ontology: bioregistry:mondo
90 | source_nodes:
91 | - MONDO:0005583 ## non-human animal disease
92 | relationship_types:
93 | - rdfs:subClassOf
94 | - permissible_values:
95 | NOT_THIS_ONE:
96 | meaning: MONDO:9999
97 | description: Example of excluding a single node
98 |
99 | LoincExample:
100 | enum_uri: http://hl7.org/fhir/ValueSet/example-intensional
101 | see_also:
102 | - https://build.fhir.org/valueset-example-intensional.json.html
103 | include:
104 | - reachable_from:
105 | source_ontology: "loinc:"
106 | source_nodes:
107 | - loinc:LP43571-6
108 | is_direct: true
109 | minus:
110 | - concepts:
111 | - LOINC:5932-9
112 |
113 | HCAExample:
114 | see_also:
115 | - https://github.com/linkml/linkml/issues/274
116 | include:
117 | - reachable_from:
118 | source_ontology: bioregistry:go
119 | source_nodes:
120 | - GO:0007049
121 | - GO:0022403
122 | include_self: false
123 | relationship_types:
124 | - rdfs:subClassOf
125 | minus:
126 | - concepts:
127 | - LOINC:5932-9
128 |
129 | BodyPartEnum:
130 | reachable_from:
131 | source_ontology: obo:cl
132 | source_nodes:
133 | - CL:0000540 ## neuron
134 | include_self: false
135 | relationship_types:
136 | - rdfs:subClassOf
137 |
138 | Brand:
139 | enum_uri: wikidata:Q431289
140 | include:
141 | - reachable_from:
142 | source_ontology: bioregistry:wikidata
143 | source_nodes:
144 | - wikidata:Q431289
145 | include_self: false
146 | relationship_types:
147 | - wdp:P31
148 | - wdp:P279
149 |
150 | SerumCholesterolExample:
151 | description: >
152 | This is an example value set that includes all the LOINC codes for serum/plasma cholesterol from v2.36.
153 | code_set: http://hl7.org/fhir/ValueSet/serum-cholesterol
154 | code_set_version: "1.0.0"
155 | pv_formula: CODE
156 | include:
157 | - concepts:
158 | - LP43571-6
159 | minus:
160 | - concepts:
161 | - 5932-9
162 | reachable_from:
163 | source_ontology: http://loinc.org
164 | source_nodes:
165 | - LP43571-6
166 | relationship_types: null
167 | is_direct: true
168 | include_self: true
169 | traverse_up: false
170 | concepts:
171 | - http://loinc.org/LP43571-6
172 |
--------------------------------------------------------------------------------
/examples/inlining-union-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/inlining-union
2 | name: inlining-union
3 | license: https://creativecommons.org/publicdomain/zero/1.0/
4 | see_also:
5 | - https://github.com/linkml/linkml/issues/664
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/inlining-union
10 |
11 | default_prefix: ex
12 | default_range: string
13 |
14 | default_curi_maps:
15 | - semweb_context
16 |
17 |
18 | imports:
19 | - linkml:types
20 |
21 | #==================================
22 | # Classes #
23 | #==================================
24 |
25 | classes:
26 | Foo:
27 |
28 | slots:
29 | my_slot:
30 | range: Foo
31 | any_of:
32 | - inlined: true
33 | - inlined: false
34 |
--------------------------------------------------------------------------------
/examples/path-example.yaml:
--------------------------------------------------------------------------------
1 | id: test
2 | name: test
3 |
4 | slots:
5 | subject_id:
6 | path_rule:
7 | traverse: subject
8 | range_expression:
9 | is_a: entity
10 | followed_by:
11 | traverse: id
12 | subject_label:
13 | path_rule:
14 | traverse: subject
15 | range_expression:
16 | is_a: entity
17 | followed_by:
18 | traverse: label
19 | object_ancestor_id:
20 | path_rule:
21 | traverse: object
22 | range_expression:
23 | is_a: entity
24 | followed_by:
25 | traverse: ancestor
26 | followed_by:
27 | traverse: id
28 | object_part_of_ancestor_id:
29 | path_rule:
30 | traverse: object
31 | range_expression:
32 | is_a: entity
33 | followed_by:
34 | traverse: subject
35 | reversed: true
36 | range_expression:
37 | is_a: AncestorEdge
38 | slot_conditions:
39 | predicate:
40 | equals_string: part_of
41 | followed_by:
42 | traverse: object
43 | self_path:
44 | path_rule: {}
45 | reflexive: true
46 | self_if_entity:
47 | path_rule:
48 | range_expression:
49 | is_a: entity
50 | or_path_example:
51 | path_rule:
52 | description: a|b|c
53 | any_of:
54 | - traverse: slot_a
55 | - traverse: slot_b
56 | - traverse: slot_c
57 | or_path_example2:
58 | path_rule:
59 | description: a|b|c/d
60 | any_of:
61 | - traverse: slot_a
62 | - traverse: slot_b
63 | - traverse: slot_c
64 | followed_by:
65 | traverse: d
66 |
67 |
--------------------------------------------------------------------------------
/examples/pattern-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/pattern
2 | title: Pattern Example
3 | name: pattern-example
4 | description: This demonstrates the use of patterns
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/patterns/
10 | sh: https://w3id.org/shacl/
11 |
12 | default_prefix: ex
13 | default_range: string
14 |
15 | default_curi_maps:
16 | - semweb_context
17 |
18 | emit_prefixes:
19 | - linkml
20 | - rdf
21 | - rdfs
22 | - xsd
23 | - owl
24 |
25 | imports:
26 | - linkml:types
27 |
28 | # constant/parameter settings
29 | settings:
30 | float: "\\d+[\\.\\d+]"
31 | unit: "\\S+"
32 | unit.length: "(centimeter|meter|inch)"
33 | unit.weight: "(kg|g|lbs|stone)"
34 | email: "\\S+@\\S+{\\.\\w}+"
35 |
36 | #==================================
37 | # Classes #
38 | #==================================
39 |
40 | classes:
41 | PersonInfo:
42 | slots:
43 | - id
44 | - name
45 | - height
46 | - email
47 |
48 | #==================================
49 | # Slots #
50 | #==================================
51 |
52 | slots:
53 | id:
54 | identifier: true
55 | range: string
56 | pattern: "^P\\d{7}" ## simple pattern. Note {}s are NOT interpolated
57 | name:
58 | range: string
59 | email:
60 | range: EmailString
61 | height:
62 | range: string
63 | structured_pattern:
64 | syntax: "{float} {unit.length}"
65 | interpolated: true ## all {...}s are replaced using settings
66 | partial_match: false
67 | weight:
68 | range: string
69 | structured_pattern:
70 | syntax: "{float} {unit.weight}"
71 | interpolated: true
72 | partial_match: false ## implicit ^...$
73 |
74 | #==================================
75 | # Types
76 | #==================================
77 |
78 | types:
79 | EmailString:
80 | typeof: string
81 | structured_pattern:
82 | syntax: "{email}"
83 | interpolated: true
84 | partial_match: false ## implicit ^...$
85 |
86 |
87 |
--------------------------------------------------------------------------------
/examples/pointer-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/pointer-example
2 | name: pointer-example
3 | description: pointer-example
4 | imports:
5 | - linkml:types
6 | prefixes:
7 | linkml: https://w3id.org/linkml/
8 | ex: https://w3id.org/linkml/examples/pointer-example/
9 | default_prefix: ex
10 | slots:
11 | property:
12 | examples:
13 | - value: '#/address[1]'
14 | identifier: true
15 | range: jsonpointer
16 | source:
17 | examples:
18 | - value: bazSource
19 | range: string
20 | id:
21 | examples:
22 | - value: object1234
23 | identifier: true
24 | range: string
25 | height:
26 | multivalued: true
27 | range: string
28 | width:
29 | multivalued: true
30 | range: string
31 | address:
32 | multivalued: true
33 | range: string
34 | classes:
35 | Source:
36 | slots:
37 | - property
38 | - source
39 | MyObject:
40 | slots:
41 | - id
42 | - source
43 | - height
44 | - width
45 | - address
46 |
47 |
--------------------------------------------------------------------------------
/examples/relational-roles-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/relational
2 | title: Relational example
3 | name: relational
4 | description: This demonstrates the use of relational roles to be introduced in linkml 1.2
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 | see_also:
7 | - https://github.com/linkml/linkml-model/pull/61
8 |
9 | prefixes:
10 | linkml: https://w3id.org/linkml/
11 | ex: https://w3id.org/linkml/examples/relational/
12 | skos: http://www.w3.org/2004/02/skos/core#
13 | pav: http://purl.org/pav/
14 | schema: http://schema.org/
15 | sh: https://w3id.org/shacl/
16 |
17 | default_prefix: ex
18 | default_range: string
19 |
20 | default_curi_maps:
21 | - semweb_context
22 |
23 | emit_prefixes:
24 | - linkml
25 | - rdf
26 | - rdfs
27 | - xsd
28 | - owl
29 |
30 | imports:
31 | - linkml:types
32 |
33 | #==================================
34 | # Classes #
35 | #==================================
36 |
37 | classes:
38 | Person:
39 | slots:
40 | - id
41 | - relationships
42 | Relationship:
43 | abstract: true
44 | represents_relationship: true
45 | slots:
46 | - type
47 | FamilialRelationship:
48 | is_a: Relationship
49 | slots:
50 | - family_member
51 | FriendshipRelationship:
52 | is_a: Relationship
53 | slots:
54 | - between
55 |
56 | #==================================
57 | # Slots #
58 | #==================================
59 |
60 | slots:
61 | id:
62 | identifier: true
63 | type:
64 | # relational_role: PREDICATE
65 | family_member:
66 | # relational_role: OBJECT
67 | between:
68 | multivalued: true
69 | # relational_role: NODE
70 | relationships:
71 | multivalued: true
72 | range: Relationship
73 |
74 |
--------------------------------------------------------------------------------
/examples/slot-group-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/slot_group
2 | title: Slot Group Example
3 | name: slot-group
4 | description: This demonstrates the use of slot groups to be introduced in linkml 1.2
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/slot_group/
10 | skos: http://www.w3.org/2004/02/skos/core#
11 | pav: http://purl.org/pav/
12 | schema: http://schema.org/
13 | sh: https://w3id.org/shacl/
14 |
15 | default_prefix: ex
16 | default_range: string
17 |
18 | default_curi_maps:
19 | - semweb_context
20 |
21 | emit_prefixes:
22 | - linkml
23 | - rdf
24 | - rdfs
25 | - xsd
26 | - owl
27 |
28 | imports:
29 | - linkml:types
30 |
31 | #==================================
32 | # Classes #
33 | #==================================
34 |
35 | classes:
36 | PersonInfo:
37 | slots:
38 | - person id
39 | - person name
40 | - person phone
41 | - organization id
42 | - organization name
43 |
44 | #==================================
45 | # Slots #
46 | #==================================
47 |
48 | slots:
49 | person slot:
50 | abstract: true
51 | is_grouping_slot: true
52 | organization_slot:
53 | abstract: true
54 | is_grouping_slot: true
55 | person id:
56 | title: id
57 | slot_group: person slot
58 | person name:
59 | title: name
60 | slot_group: person slot
61 | person telephone:
62 | title: phone no
63 | slot_group: person slot
64 | organization id:
65 | title: id
66 | slot_group: organization slot
67 | organization name:
68 | title: name
69 | slot_group: organization slot
70 |
--------------------------------------------------------------------------------
/examples/structured_alias.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/rules
2 | title: Rules example
3 | name: rules
4 | description: This demonstrates the use of rules to be introduced in linkml 1.2
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 | see_also:
7 | - https://github.com/orgs/linkml/projects/3
8 | - https://github.com/linkml/linkml/issues/75
9 |
10 | prefixes:
11 | linkml: https://w3id.org/linkml/
12 | ex: https://w3id.org/linkml/examples/rules/
13 | skos: http://www.w3.org/2004/02/skos/core#
14 | pav: http://purl.org/pav/
15 | schema: http://schema.org/
16 | sh: https://w3id.org/shacl/
17 |
18 | default_prefix: ex
19 | default_range: string
20 |
21 | default_curi_maps:
22 | - semweb_context
23 |
24 | emit_prefixes:
25 | - linkml
26 | - rdf
27 | - rdfs
28 | - xsd
29 | - owl
30 |
31 | imports:
32 | - linkml:types
33 |
34 | slots:
35 | related to:
36 | description: >-
37 | A relationship that is asserted between two named things
38 | domain: named thing
39 | range: named thing
40 | multivalued: true
41 | inherited: true
42 | symmetric: true
43 | annotations:
44 | - tag: biolink:canonical_predicate
45 | value: true
46 | exact_mappings:
47 | - skos:relatedMatch
48 | - UMLS:related_to
49 | broad_mappings:
50 | - owl:topObjectProperty
51 | narrow_mappings:
52 | - BFO:0000054
53 | - GOREL:0002005
54 | - GOREL:0012006
55 | - RO:0002093
56 | - RO:0002092
57 | - RO:0002084
58 | aliases: ['similar to']
59 | structured_aliases:
60 | - literal_form: mapped_to
61 | predicate: RELATED_SYNONYM
62 | source: infores:mesh
63 | - literal_form: higher_than
64 | predicate: NARROW_SYNONYM
65 | source: infores:semmeddb
66 | - literal_form: related_to
67 | predicate: EXACT_SYNONYM
68 | source: infores:bte
69 |
--------------------------------------------------------------------------------
/examples/unique-key-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/uniquekey
2 | title: Uniquekey Example
3 | name: uniquekey
4 | description: This demonstrates the use of uniquekey
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/uniquekey/
10 | skos: http://www.w3.org/2004/02/skos/core#
11 | pav: http://purl.org/pav/
12 | schema: http://schema.org/
13 | sh: https://w3id.org/shacl/
14 |
15 | default_prefix: ex
16 | default_range: string
17 |
18 | default_curi_maps:
19 | - semweb_context
20 |
21 | emit_prefixes:
22 | - linkml
23 | - rdf
24 | - rdfs
25 | - xsd
26 | - owl
27 |
28 | imports:
29 | - linkml:types
30 |
31 | #==================================
32 | # Classes #
33 | #==================================
34 |
35 | classes:
36 |
37 | ChemicalEntity:
38 | slots:
39 | - id
40 | - symbol
41 | - inchi
42 | - atomic_number
43 | - neutron_number
44 | ChemicalElement:
45 | is_a: ChemicalEntity
46 |
47 | Isotope:
48 | is_a: ChemicalEntity
49 | unique_keys:
50 | main:
51 | description: An isotope is uniquely identifier by atomic and neutron number
52 | unique_key_slots:
53 | - atomic_number
54 | - neutron_number
55 | symbol:
56 | description: An isotope is uniquely identifier by its symbol
57 | notes:
58 | - we could have opted to use a simple key slot here as this is not a compound key but this allows us to annotate the key
59 | unique_key_slots:
60 | - symbol
61 |
62 |
63 | #==================================
64 | # Slots #
65 | #==================================
66 |
67 | slots:
68 | id:
69 | identifier: true
70 | symbol:
71 | inchi:
72 | atomic_number:
73 | range: integer
74 | neutron_number:
75 | range: integer
76 |
77 |
78 |
--------------------------------------------------------------------------------
/examples/unit-example.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/examples/unit
2 | title: Unit Example
3 | name: unit-example
4 | description: This demonstrates the use of units
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | ex: https://w3id.org/linkml/examples/units/
10 | sh: https://w3id.org/shacl/
11 | UO: http://purl.obolibrary.org/obo/UO_
12 | PATO: http://purl.obolibrary.org/obo/UO_
13 | qudt: http://qudt.org/schema/qudt/
14 | uom: https://w3id.org/uom/
15 |
16 | default_prefix: ex
17 | default_range: string
18 |
19 | default_curi_maps:
20 | - semweb_context
21 |
22 | emit_prefixes:
23 | - linkml
24 | - rdf
25 | - rdfs
26 | - xsd
27 | - owl
28 |
29 | imports:
30 | - linkml:types
31 |
32 | #==================================
33 | # Classes #
34 | #==================================
35 |
36 | classes:
37 | PersonInfo:
38 | slots:
39 | - id
40 | - name
41 | - height_in_cm
42 | - arm_length
43 |
44 | Measurement:
45 | description:
46 | attributes:
47 | unit_code:
48 | range: UnitCodeEnum
49 | numeric_value:
50 | range: float
51 |
52 | Measurement_v2:
53 | description:
54 | attributes:
55 | unit_code:
56 | range: UnitTerm
57 | numeric_value:
58 | range: float
59 |
60 | UnitTerm:
61 | attributes:
62 | id:
63 | identifier: true
64 | label:
65 |
66 |
67 | #==================================
68 | # Slots #
69 | #==================================
70 |
71 | slots:
72 | ## Example 1: unit is a property of the slot/field ("baked in")
73 | height_in_cm:
74 | range: float
75 | unit:
76 | ucum_code: cm
77 | iec61360code: UAA375
78 | exact_mappings:
79 | - UO:0000015 ## centimeter
80 | - uom:cm
81 | has_quantity_kind: PATO:0000119 ## height
82 |
83 | id:
84 | identifier: true
85 | range: string
86 | name:
87 | range: string
88 |
89 |
90 | ## Example 2: unit is a property of the scalar type;
91 | ## this is equivalent to making it a property of the slot/field,
92 | ## however, the type can be reused in multiple places
93 | weight_in_kg:
94 | range: KilogramValue
95 |
96 | ## Example 3: unit is part of data rather than baked into schema
97 | ## This allows direct representatiom of data using different units without need for conversion.
98 | ## This is both a pro (flexibility) and a con (less standardization)
99 | arm_length:
100 | range: Measurement
101 |
102 |
103 | #==================================
104 | # Types
105 | #==================================
106 |
107 | types:
108 | KilogramValue:
109 | typeof: float
110 | unit:
111 | ucum_code: kg
112 |
113 |
114 |
115 | #==================================
116 | # Enums
117 | #==================================
118 |
119 | enums:
120 | UnitCodeEnum:
121 | permissible_values:
122 | cm:
123 | unit:
124 | ucum_code: cm
125 | m:
126 | unit:
127 | ucum_code: m
128 | inches:
129 | feet:
130 |
--------------------------------------------------------------------------------
/gen_project_config.yaml:
--------------------------------------------------------------------------------
1 | generator_args:
2 | python:
3 | genmeta: True
4 | mergeimports: False
5 | excludes:
6 | - markdown # gen-doc is run separately
7 | - python # gen-python is run separately for each source YAML file
8 |
--------------------------------------------------------------------------------
/hide_test_changes.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Make all of the test output files invisible to git
4 | git update-index --assume-unchanged `git status -s docs | sed 's/^[[:space:]]*[^[:space:]]*[[:space:]]*//'`
5 | git update-index --assume-unchanged `git status -s linkml_model | sed 's/^[[:space:]]*[^[:space:]]*[[:space:]]*//' | grep -v \/model\/`
6 |
--------------------------------------------------------------------------------
/linkml_model/README.md:
--------------------------------------------------------------------------------
1 | # linkml_model
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/__init__.py:
--------------------------------------------------------------------------------
1 | from .types import String, Integer, Boolean, Float, Double, Decimal, Time, Date, Datetime, Uriorcurie, Uri, \
2 | Ncname, Objectidentifier, Nodeidentifier
3 | from .extensions import Extension, Extensible
4 | from .annotations import Annotation, Annotatable
5 | from .meta import ElementName, SchemaDefinitionName, TypeDefinitionName, SubsetDefinitionName, DefinitionName, \
6 | EnumDefinitionName, SlotDefinitionName, ClassDefinitionName, PrefixPrefixPrefix, LocalNameLocalNameSource, \
7 | AltDescriptionSource, PermissibleValueText, Element, SchemaDefinition, TypeDefinition, SubsetDefinition, \
8 | Definition, EnumDefinition, SlotDefinition, ClassDefinition, Prefix, LocalName, Example, AltDescription, \
9 | PermissibleValue, PvFormulaOptions
10 |
11 |
--------------------------------------------------------------------------------
/linkml_model/annotations.py:
--------------------------------------------------------------------------------
1 | # Auto generated from annotations.yaml by pythongen.py version: 0.0.1
2 | # Generation date: 2024-02-07T17:29:22
3 | # Schema: annotations
4 | #
5 | # id: https://w3id.org/linkml/annotations
6 | # description: Annotations mixin
7 | # license: https://creativecommons.org/publicdomain/zero/1.0/
8 |
9 | import dataclasses
10 | import re
11 | from jsonasobj2 import JsonObj, as_dict
12 | from typing import Optional, List, Union, Dict, ClassVar, Any
13 | from dataclasses import dataclass
14 |
15 | from linkml_runtime.utils.slot import Slot
16 | from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode
17 | from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
18 | from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
19 | from linkml_runtime.utils.formatutils import camelcase, underscore, sfx
20 | from linkml_runtime.utils.enumerations import EnumDefinitionImpl
21 | from rdflib import Namespace, URIRef
22 | from linkml_runtime.utils.curienamespace import CurieNamespace
23 | from .extensions import AnyValue, Extension, ExtensionTag
24 | from .types import Uriorcurie
25 | from linkml_runtime.utils.metamodelcore import URIorCURIE
26 |
27 | metamodel_version = "1.7.0"
28 | version = "2.0.0"
29 |
30 | # Overwrite dataclasses _init_fn to add **kwargs in __init__
31 | dataclasses._init_fn = dataclasses_init_fn_with_kwargs
32 |
33 | # Namespaces
34 | LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/')
35 | DEFAULT_ = LINKML
36 |
37 |
38 | # Types
39 |
40 | # Class references
41 | class AnnotationTag(ExtensionTag):
42 | pass
43 |
44 |
45 | @dataclass
46 | class Annotatable(YAMLRoot):
47 | """
48 | mixin for classes that support annotations
49 | """
50 | _inherited_slots: ClassVar[List[str]] = []
51 |
52 | class_class_uri: ClassVar[URIRef] = LINKML["Annotatable"]
53 | class_class_curie: ClassVar[str] = "linkml:Annotatable"
54 | class_name: ClassVar[str] = "annotatable"
55 | class_model_uri: ClassVar[URIRef] = LINKML.Annotatable
56 |
57 | annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]] = empty_dict()
58 |
59 | def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
60 | self._normalize_inlined_as_dict(slot_name="annotations", slot_type=Annotation, key_name="tag", keyed=True)
61 |
62 | super().__post_init__(**kwargs)
63 |
64 |
65 | @dataclass
66 | class Annotation(Extension):
67 | """
68 | a tag/value pair with the semantics of OWL Annotation
69 | """
70 | _inherited_slots: ClassVar[List[str]] = []
71 |
72 | class_class_uri: ClassVar[URIRef] = LINKML["Annotation"]
73 | class_class_curie: ClassVar[str] = "linkml:Annotation"
74 | class_name: ClassVar[str] = "annotation"
75 | class_model_uri: ClassVar[URIRef] = LINKML.Annotation
76 |
77 | tag: Union[str, AnnotationTag] = None
78 | value: Union[dict, AnyValue] = None
79 | annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]] = empty_dict()
80 |
81 | def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
82 | if self._is_empty(self.tag):
83 | self.MissingRequiredField("tag")
84 | if not isinstance(self.tag, AnnotationTag):
85 | self.tag = AnnotationTag(self.tag)
86 |
87 | self._normalize_inlined_as_dict(slot_name="annotations", slot_type=Annotation, key_name="tag", keyed=True)
88 |
89 | super().__post_init__(**kwargs)
90 |
91 |
92 | # Enumerations
93 |
94 |
95 | # Slots
96 | class slots:
97 | pass
98 |
99 | slots.annotations = Slot(uri=LINKML.annotations, name="annotations", curie=LINKML.curie('annotations'),
100 | model_uri=LINKML.annotations, domain=None, range=Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]])
101 |
--------------------------------------------------------------------------------
/linkml_model/array.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkml/linkml-model/9c49cbe79227643d7e378c3b2800d9e3ebede974/linkml_model/array.py
--------------------------------------------------------------------------------
/linkml_model/excel/meta.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkml/linkml-model/9c49cbe79227643d7e378c3b2800d9e3ebede974/linkml_model/excel/meta.xlsx
--------------------------------------------------------------------------------
/linkml_model/extensions.py:
--------------------------------------------------------------------------------
1 | # Auto generated from extensions.yaml by pythongen.py version: 0.0.1
2 | # Generation date: 2024-02-07T17:29:29
3 | # Schema: extensions
4 | #
5 | # id: https://w3id.org/linkml/extensions
6 | # description: Extension mixin
7 | # license: https://creativecommons.org/publicdomain/zero/1.0/
8 |
9 | import dataclasses
10 | import re
11 | from jsonasobj2 import JsonObj, as_dict
12 | from typing import Optional, List, Union, Dict, ClassVar, Any
13 | from dataclasses import dataclass
14 |
15 | from linkml_runtime.utils.slot import Slot
16 | from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode
17 | from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
18 | from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
19 | from linkml_runtime.utils.formatutils import camelcase, underscore, sfx
20 | from linkml_runtime.utils.enumerations import EnumDefinitionImpl
21 | from rdflib import Namespace, URIRef
22 | from linkml_runtime.utils.curienamespace import CurieNamespace
23 | from .types import Uriorcurie
24 | from linkml_runtime.utils.metamodelcore import URIorCURIE
25 |
26 | metamodel_version = "1.7.0"
27 | version = "2.0.0"
28 |
29 | # Overwrite dataclasses _init_fn to add **kwargs in __init__
30 | dataclasses._init_fn = dataclasses_init_fn_with_kwargs
31 |
32 | # Namespaces
33 | LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/')
34 | DEFAULT_ = LINKML
35 |
36 |
37 | # Types
38 |
39 | # Class references
40 | class ExtensionTag(URIorCURIE):
41 | pass
42 |
43 |
44 | AnyValue = Any
45 |
46 | @dataclass
47 | class Extension(YAMLRoot):
48 | """
49 | a tag/value pair used to add non-model information to an entry
50 | """
51 | _inherited_slots: ClassVar[List[str]] = []
52 |
53 | class_class_uri: ClassVar[URIRef] = LINKML["Extension"]
54 | class_class_curie: ClassVar[str] = "linkml:Extension"
55 | class_name: ClassVar[str] = "extension"
56 | class_model_uri: ClassVar[URIRef] = LINKML.Extension
57 |
58 | tag: Union[str, ExtensionTag] = None
59 | value: Union[dict, AnyValue] = None
60 | extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, "Extension"]], List[Union[dict, "Extension"]]]] = empty_dict()
61 |
62 | def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
63 | if self._is_empty(self.tag):
64 | self.MissingRequiredField("tag")
65 | if not isinstance(self.tag, ExtensionTag):
66 | self.tag = ExtensionTag(self.tag)
67 |
68 | self._normalize_inlined_as_dict(slot_name="extensions", slot_type=Extension, key_name="tag", keyed=True)
69 |
70 | super().__post_init__(**kwargs)
71 |
72 |
73 | @dataclass
74 | class Extensible(YAMLRoot):
75 | """
76 | mixin for classes that support extension
77 | """
78 | _inherited_slots: ClassVar[List[str]] = []
79 |
80 | class_class_uri: ClassVar[URIRef] = LINKML["Extensible"]
81 | class_class_curie: ClassVar[str] = "linkml:Extensible"
82 | class_name: ClassVar[str] = "extensible"
83 | class_model_uri: ClassVar[URIRef] = LINKML.Extensible
84 |
85 | extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict()
86 |
87 | def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
88 | self._normalize_inlined_as_dict(slot_name="extensions", slot_type=Extension, key_name="tag", keyed=True)
89 |
90 | super().__post_init__(**kwargs)
91 |
92 |
93 | # Enumerations
94 |
95 |
96 | # Slots
97 | class slots:
98 | pass
99 |
100 | slots.extensions = Slot(uri=LINKML.extensions, name="extensions", curie=LINKML.curie('extensions'),
101 | model_uri=LINKML.extensions, domain=None, range=Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]])
102 |
103 | slots.extension_tag = Slot(uri=LINKML.tag, name="extension_tag", curie=LINKML.curie('tag'),
104 | model_uri=LINKML.extension_tag, domain=Extension, range=Union[str, ExtensionTag])
105 |
106 | slots.extension_value = Slot(uri=LINKML.value, name="extension_value", curie=LINKML.curie('value'),
107 | model_uri=LINKML.extension_value, domain=Extension, range=Union[dict, AnyValue])
108 |
--------------------------------------------------------------------------------
/linkml_model/graphql/README.md:
--------------------------------------------------------------------------------
1 | # graphql
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/json/README.md:
--------------------------------------------------------------------------------
1 | # json
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/README.md:
--------------------------------------------------------------------------------
1 | # jsonld
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/annotations.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from annotations.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:10\n Schema: annotations\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/annotations\n description: Annotations mixin\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "@vocab": "https://w3id.org/linkml/",
6 | "annotations": {
7 | "@type": "@id"
8 | },
9 | "tag": {
10 | "@type": "@id"
11 | },
12 | "extensions": {
13 | "@type": "@id"
14 | }
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/annotations.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from annotations.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:22\n Schema: annotations\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/annotations\n description: Annotations mixin\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "@vocab": "https://w3id.org/linkml/",
6 | "annotations": {
7 | "@type": "@id"
8 | },
9 | "tag": {
10 | "@type": "@id"
11 | },
12 | "extensions": {
13 | "@type": "@id"
14 | }
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/datasets.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from datasets.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:17\n Schema: datasets\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/datasets\n description: A datamodel for datasets\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "bibo": "http://example.org/UNKNOWN/bibo/",
5 | "csvw": "http://www.w3.org/ns/csvw#",
6 | "datasets": {
7 | "@id": "https://w3id.org/linkml/report",
8 | "@prefix": true
9 | },
10 | "dcat": "http://www.w3.org/ns/dcat#",
11 | "dcterms": "http://purl.org/dc/terms/",
12 | "formats": "http://www.w3.org/ns/formats/",
13 | "frictionless": "https://specs.frictionlessdata.io/",
14 | "linkml": "https://w3id.org/linkml/",
15 | "mediatypes": "https://www.iana.org/assignments/media-types/",
16 | "oslc": "http://example.org/UNKNOWN/oslc/",
17 | "owl": "http://www.w3.org/2002/07/owl#",
18 | "pav": "http://purl.org/pav/",
19 | "prov": "http://www.w3.org/ns/prov#",
20 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
21 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
22 | "schema": "http://schema.org/",
23 | "sh": "https://w3id.org/shacl/",
24 | "skos": "http://www.w3.org/2004/02/skos/core#",
25 | "void": "http://rdfs.org/ns/void#",
26 | "xsd": "http://www.w3.org/2001/XMLSchema#",
27 | "@vocab": "https://w3id.org/linkml/report",
28 | "bytes": {
29 | "@type": "xsd:integer",
30 | "@id": "dcat:byteSize"
31 | },
32 | "conforms_to": {
33 | "@type": "@id",
34 | "@id": "dcterms:conformsTo"
35 | },
36 | "conforms_to_class": {
37 | "@type": "@id"
38 | },
39 | "conforms_to_schema": {
40 | "@type": "@id"
41 | },
42 | "created_by": {
43 | "@type": "@id",
44 | "@id": "pav:createdBy"
45 | },
46 | "created_on": {
47 | "@type": "xsd:dateTime",
48 | "@id": "pav:createdOn"
49 | },
50 | "description": {
51 | "@id": "dcterms:description"
52 | },
53 | "dialect": {
54 | "@id": "csvw:dialect"
55 | },
56 | "download_url": {
57 | "@type": "@id",
58 | "@id": "dcat:downloadURL"
59 | },
60 | "format": {
61 | "@context": {
62 | "@vocab": "@null",
63 | "text": "skos:notation",
64 | "description": "skos:prefLabel",
65 | "meaning": "@id"
66 | },
67 | "@id": "dcterms:format"
68 | },
69 | "id": "@id",
70 | "issued": {
71 | "@type": "xsd:dateTime",
72 | "@id": "dcterms:issued"
73 | },
74 | "keywords": {
75 | "@id": "dcat:keyword"
76 | },
77 | "last_updated_on": {
78 | "@type": "xsd:dateTime",
79 | "@id": "pav:lastUpdatedOn"
80 | },
81 | "license": {
82 | "@id": "dcterms:license"
83 | },
84 | "media_type": {
85 | "@id": "dcat:mediaType"
86 | },
87 | "modified_by": {
88 | "@type": "@id",
89 | "@id": "oslc:modifiedBy"
90 | },
91 | "page": {
92 | "@id": "dcat:landingPage"
93 | },
94 | "profile": {
95 | "@type": "@id"
96 | },
97 | "publisher": {
98 | "@type": "@id",
99 | "@id": "dcterms:publisher"
100 | },
101 | "resources": {
102 | "@type": "@id",
103 | "@id": "dcat:distribution"
104 | },
105 | "status": {
106 | "@type": "@id",
107 | "@id": "bibo:status"
108 | },
109 | "test_roles": {
110 | "@context": {
111 | "@vocab": "@null",
112 | "text": "skos:notation",
113 | "description": "skos:prefLabel",
114 | "meaning": "@id"
115 | }
116 | },
117 | "themes": {
118 | "@type": "@id",
119 | "@id": "dcat:theme"
120 | },
121 | "title": {
122 | "@id": "dcterms:title"
123 | },
124 | "version": {
125 | "@id": "pav:version"
126 | },
127 | "was_derived_from": {
128 | "@id": "prov:wasDerivedFrom"
129 | },
130 | "DataPackage": {
131 | "@id": "void:Dataset"
132 | },
133 | "DataResource": {
134 | "@id": "dcat:Distribution"
135 | }
136 | }
137 | }
138 |
139 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/datasets.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from datasets.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:28\n Schema: datasets\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/datasets\n description: A datamodel for datasets\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "bibo": "http://example.org/UNKNOWN/bibo/",
5 | "csvw": "http://www.w3.org/ns/csvw#",
6 | "datasets": {
7 | "@id": "https://w3id.org/linkml/report",
8 | "@prefix": true
9 | },
10 | "dcat": "http://www.w3.org/ns/dcat#",
11 | "dcterms": "http://purl.org/dc/terms/",
12 | "formats": "http://www.w3.org/ns/formats/",
13 | "frictionless": "https://specs.frictionlessdata.io/",
14 | "linkml": "https://w3id.org/linkml/",
15 | "mediatypes": "https://www.iana.org/assignments/media-types/",
16 | "oslc": "http://example.org/UNKNOWN/oslc/",
17 | "owl": "http://www.w3.org/2002/07/owl#",
18 | "pav": "http://purl.org/pav/",
19 | "prov": "http://www.w3.org/ns/prov#",
20 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
21 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
22 | "schema": "http://schema.org/",
23 | "sh": "https://w3id.org/shacl/",
24 | "skos": "http://www.w3.org/2004/02/skos/core#",
25 | "void": "http://rdfs.org/ns/void#",
26 | "xsd": "http://www.w3.org/2001/XMLSchema#",
27 | "@vocab": "https://w3id.org/linkml/report",
28 | "bytes": {
29 | "@type": "xsd:integer",
30 | "@id": "dcat:byteSize"
31 | },
32 | "conforms_to": {
33 | "@type": "@id",
34 | "@id": "dcterms:conformsTo"
35 | },
36 | "conforms_to_class": {
37 | "@type": "@id"
38 | },
39 | "conforms_to_schema": {
40 | "@type": "@id"
41 | },
42 | "created_by": {
43 | "@type": "@id",
44 | "@id": "pav:createdBy"
45 | },
46 | "created_on": {
47 | "@type": "xsd:dateTime",
48 | "@id": "pav:createdOn"
49 | },
50 | "description": {
51 | "@id": "dcterms:description"
52 | },
53 | "dialect": {
54 | "@id": "csvw:dialect"
55 | },
56 | "download_url": {
57 | "@type": "@id",
58 | "@id": "dcat:downloadURL"
59 | },
60 | "format": {
61 | "@context": {
62 | "@vocab": "@null",
63 | "text": "skos:notation",
64 | "description": "skos:prefLabel",
65 | "meaning": "@id"
66 | },
67 | "@id": "dcterms:format"
68 | },
69 | "id": "@id",
70 | "issued": {
71 | "@type": "xsd:dateTime",
72 | "@id": "dcterms:issued"
73 | },
74 | "keywords": {
75 | "@id": "dcat:keyword"
76 | },
77 | "last_updated_on": {
78 | "@type": "xsd:dateTime",
79 | "@id": "pav:lastUpdatedOn"
80 | },
81 | "license": {
82 | "@id": "dcterms:license"
83 | },
84 | "media_type": {
85 | "@id": "dcat:mediaType"
86 | },
87 | "modified_by": {
88 | "@type": "@id",
89 | "@id": "oslc:modifiedBy"
90 | },
91 | "page": {
92 | "@id": "dcat:landingPage"
93 | },
94 | "profile": {
95 | "@type": "@id"
96 | },
97 | "publisher": {
98 | "@type": "@id",
99 | "@id": "dcterms:publisher"
100 | },
101 | "resources": {
102 | "@type": "@id",
103 | "@id": "dcat:distribution"
104 | },
105 | "status": {
106 | "@type": "@id",
107 | "@id": "bibo:status"
108 | },
109 | "test_roles": {
110 | "@context": {
111 | "@vocab": "@null",
112 | "text": "skos:notation",
113 | "description": "skos:prefLabel",
114 | "meaning": "@id"
115 | }
116 | },
117 | "themes": {
118 | "@type": "@id",
119 | "@id": "dcat:theme"
120 | },
121 | "title": {
122 | "@id": "dcterms:title"
123 | },
124 | "version": {
125 | "@id": "pav:version"
126 | },
127 | "was_derived_from": {
128 | "@id": "prov:wasDerivedFrom"
129 | },
130 | "DataPackage": {
131 | "@id": "void:Dataset"
132 | },
133 | "DataResource": {
134 | "@id": "dcat:Distribution"
135 | }
136 | }
137 | }
138 |
139 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/extensions.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from extensions.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:13\n Schema: extensions\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/extensions\n description: Extension mixin\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "@vocab": "https://w3id.org/linkml/",
6 | "tag": {
7 | "@type": "@id"
8 | },
9 | "extensions": {
10 | "@type": "@id"
11 | }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/extensions.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from extensions.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:25\n Schema: extensions\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/extensions\n description: Extension mixin\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "@vocab": "https://w3id.org/linkml/",
6 | "tag": {
7 | "@type": "@id"
8 | },
9 | "extensions": {
10 | "@type": "@id"
11 | }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/mappings.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from mappings.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:19\n Schema: mappings\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/mappings\n description: LinkML model for mappings\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "IAO": {
5 | "@id": "http://purl.obolibrary.org/obo/IAO_",
6 | "@prefix": true
7 | },
8 | "OIO": "http://www.geneontology.org/formats/oboInOwl#",
9 | "linkml": "https://w3id.org/linkml/",
10 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
11 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
12 | "skos": "http://www.w3.org/2004/02/skos/core#",
13 | "xsd": "http://www.w3.org/2001/XMLSchema#",
14 | "@vocab": "https://w3id.org/linkml/",
15 | "broad_mappings": {
16 | "@type": "@id",
17 | "@id": "skos:broadMatch"
18 | },
19 | "close_mappings": {
20 | "@type": "@id",
21 | "@id": "skos:closeMatch"
22 | },
23 | "deprecated_element_has_exact_replacement": {
24 | "@type": "@id"
25 | },
26 | "deprecated_element_has_possible_replacement": {
27 | "@type": "@id"
28 | },
29 | "exact_mappings": {
30 | "@type": "@id",
31 | "@id": "skos:exactMatch"
32 | },
33 | "mappings": {
34 | "@type": "@id",
35 | "@id": "skos:mappingRelation"
36 | },
37 | "narrow_mappings": {
38 | "@type": "@id",
39 | "@id": "skos:narrowMatch"
40 | },
41 | "related_mappings": {
42 | "@type": "@id",
43 | "@id": "skos:relatedMatch"
44 | }
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/mappings.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from mappings.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:31\n Schema: mappings\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/mappings\n description: LinkML model for mappings\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "IAO": {
5 | "@id": "http://purl.obolibrary.org/obo/IAO_",
6 | "@prefix": true
7 | },
8 | "OIO": "http://www.geneontology.org/formats/oboInOwl#",
9 | "linkml": "https://w3id.org/linkml/",
10 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
11 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
12 | "skos": "http://www.w3.org/2004/02/skos/core#",
13 | "xsd": "http://www.w3.org/2001/XMLSchema#",
14 | "@vocab": "https://w3id.org/linkml/",
15 | "broad_mappings": {
16 | "@type": "@id",
17 | "@id": "skos:broadMatch"
18 | },
19 | "close_mappings": {
20 | "@type": "@id",
21 | "@id": "skos:closeMatch"
22 | },
23 | "deprecated_element_has_exact_replacement": {
24 | "@type": "@id"
25 | },
26 | "deprecated_element_has_possible_replacement": {
27 | "@type": "@id"
28 | },
29 | "exact_mappings": {
30 | "@type": "@id",
31 | "@id": "skos:exactMatch"
32 | },
33 | "mappings": {
34 | "@type": "@id",
35 | "@id": "skos:mappingRelation"
36 | },
37 | "narrow_mappings": {
38 | "@type": "@id",
39 | "@id": "skos:narrowMatch"
40 | },
41 | "related_mappings": {
42 | "@type": "@id",
43 | "@id": "skos:relatedMatch"
44 | }
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/types.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from types.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:09\n Schema: types\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/types\n description: Shared type definitions for the core LinkML mode and metamodel\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "shex": "http://www.w3.org/ns/shex#",
6 | "xsd": "http://www.w3.org/2001/XMLSchema#",
7 | "@vocab": "https://w3id.org/linkml/"
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/types.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from types.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-13T17:56:55\n Schema: types\n metamodel version: 1.7.0\n model version: 2.0.0\n \n id: https://w3id.org/linkml/types\n description: Shared type definitions for the core LinkML mode and metamodel\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "shex": "http://www.w3.org/ns/shex#",
6 | "xsd": "http://www.w3.org/2001/XMLSchema#",
7 | "@vocab": "https://w3id.org/linkml/"
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/units.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from units.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:11\n Schema: units\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/units\n description: Units datamodel\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "IAO": {
5 | "@id": "http://purl.obolibrary.org/obo/IAO_",
6 | "@prefix": true
7 | },
8 | "OIO": "http://www.geneontology.org/formats/oboInOwl#",
9 | "linkml": "https://w3id.org/linkml/",
10 | "qudt": "http://qudt.org/schema/qudt/",
11 | "skos": "http://www.w3.org/2004/02/skos/core#",
12 | "@vocab": "https://w3id.org/linkml/",
13 | "annotations": {
14 | "@type": "@id"
15 | },
16 | "broad_mappings": {
17 | "@type": "@id",
18 | "@id": "skos:broadMatch"
19 | },
20 | "close_mappings": {
21 | "@type": "@id",
22 | "@id": "skos:closeMatch"
23 | },
24 | "deprecated_element_has_exact_replacement": {
25 | "@type": "@id"
26 | },
27 | "deprecated_element_has_possible_replacement": {
28 | "@type": "@id"
29 | },
30 | "exact_mappings": {
31 | "@type": "@id",
32 | "@id": "skos:exactMatch"
33 | },
34 | "tag": {
35 | "@type": "@id"
36 | },
37 | "extensions": {
38 | "@type": "@id"
39 | },
40 | "has_quantity_kind": {
41 | "@type": "@id",
42 | "@id": "qudt:hasQuantityKind"
43 | },
44 | "iec61360code": {
45 | "@id": "qudt:iec61360Code"
46 | },
47 | "mappings": {
48 | "@type": "@id",
49 | "@id": "skos:mappingRelation"
50 | },
51 | "narrow_mappings": {
52 | "@type": "@id",
53 | "@id": "skos:narrowMatch"
54 | },
55 | "related_mappings": {
56 | "@type": "@id",
57 | "@id": "skos:relatedMatch"
58 | },
59 | "symbol": {
60 | "@id": "qudt:symbol"
61 | },
62 | "ucum_code": {
63 | "@id": "qudt:ucumCode"
64 | },
65 | "unit": {
66 | "@type": "@id",
67 | "@id": "qudt:unit"
68 | },
69 | "UnitOfMeasure": {
70 | "@id": "qudt:Unit"
71 | }
72 | }
73 | }
74 |
75 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/units.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from units.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:23\n Schema: units\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/units\n description: Units datamodel\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "IAO": {
5 | "@id": "http://purl.obolibrary.org/obo/IAO_",
6 | "@prefix": true
7 | },
8 | "OIO": "http://www.geneontology.org/formats/oboInOwl#",
9 | "linkml": "https://w3id.org/linkml/",
10 | "qudt": "http://qudt.org/schema/qudt/",
11 | "skos": "http://www.w3.org/2004/02/skos/core#",
12 | "@vocab": "https://w3id.org/linkml/",
13 | "annotations": {
14 | "@type": "@id"
15 | },
16 | "broad_mappings": {
17 | "@type": "@id",
18 | "@id": "skos:broadMatch"
19 | },
20 | "close_mappings": {
21 | "@type": "@id",
22 | "@id": "skos:closeMatch"
23 | },
24 | "deprecated_element_has_exact_replacement": {
25 | "@type": "@id"
26 | },
27 | "deprecated_element_has_possible_replacement": {
28 | "@type": "@id"
29 | },
30 | "exact_mappings": {
31 | "@type": "@id",
32 | "@id": "skos:exactMatch"
33 | },
34 | "tag": {
35 | "@type": "@id"
36 | },
37 | "extensions": {
38 | "@type": "@id"
39 | },
40 | "has_quantity_kind": {
41 | "@type": "@id",
42 | "@id": "qudt:hasQuantityKind"
43 | },
44 | "iec61360code": {
45 | "@id": "qudt:iec61360Code"
46 | },
47 | "mappings": {
48 | "@type": "@id",
49 | "@id": "skos:mappingRelation"
50 | },
51 | "narrow_mappings": {
52 | "@type": "@id",
53 | "@id": "skos:narrowMatch"
54 | },
55 | "related_mappings": {
56 | "@type": "@id",
57 | "@id": "skos:relatedMatch"
58 | },
59 | "symbol": {
60 | "@id": "qudt:symbol"
61 | },
62 | "ucum_code": {
63 | "@id": "qudt:ucumCode"
64 | },
65 | "unit": {
66 | "@type": "@id",
67 | "@id": "qudt:unit"
68 | },
69 | "UnitOfMeasure": {
70 | "@id": "qudt:Unit"
71 | }
72 | }
73 | }
74 |
75 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/validation.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from validation.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:18\n Schema: reporting\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/reporting\n description: A datamodel for reports on data, based on SHACL\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "owl": "http://www.w3.org/2002/07/owl#",
6 | "pav": "http://purl.org/pav/",
7 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
8 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
9 | "reporting": {
10 | "@id": "https://w3id.org/linkml/report",
11 | "@prefix": true
12 | },
13 | "schema": "http://schema.org/",
14 | "sh": "https://w3id.org/shacl/",
15 | "skos": "http://www.w3.org/2004/02/skos/core#",
16 | "xsd": "http://www.w3.org/2001/XMLSchema#",
17 | "@vocab": "https://w3id.org/linkml/report",
18 | "instantiates": {
19 | "@type": "shex:nonLiteral"
20 | },
21 | "node_source": {
22 | "@type": "shex:nonLiteral"
23 | },
24 | "object": {
25 | "@type": "shex:nonLiteral",
26 | "@id": "sh:value"
27 | },
28 | "predicate": {
29 | "@type": "shex:nonLiteral"
30 | },
31 | "severity": {
32 | "@context": {
33 | "@vocab": "@null",
34 | "text": "skos:notation",
35 | "description": "skos:prefLabel",
36 | "meaning": "@id"
37 | }
38 | },
39 | "subject": {
40 | "@type": "shex:nonLiteral",
41 | "@id": "sh:focusNode"
42 | },
43 | "type": {
44 | "@type": "shex:nonLiteral",
45 | "@id": "sh:sourceConstraintComponent"
46 | },
47 | "results": {
48 | "@type": "@id"
49 | },
50 | "ValidationReport": {
51 | "@id": "sh:ValidationReport"
52 | },
53 | "ValidationResult": {
54 | "@id": "sh:ValidationResult"
55 | }
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/linkml_model/jsonld/validation.model.context.jsonld:
--------------------------------------------------------------------------------
1 | {
2 | "_comments": "Auto generated from validation.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-07-14T00:56:30\n Schema: reporting\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/linkml/reporting\n description: A datamodel for reports on data, based on SHACL\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
3 | "@context": {
4 | "linkml": "https://w3id.org/linkml/",
5 | "owl": "http://www.w3.org/2002/07/owl#",
6 | "pav": "http://purl.org/pav/",
7 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
8 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
9 | "reporting": {
10 | "@id": "https://w3id.org/linkml/report",
11 | "@prefix": true
12 | },
13 | "schema": "http://schema.org/",
14 | "sh": "https://w3id.org/shacl/",
15 | "skos": "http://www.w3.org/2004/02/skos/core#",
16 | "xsd": "http://www.w3.org/2001/XMLSchema#",
17 | "@vocab": "https://w3id.org/linkml/report",
18 | "instantiates": {
19 | "@type": "shex:nonLiteral"
20 | },
21 | "node_source": {
22 | "@type": "shex:nonLiteral"
23 | },
24 | "object": {
25 | "@type": "shex:nonLiteral",
26 | "@id": "sh:value"
27 | },
28 | "predicate": {
29 | "@type": "shex:nonLiteral"
30 | },
31 | "severity": {
32 | "@context": {
33 | "@vocab": "@null",
34 | "text": "skos:notation",
35 | "description": "skos:prefLabel",
36 | "meaning": "@id"
37 | }
38 | },
39 | "subject": {
40 | "@type": "shex:nonLiteral",
41 | "@id": "sh:focusNode"
42 | },
43 | "type": {
44 | "@type": "shex:nonLiteral",
45 | "@id": "sh:sourceConstraintComponent"
46 | },
47 | "results": {
48 | "@type": "@id"
49 | },
50 | "ValidationReport": {
51 | "@id": "sh:ValidationReport"
52 | },
53 | "ValidationResult": {
54 | "@id": "sh:ValidationResult"
55 | }
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/README.md:
--------------------------------------------------------------------------------
1 | # jsonschema
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/annotations.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$defs": {
3 | "Annotation": {
4 | "additionalProperties": false,
5 | "description": "a tag/value pair with the semantics of OWL Annotation",
6 | "properties": {
7 | "annotations": {
8 | "additionalProperties": {
9 | "$ref": "#/$defs/Annotation__identifier_optional"
10 | },
11 | "description": "a collection of tag/text tuples with the semantics of OWL Annotation"
12 | },
13 | "extensions": {
14 | "additionalProperties": {
15 | "$ref": "#/$defs/Extension__identifier_optional"
16 | },
17 | "description": "a tag/text tuple attached to an arbitrary element"
18 | },
19 | "tag": {
20 | "description": "a tag associated with an extension",
21 | "type": "string"
22 | },
23 | "value": {
24 | "description": "the actual annotation",
25 | "type": "string"
26 | }
27 | },
28 | "required": [
29 | "tag",
30 | "value"
31 | ],
32 | "title": "Annotation",
33 | "type": "object"
34 | },
35 | "Annotation__identifier_optional": {
36 | "additionalProperties": false,
37 | "description": "a tag/value pair with the semantics of OWL Annotation",
38 | "properties": {
39 | "annotations": {
40 | "additionalProperties": {
41 | "$ref": "#/$defs/Annotation__identifier_optional"
42 | },
43 | "description": "a collection of tag/text tuples with the semantics of OWL Annotation"
44 | },
45 | "extensions": {
46 | "additionalProperties": {
47 | "$ref": "#/$defs/Extension__identifier_optional"
48 | },
49 | "description": "a tag/text tuple attached to an arbitrary element"
50 | },
51 | "tag": {
52 | "description": "a tag associated with an extension",
53 | "type": "string"
54 | },
55 | "value": {
56 | "description": "the actual annotation",
57 | "type": "string"
58 | }
59 | },
60 | "required": [
61 | "value"
62 | ],
63 | "title": "Annotation",
64 | "type": "object"
65 | },
66 | "Extension": {
67 | "additionalProperties": false,
68 | "description": "a tag/value pair used to add non-model information to an entry",
69 | "properties": {
70 | "extensions": {
71 | "additionalProperties": {
72 | "$ref": "#/$defs/Extension__identifier_optional"
73 | },
74 | "description": "a tag/text tuple attached to an arbitrary element"
75 | },
76 | "tag": {
77 | "description": "a tag associated with an extension",
78 | "type": "string"
79 | },
80 | "value": {
81 | "description": "the actual annotation",
82 | "type": "string"
83 | }
84 | },
85 | "required": [
86 | "tag",
87 | "value"
88 | ],
89 | "title": "Extension",
90 | "type": "object"
91 | },
92 | "Extension__identifier_optional": {
93 | "additionalProperties": false,
94 | "description": "a tag/value pair used to add non-model information to an entry",
95 | "properties": {
96 | "extensions": {
97 | "additionalProperties": {
98 | "$ref": "#/$defs/Extension__identifier_optional"
99 | },
100 | "description": "a tag/text tuple attached to an arbitrary element"
101 | },
102 | "tag": {
103 | "description": "a tag associated with an extension",
104 | "type": "string"
105 | },
106 | "value": {
107 | "description": "the actual annotation",
108 | "type": "string"
109 | }
110 | },
111 | "required": [
112 | "value"
113 | ],
114 | "title": "Extension",
115 | "type": "object"
116 | }
117 | },
118 | "$id": "https://w3id.org/linkml/annotations",
119 | "$schema": "http://json-schema.org/draft-07/schema#",
120 | "additionalProperties": true,
121 | "metamodel_version": "1.7.0",
122 | "properties": {},
123 | "required": [],
124 | "title": "annotations",
125 | "type": "object",
126 | "version": "2.0.0"
127 | }
128 |
129 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/extensions.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$defs": {
3 | "Extension": {
4 | "additionalProperties": false,
5 | "description": "a tag/value pair used to add non-model information to an entry",
6 | "properties": {
7 | "extensions": {
8 | "additionalProperties": {
9 | "$ref": "#/$defs/Extension__identifier_optional"
10 | },
11 | "description": "a tag/text tuple attached to an arbitrary element"
12 | },
13 | "tag": {
14 | "description": "a tag associated with an extension",
15 | "type": "string"
16 | },
17 | "value": {
18 | "description": "the actual annotation",
19 | "type": "string"
20 | }
21 | },
22 | "required": [
23 | "tag",
24 | "value"
25 | ],
26 | "title": "Extension",
27 | "type": "object"
28 | },
29 | "Extension__identifier_optional": {
30 | "additionalProperties": false,
31 | "description": "a tag/value pair used to add non-model information to an entry",
32 | "properties": {
33 | "extensions": {
34 | "additionalProperties": {
35 | "$ref": "#/$defs/Extension__identifier_optional"
36 | },
37 | "description": "a tag/text tuple attached to an arbitrary element"
38 | },
39 | "tag": {
40 | "description": "a tag associated with an extension",
41 | "type": "string"
42 | },
43 | "value": {
44 | "description": "the actual annotation",
45 | "type": "string"
46 | }
47 | },
48 | "required": [
49 | "value"
50 | ],
51 | "title": "Extension",
52 | "type": "object"
53 | }
54 | },
55 | "$id": "https://w3id.org/linkml/extensions",
56 | "$schema": "http://json-schema.org/draft-07/schema#",
57 | "additionalProperties": true,
58 | "metamodel_version": "1.7.0",
59 | "properties": {},
60 | "required": [],
61 | "title": "extensions",
62 | "type": "object",
63 | "version": "2.0.0"
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/mappings.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$defs": {},
3 | "$id": "https://w3id.org/linkml/mappings",
4 | "$schema": "http://json-schema.org/draft-07/schema#",
5 | "additionalProperties": true,
6 | "metamodel_version": "1.7.0",
7 | "properties": {},
8 | "required": [],
9 | "title": "mappings",
10 | "type": "object",
11 | "version": "2.0.0"
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/types.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$defs": {},
3 | "$id": "https://w3id.org/linkml/types",
4 | "$schema": "http://json-schema.org/draft-07/schema#",
5 | "additionalProperties": true,
6 | "metamodel_version": "1.7.0",
7 | "properties": {},
8 | "required": [],
9 | "title": "types",
10 | "type": "object",
11 | "version": "2.0.0"
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/linkml_model/jsonschema/validation.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$defs": {
3 | "ProblemType": {
4 | "description": "",
5 | "enum": [
6 | "undeclared_slot",
7 | "inapplicable_slot",
8 | "missing_slot_value",
9 | "slot_range_violation",
10 | "max_count_violation",
11 | "parsing_error"
12 | ],
13 | "title": "ProblemType",
14 | "type": "string"
15 | },
16 | "SeverityOptions": {
17 | "description": "",
18 | "enum": [
19 | "FATAL",
20 | "ERROR",
21 | "WARNING",
22 | "INFO"
23 | ],
24 | "title": "SeverityOptions",
25 | "type": "string"
26 | },
27 | "ValidationReport": {
28 | "additionalProperties": false,
29 | "description": "A report object",
30 | "properties": {
31 | "results": {
32 | "items": {
33 | "$ref": "#/$defs/ValidationResult"
34 | },
35 | "type": "array"
36 | }
37 | },
38 | "required": [],
39 | "title": "ValidationReport",
40 | "type": "object"
41 | },
42 | "ValidationResult": {
43 | "additionalProperties": false,
44 | "description": "An individual result arising from validation of a data instance using a particular rule",
45 | "properties": {
46 | "info": {
47 | "type": "string"
48 | },
49 | "instantiates": {
50 | "type": "string"
51 | },
52 | "node_source": {
53 | "type": "string"
54 | },
55 | "object": {
56 | "type": "string"
57 | },
58 | "object_str": {
59 | "type": "string"
60 | },
61 | "predicate": {
62 | "type": "string"
63 | },
64 | "severity": {
65 | "$ref": "#/$defs/SeverityOptions"
66 | },
67 | "subject": {
68 | "type": "string"
69 | },
70 | "type": {
71 | "type": "string"
72 | }
73 | },
74 | "required": [],
75 | "title": "ValidationResult",
76 | "type": "object"
77 | }
78 | },
79 | "$id": "https://w3id.org/linkml/reporting",
80 | "$schema": "http://json-schema.org/draft-07/schema#",
81 | "additionalProperties": true,
82 | "metamodel_version": "1.7.0",
83 | "properties": {},
84 | "required": [],
85 | "title": "reporting",
86 | "type": "object",
87 | "version": null
88 | }
89 |
90 |
--------------------------------------------------------------------------------
/linkml_model/mappings.py:
--------------------------------------------------------------------------------
1 | # Auto generated from mappings.yaml by pythongen.py version: 0.0.1
2 | # Generation date: 2024-02-07T17:29:35
3 | # Schema: mappings
4 | #
5 | # id: https://w3id.org/linkml/mappings
6 | # description: LinkML model for mappings
7 | # license: https://creativecommons.org/publicdomain/zero/1.0/
8 |
9 | import dataclasses
10 | import re
11 | from jsonasobj2 import JsonObj, as_dict
12 | from typing import Optional, List, Union, Dict, ClassVar, Any
13 | from dataclasses import dataclass
14 |
15 | from linkml_runtime.utils.slot import Slot
16 | from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode
17 | from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
18 | from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
19 | from linkml_runtime.utils.formatutils import camelcase, underscore, sfx
20 | from linkml_runtime.utils.enumerations import EnumDefinitionImpl
21 | from rdflib import Namespace, URIRef
22 | from linkml_runtime.utils.curienamespace import CurieNamespace
23 | from .types import Uriorcurie
24 | from linkml_runtime.utils.metamodelcore import URIorCURIE
25 |
26 | metamodel_version = "1.7.0"
27 | version = "2.0.0"
28 |
29 | # Overwrite dataclasses _init_fn to add **kwargs in __init__
30 | dataclasses._init_fn = dataclasses_init_fn_with_kwargs
31 |
32 | # Namespaces
33 | IAO = CurieNamespace('IAO', 'http://purl.obolibrary.org/obo/IAO_')
34 | OIO = CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#')
35 | LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/')
36 | RDF = CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
37 | RDFS = CurieNamespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#')
38 | SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
39 | XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
40 | DEFAULT_ = LINKML
41 |
42 |
43 | # Types
44 |
45 | # Class references
46 |
47 |
48 |
49 |
50 | # Enumerations
51 |
52 |
53 | # Slots
54 | class slots:
55 | pass
56 |
57 | slots.mappings = Slot(uri=SKOS.mappingRelation, name="mappings", curie=SKOS.curie('mappingRelation'),
58 | model_uri=LINKML.mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
59 |
60 | slots.exact_mappings = Slot(uri=SKOS.exactMatch, name="exact mappings", curie=SKOS.curie('exactMatch'),
61 | model_uri=LINKML.exact_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
62 |
63 | slots.close_mappings = Slot(uri=SKOS.closeMatch, name="close mappings", curie=SKOS.curie('closeMatch'),
64 | model_uri=LINKML.close_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
65 |
66 | slots.related_mappings = Slot(uri=SKOS.relatedMatch, name="related mappings", curie=SKOS.curie('relatedMatch'),
67 | model_uri=LINKML.related_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
68 |
69 | slots.narrow_mappings = Slot(uri=SKOS.narrowMatch, name="narrow mappings", curie=SKOS.curie('narrowMatch'),
70 | model_uri=LINKML.narrow_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
71 |
72 | slots.broad_mappings = Slot(uri=SKOS.broadMatch, name="broad mappings", curie=SKOS.curie('broadMatch'),
73 | model_uri=LINKML.broad_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]])
74 |
75 | slots.deprecated_element_has_exact_replacement = Slot(uri=LINKML.deprecated_element_has_exact_replacement, name="deprecated element has exact replacement", curie=LINKML.curie('deprecated_element_has_exact_replacement'),
76 | model_uri=LINKML.deprecated_element_has_exact_replacement, domain=None, range=Optional[Union[str, URIorCURIE]], mappings = [IAO["0100001"]])
77 |
78 | slots.deprecated_element_has_possible_replacement = Slot(uri=LINKML.deprecated_element_has_possible_replacement, name="deprecated element has possible replacement", curie=LINKML.curie('deprecated_element_has_possible_replacement'),
79 | model_uri=LINKML.deprecated_element_has_possible_replacement, domain=None, range=Optional[Union[str, URIorCURIE]], mappings = [OIO["consider"]])
80 |
--------------------------------------------------------------------------------
/linkml_model/model/README.md:
--------------------------------------------------------------------------------
1 | # model
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/model/docs/credits.md:
--------------------------------------------------------------------------------
1 | # Credits
2 |
3 | this project was made using the [Link Model Language (LinkML) framework](https://github.com/linkml/linkml)
4 |
--------------------------------------------------------------------------------
/linkml_model/model/docs/home.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | Welcome to the LinkML metamodel reference guide. For full documentation see [linkml.io/linkml/](https://linkml.io/linkml/).
4 |
5 |
--------------------------------------------------------------------------------
/linkml_model/model/docs/specification/00preamble.md:
--------------------------------------------------------------------------------
1 | # Linked Data Modeling Language: Specification
2 |
3 | Authors:
4 |
5 | - Chris Mungall, Lawrence Berkeley National Laboratory
6 | - Harold Solbrig, Johns Hopkins University
7 |
8 | ## Abstract
9 |
10 | The Linked Data Modeling Language (LinkML) is a language for writing schemas that describe the structure of *instance* data. A LinkML schema consists of a number of different elements, including *classes*, which are used to type instances, and *slots* which are used to describe instance data attributes.
11 |
12 | The LinkML specification defines the structure of instance data using a functional-style syntax, and defines the elements of a schema, together with the rules for operating over these schemas.
13 |
14 | ## Notes
15 |
16 | More information about LinkML can be found on the [LinkML site](https://linkml.io), which includes introductory material and [tutorials](https://linkml.io/linkml/intro/tutorial).
17 | It also includes a reference implementation and set of tools for working with LinkML schemas and data.
18 |
19 | The specification provided here is intended to be independent of any particular tool or implementation.
20 |
21 | ### Status of this specification
22 |
23 | This is a draft specification open from comments to all.
24 |
25 | ### License
26 |
27 | This specification, like all parts of LinkML are in the public domain under a Creative Commons Zero license waiver.
28 |
29 |
--------------------------------------------------------------------------------
/linkml_model/model/docs/specification/01introduction.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This document is a functional draft specification for the Linked Data Modeling Language (LinkML).
4 |
5 | LinkML is a data modeling language for describing the structure of a collection of *instances*, where instances are tree-like object-oriented structures. Instances represent things of interest in a particular domain, such as individual people, biological samples, places, events, or abstract entities.
6 |
7 | Instances are either primitive *types* such as numbers or strings, or *objects* that are typed using *classes* from a LinkML *schema*. Classes are categories or groupings of things in the domain of interest; for example, `Person`, `Medical History`, `Data file`, or `Country`. Instances can be inter-related by assigning *values* to particular *slots*; for example, an instance of a Person may have values for slots `name` or `country of birth`.
8 |
9 | LinkML schemas also specify *rules* for determining if instances conform to the schema, and for *inference* adding additional implicit slot values.
10 |
11 | LinkML is independent of any programming language, database technology, and is independent of any concrete form for serializing instances of schemas. Mappings are provided for serializing instances as JSON, YAML, RDF, flat tables, or relational models, or for mapping to programming language structures. However, the structure and semantics of LinkML are not dependent on any of these. Schemas are typically expressed using the YAML serialization, but this specification is defined independent of that particular serialization.
12 |
13 | LinkML is self-describing, and any LinkML schema is itself a collection instances that instantiates elements in a special schema called the *LinkML metamodel*.
14 |
15 | ## Audience
16 |
17 | This document is intended for LinkML tool and framework implementers, and is intended to formally specify the structure and semantics of LinkML.
18 |
19 | For a more lightweight introduction, consult the material on the main [LinkML site](https://linkml.io),
20 | including the LinkML tutorial.
21 |
22 | ## Conventions and terminology
23 |
24 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
25 |
26 | ## BNF
27 |
28 | Grammars in this specification are written using the BNF notation, summarized below:
29 |
30 | Construct | Syntax |
31 | |---|---|
32 | terminal symbols | enclosed in single quotes |
33 | a set of terminal symbols described in English | italic |
34 | nonterminal symbols | boldface |
35 | zero or more | curly braces |
36 | zero or one | square brackets |
37 | alternative | vertical bar |
38 |
39 | We also include a meta-production rule for expressing comma-delimited lists
40 |
41 | ```
42 | List ::= [ { ',' List } ]
43 | ```
44 |
45 | ## Outline
46 |
47 | The specification is organized in 6 parts. The parts are not independent, as each part builds on concepts introduced in previous parts.
48 |
49 | ### Part 1: Introduction
50 |
51 | This section. Background information and preliminary definitions.
52 |
53 | ### Part 2: Structure and Syntax of Instances
54 |
55 | Part 2 provides a *structural specification* of LinkML **instances**. The structural specification is provided as a normative abstract functional-style syntax. UML diagrams are provided for informative purposes.
56 |
57 | This syntax is not intended as an actual exchange syntax for LinkML data. For that, existing syntaxes such as JSON, YAML, or RDF syntaxes should be used (see Part 6). The abstract syntax allows for a separation of the essential features of the language from issues related to any particular syntax.
58 |
59 | Part 2 also introduces a **path accessor** syntax for specifying how to traverse LinkML instances.
60 |
61 | The abstract syntax and path accessor syntax are used in the remainder of the specification.
62 |
63 | ### Part 3: Structure of Schemas
64 |
65 | Introduces the concept of a LinkML schema, which specifies how conforming LinkML instances are intended to be structured.
66 |
67 | This part specifies the core elements of a LinkML schema: [ClassDefinitions](https://w3id.org/linkml/ClassDefinition), [TypeDefinitions](https://w3id.org/linkml/TypeDefinition), [SlotDefinitions](https://w3id.org/linkml/SlotDefinition), [EnumDefinitions](https://w3id.org/linkml/EnumDefinition), as well as ancillary structures.
68 |
69 | This part also introduces the concept of the LinkML metamodel. A LinkML schema is both a specification of conformance conditions for an instance, and at the same time an instance that conforms to the metamodel schema.
70 |
71 | ### Part 4: Derived Schemas and Schema Semantics
72 |
73 | Specification of inference functions and procedures for **derived schemas** to populate missing values in schemas.
74 |
75 | ### Part 5: Validation of Instance Data
76 |
77 | Specification of the procedure for **validating** LinkML instances using a derived schema.
78 |
79 | ### Part 6: Mapping of Instance Data
80 |
81 | Specification of how LinkML instances are mapped to other data models and concrete syntaxes:
82 |
83 | - JSON and the JSON subset of YAML
84 | - RDF and JSON-LD
85 | - in-memory object-oriented representations
86 |
--------------------------------------------------------------------------------
/linkml_model/model/docs/specification/index.md:
--------------------------------------------------------------------------------
1 | # LinkML Specification
2 |
3 | ## Table of Contents
4 |
5 | - [Preamble](00preamble)
6 | - [Introduction](01introduction)
7 | - [Instances](02instances)
8 | - [Schemas](03schemas)
9 | - [Derived Schemas](D04derived-schemas)
10 | - [Validation](05validation)
11 | - [Mapping](06mapping)
12 |
--------------------------------------------------------------------------------
/linkml_model/model/import_map.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/annotations.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/annotations
2 | name: annotations
3 | description: Annotations mixin
4 | license: https://creativecommons.org/publicdomain/zero/1.0/
5 | version: 2.0.0
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 |
10 | default_prefix: linkml
11 | default_range: string
12 |
13 | emit_prefixes:
14 | - linkml
15 |
16 | imports:
17 | - linkml:types
18 | - linkml:extensions
19 |
20 | slots:
21 | annotations:
22 | is_a: extensions
23 | domain: annotatable
24 | range: annotation
25 | description: a collection of tag/text tuples with the semantics of OWL Annotation
26 | multivalued: true
27 |
28 |
29 | classes:
30 | annotatable:
31 | description: mixin for classes that support annotations
32 | mixin: true
33 | slots:
34 | - annotations
35 |
36 | annotation:
37 | description: a tag/value pair with the semantics of OWL Annotation
38 | is_a: extension
39 | mixins:
40 | - annotatable
41 | slots:
42 | - annotations
43 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/array.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/lib/arrays
2 | name: arrays
3 | title: LinkML Arrays
4 | description: >-
5 | LinkML templates for storing one-dimensional series, two-dimensional arrays,
6 | and arrays of higher dimensionality.
7 |
8 | Status: Experimental
9 |
10 | Note that this model is not intended to be imported directly. Instead,
11 | use `implements` to denote conformance.
12 |
13 | status: testing
14 | # contributors:
15 | # - github:rly
16 | # - github:oruebel
17 | # - github:jmchandonia
18 | # - github:realmarcin
19 | # - github:mavaylon1
20 | # - github:ialarmedalien
21 | # - github:cmungall
22 |
23 | prefixes:
24 | linkml: https://w3id.org/linkml/
25 | github: https://github.com/
26 | gom: https://w3id.org/gom#
27 |
28 | default_prefix: linkml
29 | default_range: string
30 |
31 | imports:
32 | - linkml:types
33 |
34 | classes:
35 |
36 | Any:
37 | class_uri: linkml:Any
38 |
39 | DataStructure:
40 | abstract: true
41 |
42 | NDArray:
43 | description: >-
44 | a data structure consisting of a collection of *elements*, each identified by at least one array index tuple.
45 | abstract: true
46 | is_a: DataStructure
47 | slots:
48 | - dimensions
49 | - elements
50 | - array_linearization_order
51 | slot_usage:
52 | elements:
53 | description: >-
54 | the collection of values that make up the array. The elements have a *direct* representation which is
55 | an ordered sequence of values. The elements also have an *array interpretation*, where each
56 | element has a unique index which is determined by array_linearization_order
57 |
58 | DataArray:
59 | description: >-
60 | a data structure containing an NDArray and a set of one-dimensional series that are used to label
61 | the elements of the array
62 | is_a: DataStructure
63 | slots:
64 | - axis
65 | - array
66 | see_also:
67 | - https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html
68 |
69 | GroupingByArrayOrder:
70 | mixin: true
71 | description: >-
72 | A mixin that describes an array whose elements are mapped from a linear sequence to an array index
73 | via a specified mapping
74 |
75 | ColumnOrderedArray:
76 | mixin: true
77 | is_a: GroupingByArrayOrder
78 | description: >-
79 | An array ordering that is column-order
80 | slots:
81 | - array_linearization_order
82 | slot_usage:
83 | array_linearization_order:
84 | equals_string: COLUMN_MAJOR_ARRAY_ORDER
85 |
86 | RowOrderedArray:
87 | mixin: true
88 | is_a: GroupingByArrayOrder
89 | description: >-
90 | An array ordering that is row-order or generalizations thereof
91 | slots:
92 | - array_linearization_order
93 | slot_usage:
94 | array_linearization_order:
95 | equals_string: ROW_MAJOR_ARRAY_ORDER
96 |
97 | slots:
98 | dimensions:
99 | description: >-
100 | The number of elements in the tuple used to access elements of an array
101 | aliases:
102 | - rank
103 | - dimensionality
104 | - number of axes
105 | - number of elements
106 | range: integer
107 | axis:
108 | range: NDArray
109 | slot_usage:
110 | dimensions:
111 | equals_number: 1
112 | aliases:
113 | - dimension
114 | description: >-
115 | A one-dimensional series that contains elements that form one part of a tuple used to access an array
116 | required: true
117 | axis_index:
118 | range: integer
119 | description: >-
120 | The position of an axis in a tuple used to access an array
121 | array:
122 | range: NDArray
123 | description: >-
124 | An array that is labeled by a set of one-dimensional series
125 | required: true
126 | elements:
127 | # this will be serialized as one big long list that should be interpreted as a 2D array
128 | range: Any
129 | aliases:
130 | - values
131 | required: true
132 | multivalued: true
133 | description: >-
134 | A collection of values that make up the contents of an array. These elements may be interpreted
135 | as a contiguous linear sequence (direct representation) or as elements to be accessed via an
136 | array index
137 | series_label: # the row label
138 | key: true
139 | description: >-
140 | A name that uniquely identifiers a series
141 | length:
142 | description: >-
143 | The number of elements in the array
144 | range: integer
145 | equals_expression: "length(elements)"
146 | array_linearization_order:
147 | range: ArrayLinearizationOrderOptions
148 | ifabsent: "string(ROW_MAJOR_ARRAY_ORDER)"
149 |
150 | specified_input:
151 | range: DataStructure
152 | multivalued: true
153 | specified_output:
154 | range: DataStructure
155 | multivalued: true
156 | operation_parameters:
157 | range: Any
158 | multivalued: true
159 |
160 | enums:
161 | ArrayLinearizationOrderOptions:
162 | description: >-
163 | Determines how a linear contiguous representation of the elements of an array map
164 | to array indices
165 | permissible_values:
166 | COLUMN_MAJOR_ARRAY_ORDER:
167 | meaning: gom:columnMajorArray
168 | description: >-
169 | An array layout option in which the elements in each column is stored in consecutive positions,
170 | or any generalization thereof to dimensionality greater than 2
171 | aliases:
172 | - F order
173 | ROW_MAJOR_ARRAY_ORDER:
174 | meaning: gom:rowMajorArray
175 | description: >-
176 | An array layout option in which the elements in each row is stored in consecutive positions,
177 | or any generalization thereof to dimensionality greater than 2
178 | aliases:
179 | - C order
180 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/extended_types.yaml:
--------------------------------------------------------------------------------
1 | title: Core LinkML metamodel extended types
2 | name: extended_types
3 | id: https://w3id.org/linkml/extended_types
4 |
5 | description: Extensions to core LinkML types
6 | license: https://creativecommons.org/publicdomain/zero/1.0/
7 |
8 | prefixes:
9 | linkml: https://w3id.org/linkml/
10 | xsd: http://www.w3.org/2001/XMLSchema#
11 | schema: http://schema.org/
12 |
13 | default_prefix: linkml
14 | default_range: string
15 |
16 | imports:
17 | - linkml:types
18 |
19 | classes:
20 |
21 | Any:
22 | class_uri: linkml:Any
23 | description: An unconstrained type or object
24 |
25 | types:
26 |
27 | any_number:
28 | description: A number of any type
29 | union_of:
30 | - integer
31 | - float
32 | - decimal
33 |
34 | signedinteger:
35 | typeof: integer
36 | description: An integer that may be negative
37 | see_also:
38 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.signedinteger
39 |
40 | unsignedinteger:
41 | uri: xsd:unsignedInt
42 | typeof: integer
43 | description: An integer that is non-negative
44 | minimum_value: 0
45 | see_also:
46 | - https://www.w3.org/TR/xmlschema-2/#nonNegativeInteger
47 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.unsignedinteger
48 |
49 | int8:
50 | aliases:
51 | - byte
52 | - b
53 | typeof: signedinteger
54 | description: An 8-bit signed integer
55 | minimum_value: -128
56 | maximum_value: 127
57 | see_also:
58 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.byte
59 |
60 | int16:
61 | aliases:
62 | - short
63 | - h
64 | typeof: signedinteger
65 | description: A 16-bit signed integer
66 | minimum_value: -32_768
67 | maximum_value: 32_767
68 | see_also:
69 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.short
70 |
71 | int32:
72 | aliases:
73 | - intc
74 | - i
75 | typeof: signedinteger
76 | description: A 32-bit signed integer
77 | minimum_value: -2_147_483_648
78 | maximum_value: 2_147_483_647
79 | see_also:
80 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.intc
81 |
82 | int64:
83 | aliases:
84 | - long
85 | - l
86 | - int_
87 | typeof: signedinteger
88 | description: A 64-bit signed integer
89 | minimum_value: -9_223_372_036_854_775_808
90 | maximum_value: 9_223_372_036_854_775_807
91 | see_also:
92 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.int_
93 |
94 | uint8:
95 | aliases:
96 | - ubyte
97 | - B
98 | typeof: unsignedinteger
99 | description: An 8-bit unsigned integer
100 | maximum_value: 255
101 | see_also:
102 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.uint8
103 |
104 | uint16:
105 | aliases:
106 | - ushort
107 | - H
108 | typeof: unsignedinteger
109 | description: A 16-bit unsigned integer
110 | maximum_value: 65_535
111 |
112 | uint32:
113 | aliases:
114 | - uintc
115 | - I
116 | typeof: unsignedinteger
117 | description: A 32-bit unsigned integer
118 | maximum_value: 4_294_967_295
119 |
120 | uint64:
121 | aliases:
122 | - ulong
123 | - L
124 | - uint_
125 | typeof: unsignedinteger
126 | description: A 64-bit unsigned integer
127 | maximum_value: 18_446_744_073_709_551_615
128 |
129 | float16:
130 | aliases:
131 | - half
132 | - e
133 | typeof: float
134 | description: A 16-bit floating point number
135 | see_also:
136 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.half
137 |
138 | float32:
139 | aliases:
140 | - f
141 | typeof: float
142 | description: A 32-bit floating point number
143 | see_also:
144 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float32
145 |
146 | float64:
147 | aliases:
148 | - d
149 | typeof: float
150 | description: A 64-bit floating point number
151 | see_also:
152 | - https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float64
153 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/extensions.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/extensions
2 | name: extensions
3 | description: Extension mixin
4 | license: https://creativecommons.org/publicdomain/zero/1.0/
5 | version: 2.0.0
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 |
10 | default_prefix: linkml
11 | default_range: string
12 |
13 | emit_prefixes:
14 | - linkml
15 |
16 | imports:
17 | - linkml:types
18 |
19 | slots:
20 | extensions:
21 | domain: extensible
22 | range: extension
23 | description: a tag/text tuple attached to an arbitrary element
24 | multivalued: true
25 | inlined: true
26 |
27 | extension_tag:
28 | description: a tag associated with an extension
29 | domain: extension
30 | range: uriorcurie
31 | alias: tag
32 | required: true
33 | key: true
34 |
35 | extension_value:
36 | description: the actual annotation
37 | domain: extension
38 | alias: value
39 | required: true
40 | range: AnyValue
41 |
42 |
43 | classes:
44 |
45 | AnyValue:
46 | class_uri: linkml:Any
47 |
48 | extension:
49 | description: a tag/value pair used to add non-model information to an entry
50 | slots:
51 | - extension_tag
52 | - extension_value
53 | - extensions
54 |
55 | extensible:
56 | description: mixin for classes that support extension
57 | mixin: true
58 | slots:
59 | - extensions
60 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/mappings.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/mappings
2 | title: LinkML Schema Mappings
3 | name: mappings
4 | description: LinkML model for mappings
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 | version: 2.0.0
7 |
8 | prefixes:
9 | linkml: https://w3id.org/linkml/
10 | skos: http://www.w3.org/2004/02/skos/core#
11 | OIO: http://www.geneontology.org/formats/oboInOwl#
12 | IAO: http://purl.obolibrary.org/obo/IAO_
13 |
14 | default_curi_maps:
15 | - semweb_context
16 |
17 | default_prefix: linkml
18 | default_range: string
19 |
20 |
21 | emit_prefixes:
22 | - linkml
23 | - rdf
24 | - rdfs
25 | - xsd
26 | - skos
27 | - OIO
28 | - IAO
29 |
30 | imports:
31 | - linkml:types
32 |
33 | slots:
34 | mappings:
35 | aliases:
36 | - xrefs
37 | - identifiers
38 | - alternate identifiers
39 | - alternate ids
40 | range: uriorcurie
41 | multivalued: true
42 | description: >-
43 | A list of terms from different schemas or terminology systems that have comparable meaning.
44 | These may include terms that are precisely equivalent, broader or narrower in meaning, or otherwise semantically
45 | related but not equivalent from a strict ontological perspective.
46 | slot_uri: skos:mappingRelation
47 |
48 | exact mappings:
49 | is_a: mappings
50 | range: uriorcurie
51 | multivalued: true
52 | inherited: false
53 | description: >-
54 | A list of terms from different schemas or terminology systems that have identical meaning.
55 | slot_uri: skos:exactMatch
56 |
57 | close mappings:
58 | is_a: mappings
59 | range: uriorcurie
60 | multivalued: true
61 | inherited: false
62 | description: >-
63 | A list of terms from different schemas or terminology systems that have close meaning.
64 | slot_uri: skos:closeMatch
65 |
66 | related mappings:
67 | is_a: mappings
68 | range: uriorcurie
69 | multivalued: true
70 | inherited: false
71 | description: >-
72 | A list of terms from different schemas or terminology systems that have related meaning.
73 | slot_uri: skos:relatedMatch
74 |
75 | narrow mappings:
76 | is_a: mappings
77 | range: uriorcurie
78 | multivalued: true
79 | inherited: false
80 | description: >-
81 | A list of terms from different schemas or terminology systems that have narrower meaning.
82 | slot_uri: skos:narrowMatch
83 |
84 | broad mappings:
85 | is_a: mappings
86 | range: uriorcurie
87 | multivalued: true
88 | inherited: false
89 | description: >-
90 | A list of terms from different schemas or terminology systems that have broader meaning.
91 | slot_uri: skos:broadMatch
92 |
93 | deprecated element has exact replacement:
94 | range: uriorcurie
95 | description: >-
96 | When an element is deprecated, it can be automatically replaced by this uri or curie
97 | mappings:
98 | - IAO:0100001
99 |
100 | deprecated element has possible replacement:
101 | range: uriorcurie
102 | description: >-
103 | When an element is deprecated, it can be potentially replaced by this uri or curie
104 | mappings:
105 | - OIO:consider
106 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/units.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/units
2 | name: units
3 | description: Units datamodel
4 | license: https://creativecommons.org/publicdomain/zero/1.0/
5 |
6 | prefixes:
7 | linkml: https://w3id.org/linkml/
8 | qudt: http://qudt.org/schema/qudt/
9 |
10 | default_prefix: linkml
11 | default_range: string
12 |
13 | emit_prefixes:
14 | - linkml
15 |
16 | imports:
17 | - linkml:types
18 | - linkml:extensions
19 | - linkml:annotations
20 | - linkml:mappings
21 |
22 | slots:
23 |
24 | unit:
25 | slot_uri: qudt:unit
26 | description: an encoding of a unit
27 | range: UnitOfMeasure
28 |
29 | ucum_code:
30 | recommended: true
31 | domain: UnitOfMeasure
32 | slot_uri: qudt:ucumCode
33 | description: associates a QUDT unit with its UCUM code (case-sensitive).
34 | range: string
35 |
36 | derivation:
37 | range: string
38 | description: Expression for deriving this unit from other units
39 |
40 | has_quantity_kind:
41 | range: uriorcurie
42 | slot_uri: qudt:hasQuantityKind
43 | description: Concept in a vocabulary or ontology that denotes the kind of quantity being measured, e.g. length
44 | comments:
45 | - Potential ontologies include but are not limited to PATO, NCIT, OBOE, qudt.quantityKind
46 |
47 | iec61360code:
48 | slot_uri: qudt:iec61360Code
49 |
50 | symbol:
51 | slot_uri: qudt:symbol
52 | description: name of the unit encoded as a symbol
53 |
54 | abbreviation:
55 | slot_uri: qudt:abbreviation
56 | description: >-
57 | An abbreviation for a unit is a short ASCII string that is used in place of the full name for the unit in
58 | contexts where non-ASCII characters would be problematic, or where using the abbreviation will enhance
59 | readability. When a power of a base unit needs to be expressed, such as squares this can be done using
60 | abbreviations rather than symbols (source: qudt)
61 |
62 | descriptive_name:
63 | slot_uri: rdfs:label
64 | description: the spelled out name of the unit, for example, meter
65 |
66 | classes:
67 | UnitOfMeasure:
68 | class_uri: qudt:Unit
69 | description: >-
70 | A unit of measure, or unit, is a particular quantity value that has been chosen as a scale for
71 | measuring other quantities the same kind (more generally of equivalent dimension).
72 | slots:
73 | - symbol
74 | - abbreviation
75 | - descriptive_name
76 | - exact mappings
77 | - ucum_code
78 | - derivation
79 | - has_quantity_kind
80 | - iec61360code
81 | slot_usage:
82 | exact mappings:
83 | description: Used to link a unit to equivalent concepts in ontologies such as UO, SNOMED, OEM, OBOE, NCIT
84 | comments:
85 | - Do not use this to encode mappings to systems for which a dedicated field exists
86 | any_of:
87 | - slot_conditions:
88 | ucum_code:
89 | required: true
90 | - slot_conditions:
91 | iec61360code:
92 | required: true
93 | - slot_conditions:
94 | symbol:
95 | required: true
96 | - slot_conditions:
97 | exact_mappings:
98 | required: true
99 |
--------------------------------------------------------------------------------
/linkml_model/model/schema/validation.yaml:
--------------------------------------------------------------------------------
1 | id: https://w3id.org/linkml/reporting
2 | title: LinkML Report Metamodel
3 | name: reporting
4 | description: A datamodel for reports on data, based on SHACL
5 | license: https://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | prefixes:
8 | linkml: https://w3id.org/linkml/
9 | reporting: https://w3id.org/linkml/report
10 | skos: http://www.w3.org/2004/02/skos/core#
11 | pav: http://purl.org/pav/
12 | schema: http://schema.org/
13 | sh: https://w3id.org/shacl/
14 |
15 | default_prefix: reporting
16 | default_range: string
17 |
18 | default_curi_maps:
19 | - semweb_context
20 |
21 | emit_prefixes:
22 | - linkml
23 | - rdf
24 | - rdfs
25 | - xsd
26 | - owl
27 |
28 | imports:
29 | - linkml:types
30 |
31 |
32 | # ==================================
33 | # Classes #
34 | # ==================================
35 | classes:
36 | ValidationReport:
37 | class_uri: sh:ValidationReport
38 | description: A report object
39 | attributes:
40 | results:
41 | range: ValidationResult
42 | multivalued: true
43 | todos:
44 | - add prov object
45 |
46 | ValidationResult:
47 | class_uri: sh:ValidationResult
48 | description: An individual result arising from validation of a data instance using a particular rule
49 | slots:
50 | - type
51 | - severity
52 | - subject
53 | - instantiates
54 | - predicate
55 | - object
56 | - object_str
57 | - node_source
58 | - info
59 |
60 | # ==================================
61 | # Slots #
62 | # ==================================
63 | slots:
64 | type:
65 | # range: problem_type
66 | range: nodeidentifier
67 | slot_uri: sh:sourceConstraintComponent
68 | subject:
69 | range: nodeidentifier
70 | slot_uri: sh:focusNode
71 | instantiates:
72 | range: nodeidentifier
73 | exact_mappings:
74 | - sh:sourceShape
75 | predicate:
76 | range: nodeidentifier
77 | related_mappings:
78 | - sh:resultPath
79 | object:
80 | range: nodeidentifier
81 | slot_uri: sh:value
82 | object_str:
83 | range: string
84 | node_source:
85 | range: nodeidentifier
86 | severity:
87 | range: severity_options
88 | info:
89 | range: string
90 |
91 |
92 | # ==================================
93 | # Enumerations #
94 | # ==================================
95 | enums:
96 | problem_type:
97 | permissible_values:
98 | undeclared_slot:
99 | description: Applies when a slot is used in data but the slot is undeclared in the datamodel
100 | inapplicable_slot:
101 | description: Applies when a slot is used in an instance of a class where the slot is not applicable for that class
102 | missing_slot_value:
103 | description: Applies when an instance of a class has a required slot which is not filled in
104 | slot_range_violation:
105 | description: Applies when the value of a slot is inconsistent with the declared range
106 | max_count_violation:
107 | meaning: sh:MaxCountConstraintComponent
108 | parsing_error:
109 | description: The data could not be parsed
110 | severity_options:
111 | exact_mappings:
112 | - sh:Severity
113 | permissible_values:
114 | FATAL:
115 | ERROR:
116 | meaning: sh:Violation
117 | WARNING:
118 | meaning: sh:Warning
119 | INFO:
120 | meaning: sh:Info
121 |
--------------------------------------------------------------------------------
/linkml_model/owl/README.md:
--------------------------------------------------------------------------------
1 | # owl
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/prefixmap/meta.yaml:
--------------------------------------------------------------------------------
1 | {
2 | "IAO": "http://purl.obolibrary.org/obo/IAO_",
3 | "NCIT": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#",
4 | "OIO": "http://www.geneontology.org/formats/oboInOwl#",
5 | "SIO": "http://semanticscience.org/resource/SIO_",
6 | "bibo": "http://purl.org/ontology/bibo/",
7 | "cdisc": "http://rdf.cdisc.org/mms#",
8 | "dcterms": "http://purl.org/dc/terms/",
9 | "linkml": "https://w3id.org/linkml/",
10 | "oslc": "http://open-services.net/ns/core#",
11 | "owl": "http://www.w3.org/2002/07/owl#",
12 | "pav": "http://purl.org/pav/",
13 | "prov": "http://www.w3.org/ns/prov#",
14 | "qb": "http://purl.org/linked-data/cube#",
15 | "qudt": "http://qudt.org/schema/qudt/",
16 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
17 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
18 | "schema": "http://schema.org/",
19 | "sh": "http://www.w3.org/ns/shacl#",
20 | "skos": "http://www.w3.org/2004/02/skos/core#",
21 | "skosxl": "http://www.w3.org/2008/05/skos-xl#",
22 | "swrl": "http://www.w3.org/2003/11/swrl#",
23 | "vann": "https://vocab.org/vann/",
24 | "xsd": "http://www.w3.org/2001/XMLSchema#",
25 | "StructuredAlias": {
26 | "@id": "skosxl:Label"
27 | },
28 | "UnitOfMeasure": {
29 | "@id": "qudt:Unit"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/linkml_model/rdf/README.md:
--------------------------------------------------------------------------------
1 | # rdf
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
--------------------------------------------------------------------------------
/linkml_model/shex/README.md:
--------------------------------------------------------------------------------
1 | # shex
2 |
3 | Do not edit the files in here - these are autogenerated from the schema. See the Makefile for details.
4 |
5 |
6 |
--------------------------------------------------------------------------------
/linkml_model/shex/annotations.shex:
--------------------------------------------------------------------------------
1 | # metamodel_version: 1.7.0
2 | # version: 2.0.0
3 | BASE
4 | PREFIX rdf:
5 | PREFIX xsd:
6 |
7 |
8 | xsd:string
9 |
10 | xsd:integer
11 |
12 | xsd:boolean
13 |
14 | xsd:float
15 |
16 | xsd:double
17 |
18 | xsd:decimal
19 |
20 |