404
+Page not found
+ + + ++ + +
+
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 841ad1e..0000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socioeconomic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -cjm@berkeleybop.org (Christopher J Mungall). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 6f9238f..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,23 +0,0 @@ -# Contributing - -### Code Style - -This project uses [`black`](https://github.com/psf/black) to automatically -enforce a consistent code style. You can apply `black` and other pre-configured -linters with `tox -e lint`. - -This project uses [`flake8`](https://flake8.pycqa.org) and several plugins for -additional checks of documentation style, security issues, good variable -nomenclature, and more ( -see [`tox.ini`](tox.ini) for a list of flake8 plugins). You can check if your -code passes `flake8` with `tox -e flake8`. - -Each of these checks are run on each commit using GitHub Actions as a continuous -integration service. Passing all of them is required for accepting a -contribution. If you're unsure how to address the feedback from one of these -tools, please say so either in the description of your pull request or in a -comment, and we will help you. - -These code style contribution guidelines have been adapted from the -[cthoyt/cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack/blob/main/%7B%7Bcookiecutter.package_name%7D%7D/.github/CODE_OF_CONDUCT.md) -Python package template. diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 08a1267..0000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Codespell configuration is within pyproject.toml ---- -name: Codespell - -on: - push: - branches: [main] - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -permissions: - contents: read - -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Codespell - uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/deploy_documentation.yml b/.github/workflows/deploy_documentation.yml deleted file mode 100644 index 1459043..0000000 --- a/.github/workflows/deploy_documentation.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Deploy Documentation - -# Controls when the action will run. Triggers the workflow on push -on: - workflow_dispatch: - push: - branches: [ main ] - - paths: - - 'src/linkml_map/datamodel.yaml' - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - build-docs: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - - - name: Set up Python3 - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - - name: Install dependencies - run: uv sync - - - name: Generate and deploy docs - run: | - mkdir docs - touch docs/.nojekyll - make deploy-gh-doc diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index ac11ccf..0000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Built from: -# https://docs.github.com/en/actions/guides/building-and-testing-python - -name: Build and test - -on: - push: - branches: [ main ] - - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies - run: | - pip install tox - - - name: Check code quality with ruff - run: tox -e lint_stats - - test: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] - - steps: - - uses: actions/checkout@v4 - - - uses: ts-graphviz/setup-graphviz@v2 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: uv sync - - - name: Generate LinkML-Map Transformation Model artifacts - run: | - # Force regenerate by removing the target file first - rm -f src/linkml_map/datamodel/transformer_model.py - make src/linkml_map/datamodel/transformer_model.py - - # Run tests to make sure everything works - make test - - # Check if there are any changes and commit them - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add src/ - - # Only commit if there are changes - if ! git diff --cached --quiet; then - git commit -m "Regenerate artifacts from linkml-map transformer_model.yaml" - git push - else - echo "No changes to commit" - fi diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml deleted file mode 100644 index 23b139a..0000000 --- a/.github/workflows/pypi-publish.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: Publish Python Package - -on: - workflow_dispatch: - release: - types: [created] - -jobs: - build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-latest - # needs: [test] - environment: release - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies - run: uv sync - - - name: Build source and wheel archives - run: uv build - - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - verbose: true diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9d5951b..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.old -.coverage -coverage.xml -.idea -project/ -tmp/ -site/ -__pycache__ -tests/output/ -dist/* -.vscode -mise.toml - diff --git a/src/linkml_map/cli/__init__.py b/.nojekyll similarity index 100% rename from src/linkml_map/cli/__init__.py rename to .nojekyll diff --git a/404.html b/404.html new file mode 100644 index 0000000..69cf66a --- /dev/null +++ b/404.html @@ -0,0 +1,74 @@ + + +
+ + + + + + + + + + +alias-class key value pairs for classes
+ +| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| alias | +0..1 String |
+name of the class to be aliased | +direct | +
| class_named | +0..1 String |
+local alias for the class | +direct | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| ClassDerivation | +joins | +range | +AliasedClass | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:AliasedClass | +
| native | +linkmltr:AliasedClass | +
name: AliasedClass
+description: alias-class key value pairs for classes
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ alias:
+ name: alias
+ description: name of the class to be aliased
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ domain_of:
+ - AliasedClass
+ required: true
+ class_named:
+ name: class_named
+ description: local alias for the class
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - AliasedClass
+
+
+name: AliasedClass
+description: alias-class key value pairs for classes
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ alias:
+ name: alias
+ description: name of the class to be aliased
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: alias
+ owner: AliasedClass
+ domain_of:
+ - AliasedClass
+ required: true
+ class_named:
+ name: class_named
+ description: local alias for the class
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: class_named
+ owner: AliasedClass
+ domain_of:
+ - AliasedClass
+
+
+URI: linkml:Any
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| + | + | + | + |
| used by | +used in | +type | +used | +
|---|---|---|---|
| ElementDerivation | +overrides | +range | +Any | +
| ClassDerivation | +overrides | +range | +Any | +
| SlotDerivation | +overrides | +range | +Any | +
| EnumDerivation | +overrides | +range | +Any | +
| PermissibleValueDerivation | +overrides | +range | +Any | +
| PrefixDerivation | +overrides | +range | +Any | +
| KeyVal | +value | +range | +Any | +
| CopyDirective | +exclude | +range | +Any | +
| CopyDirective | +include | +range | +Any | +
| CopyDirective | +add | +range | +Any | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkml:Any | +
| native | +linkmltr:Any | +
name: Any
+from_schema: https://w3id.org/linkml/transformer
+class_uri: linkml:Any
+
+
+name: Any
+from_schema: https://w3id.org/linkml/transformer
+class_uri: linkml:Any
+
+
+A binary (true or false) value
+URI: xsd:boolean
+ +A specification of how to derive a target class from a source class.
+ +| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| populated_from | +0..1 ClassReference |
+Name of the class in the source schema | +direct | +
| sources | +0..* ClassReference |
++ | direct | +
| joins | +0..* AliasedClass |
+Additional classes to be joined to derive instances of the target class | +direct | +
| slot_derivations | +0..* SlotDerivation |
++ | direct | +
| name | +1..1 String |
+Name of the element in the target schema | +ElementDerivation | +
| copy_directives | +0..* CopyDirective |
++ | ElementDerivation | +
| overrides | +0..1 Any |
+overrides source schema slots | +ElementDerivation | +
| is_a | +0..1 ElementDerivation |
++ | ElementDerivation | +
| mixins | +0..* ElementDerivation |
++ | ElementDerivation | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +ElementDerivation | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +ElementDerivation | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +ElementDerivation | +
| mirror_source | +0..1 Boolean |
++ | ElementDerivation | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| TransformationSpecification | +class_derivations | +range | +ClassDerivation | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:ClassDerivation | +
| native | +linkmltr:ClassDerivation | +
name: ClassDerivation
+description: A specification of how to derive a target class from a source class.
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ populated_from:
+ name: populated_from
+ description: Name of the class in the source schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: ClassReference
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: ClassReference
+ joins:
+ name: joins
+ description: Additional classes to be joined to derive instances of the target
+ class
+ comments:
+ - not yet implemented
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ClassDerivation
+ range: AliasedClass
+ inlined: true
+ slot_derivations:
+ name: slot_derivations
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ domain_of:
+ - TransformationSpecification
+ - ClassDerivation
+ range: SlotDerivation
+ inlined: true
+
+
+name: ClassDerivation
+description: A specification of how to derive a target class from a source class.
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ populated_from:
+ name: populated_from
+ description: Name of the class in the source schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: populated_from
+ owner: ClassDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: ClassReference
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: sources
+ owner: ClassDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: ClassReference
+ joins:
+ name: joins
+ description: Additional classes to be joined to derive instances of the target
+ class
+ comments:
+ - not yet implemented
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: joins
+ owner: ClassDerivation
+ domain_of:
+ - ClassDerivation
+ range: AliasedClass
+ inlined: true
+ slot_derivations:
+ name: slot_derivations
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ alias: slot_derivations
+ owner: ClassDerivation
+ domain_of:
+ - TransformationSpecification
+ - ClassDerivation
+ range: SlotDerivation
+ inlined: true
+ name:
+ name: name
+ description: Name of the element in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: name
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ required: true
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: copy_directives
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: overrides
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ alias: is_a
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ alias: mixins
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: value_mappings
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_value_mappings
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_expression_mappings
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: mirror_source
+ owner: ClassDerivation
+ domain_of:
+ - ElementDerivation
+ range: boolean
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: ClassDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: ClassDerivation
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: ClassDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+URI: xsd:string
+ +URI: CollectionType
+| Value | +Meaning | +Description | +
|---|---|---|
| SingleValued | +None | ++ |
| MultiValued | +None | ++ |
| MultiValuedList | +None | ++ |
| MultiValuedDict | +None | ++ |
| Name | +Description | +
|---|---|
| cast_collection_as | ++ |
name: CollectionType
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+permissible_values:
+ SingleValued:
+ text: SingleValued
+ MultiValued:
+ text: MultiValued
+ MultiValuedList:
+ text: MultiValuedList
+ MultiValuedDict:
+ text: MultiValuedDict
+
+
+
+Instructs a Schema Mapper in how to map to a target schema. Not used for data transformation.
+ +| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| element_name | +0..1 String |
++ | direct | +
| copy_all | +0..1 Boolean |
++ | direct | +
| exclude_all | +0..1 Boolean |
++ | direct | +
| exclude | +0..1 Any |
++ | direct | +
| include | +0..1 Any |
++ | direct | +
| add | +0..1 Any |
++ | direct | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| ElementDerivation | +copy_directives | +range | +CopyDirective | +
| ClassDerivation | +copy_directives | +range | +CopyDirective | +
| SlotDerivation | +copy_directives | +range | +CopyDirective | +
| EnumDerivation | +copy_directives | +range | +CopyDirective | +
| PermissibleValueDerivation | +copy_directives | +range | +CopyDirective | +
| PrefixDerivation | +copy_directives | +range | +CopyDirective | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:CopyDirective | +
| native | +linkmltr:CopyDirective | +
name: CopyDirective
+description: Instructs a Schema Mapper in how to map to a target schema. Not used
+ for data transformation.
+from_schema: https://w3id.org/linkml/transformer
+status: testing
+attributes:
+ element_name:
+ name: element_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ domain_of:
+ - CopyDirective
+ required: true
+ copy_all:
+ name: copy_all
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - CopyDirective
+ range: boolean
+ exclude_all:
+ name: exclude_all
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - CopyDirective
+ range: boolean
+ exclude:
+ name: exclude
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - CopyDirective
+ range: Any
+ include:
+ name: include
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - CopyDirective
+ range: Any
+ add:
+ name: add
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - CopyDirective
+ range: Any
+
+
+name: CopyDirective
+description: Instructs a Schema Mapper in how to map to a target schema. Not used
+ for data transformation.
+from_schema: https://w3id.org/linkml/transformer
+status: testing
+attributes:
+ element_name:
+ name: element_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: element_name
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ required: true
+ copy_all:
+ name: copy_all
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: copy_all
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ range: boolean
+ exclude_all:
+ name: exclude_all
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: exclude_all
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ range: boolean
+ exclude:
+ name: exclude
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: exclude
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ range: Any
+ include:
+ name: include
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: include
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ range: Any
+ add:
+ name: add
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: add
+ owner: CopyDirective
+ domain_of:
+ - CopyDirective
+ range: Any
+
+
+a compact URI
+URI: xsd:string
+ +a date (year, month and day) in an idealized calendar
+URI: xsd:date
+ +Either a date or a datetime
+ + +The combination of a date and time
+URI: xsd:dateTime
+ +A real number with arbitrary precision that conforms to the xsd:decimal specification
+URI: xsd:decimal
+ +A real number that conforms to the xsd:double specification
+URI: xsd:double
+ +An abstract grouping for classes that provide a specification of how to derive a target element from a source element.
+URI: linkmltr:ElementDerivation
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| name | +0..1 String |
+Name of the element in the target schema | +direct | +
| copy_directives | +0..* CopyDirective |
++ | direct | +
| overrides | +0..1 Any |
+overrides source schema slots | +direct | +
| is_a | +0..1 ElementDerivation |
++ | direct | +
| mixins | +0..* ElementDerivation |
++ | direct | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +direct | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +direct | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +direct | +
| mirror_source | +0..1 Boolean |
++ | direct | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| ElementDerivation | +is_a | +range | +ElementDerivation | +
| ElementDerivation | +mixins | +range | +ElementDerivation | +
| ClassDerivation | +is_a | +range | +ElementDerivation | +
| ClassDerivation | +mixins | +range | +ElementDerivation | +
| SlotDerivation | +is_a | +range | +ElementDerivation | +
| SlotDerivation | +mixins | +range | +ElementDerivation | +
| EnumDerivation | +is_a | +range | +ElementDerivation | +
| EnumDerivation | +mixins | +range | +ElementDerivation | +
| PermissibleValueDerivation | +is_a | +range | +ElementDerivation | +
| PermissibleValueDerivation | +mixins | +range | +ElementDerivation | +
| PrefixDerivation | +is_a | +range | +ElementDerivation | +
| PrefixDerivation | +mixins | +range | +ElementDerivation | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:ElementDerivation | +
| native | +linkmltr:ElementDerivation | +
name: ElementDerivation
+description: An abstract grouping for classes that provide a specification of how
+ to derive a target element from a source element.
+from_schema: https://w3id.org/linkml/transformer
+is_a: SpecificationComponent
+abstract: true
+attributes:
+ name:
+ name: name
+ description: Name of the element in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - ElementDerivation
+ range: boolean
+
+
+name: ElementDerivation
+description: An abstract grouping for classes that provide a specification of how
+ to derive a target element from a source element.
+from_schema: https://w3id.org/linkml/transformer
+is_a: SpecificationComponent
+abstract: true
+attributes:
+ name:
+ name: name
+ description: Name of the element in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: name
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: copy_directives
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: overrides
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ alias: is_a
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ alias: mixins
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: value_mappings
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_value_mappings
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_expression_mappings
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: mirror_source
+ owner: ElementDerivation
+ domain_of:
+ - ElementDerivation
+ range: boolean
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: ElementDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: ElementDerivation
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: ElementDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+A specification of how to derive the value of a target enum from a source enum
+ +| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| name | +0..1 String |
+Target enum name | +direct | +
| populated_from | +0..1 EnumReference |
+Source enum name | +direct | +
| sources | +0..* EnumReference |
++ | direct | +
| expr | +0..1 String |
+An expression to be evaluated on the source object to derive the target slot | +direct | +
| hide | +0..1 Boolean |
+True if this is suppressed | +direct | +
| permissible_value_derivations | +0..* PermissibleValueDerivation |
+Instructions on how to derive a set of PVs in the target schema | +direct | +
| copy_directives | +0..* CopyDirective |
++ | ElementDerivation | +
| overrides | +0..1 Any |
+overrides source schema slots | +ElementDerivation | +
| is_a | +0..1 ElementDerivation |
++ | ElementDerivation | +
| mixins | +0..* ElementDerivation |
++ | ElementDerivation | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +ElementDerivation | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +ElementDerivation | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +ElementDerivation | +
| mirror_source | +0..1 Boolean |
++ | ElementDerivation | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| TransformationSpecification | +enum_derivations | +range | +EnumDerivation | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:EnumDerivation | +
| native | +linkmltr:EnumDerivation | +
name: EnumDerivation
+description: A specification of how to derive the value of a target enum from a source
+ enum
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ name:
+ name: name
+ description: Target enum name
+ from_schema: https://w3id.org/linkml/transformer
+ key: true
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ populated_from:
+ name: populated_from
+ description: Source enum name
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: EnumReference
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: EnumReference
+ expr:
+ name: expr
+ description: An expression to be evaluated on the source object to derive the
+ target slot. Should be specified using the LinkML expression language.
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ hide:
+ name: hide
+ description: True if this is suppressed
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: boolean
+ permissible_value_derivations:
+ name: permissible_value_derivations
+ description: Instructions on how to derive a set of PVs in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - EnumDerivation
+ range: PermissibleValueDerivation
+ inlined: true
+
+
+name: EnumDerivation
+description: A specification of how to derive the value of a target enum from a source
+ enum
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ name:
+ name: name
+ description: Target enum name
+ from_schema: https://w3id.org/linkml/transformer
+ key: true
+ alias: name
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ populated_from:
+ name: populated_from
+ description: Source enum name
+ from_schema: https://w3id.org/linkml/transformer
+ alias: populated_from
+ owner: EnumDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: EnumReference
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ alias: sources
+ owner: EnumDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: EnumReference
+ expr:
+ name: expr
+ description: An expression to be evaluated on the source object to derive the
+ target slot. Should be specified using the LinkML expression language.
+ from_schema: https://w3id.org/linkml/transformer
+ alias: expr
+ owner: EnumDerivation
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ hide:
+ name: hide
+ description: True if this is suppressed
+ from_schema: https://w3id.org/linkml/transformer
+ alias: hide
+ owner: EnumDerivation
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: boolean
+ permissible_value_derivations:
+ name: permissible_value_derivations
+ description: Instructions on how to derive a set of PVs in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: permissible_value_derivations
+ owner: EnumDerivation
+ domain_of:
+ - EnumDerivation
+ range: PermissibleValueDerivation
+ inlined: true
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: copy_directives
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: overrides
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ alias: is_a
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ alias: mixins
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: value_mappings
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_value_mappings
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_expression_mappings
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: mirror_source
+ owner: EnumDerivation
+ domain_of:
+ - ElementDerivation
+ range: boolean
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: EnumDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: EnumDerivation
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: EnumDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+URI: xsd:string
+ +A real number that conforms to the xsd:float specification
+URI: xsd:float
+ +An integer
+URI: xsd:integer
+ +Used for back references in mapping to relational model
+URI: linkmltr:Inverse
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| slot_name | +0..1 String |
++ | direct | +
| class_name | +0..1 String |
++ | direct | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| SlotDerivation | +inverse_of | +range | +Inverse | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:Inverse | +
| native | +linkmltr:Inverse | +
name: Inverse
+description: Used for back references in mapping to relational model
+from_schema: https://w3id.org/linkml/transformer
+aliases:
+- backref
+- back_references
+attributes:
+ slot_name:
+ name: slot_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - Inverse
+ class_name:
+ name: class_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - Inverse
+
+
+name: Inverse
+description: Used for back references in mapping to relational model
+from_schema: https://w3id.org/linkml/transformer
+aliases:
+- backref
+- back_references
+attributes:
+ slot_name:
+ name: slot_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: slot_name
+ owner: Inverse
+ domain_of:
+ - Inverse
+ class_name:
+ name: class_name
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: class_name
+ owner: Inverse
+ domain_of:
+ - Inverse
+
+
+A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded in tree form.
+URI: xsd:string
+ +A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to a valid object within the current instance document when encoded in tree form.
+URI: xsd:string
+ +URI: linkmltr:KeyVal
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| key | +0..1 String |
++ | direct | +
| value | +0..1 Any |
++ | direct | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:KeyVal | +
| native | +linkmltr:KeyVal | +
name: KeyVal
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ key:
+ name: key
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ domain_of:
+ - KeyVal
+ required: true
+ value:
+ name: value
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - KeyVal
+ range: Any
+
+
+name: KeyVal
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ key:
+ name: key
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: key
+ owner: KeyVal
+ domain_of:
+ - KeyVal
+ required: true
+ value:
+ name: value
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: value
+ owner: KeyVal
+ domain_of:
+ - KeyVal
+ range: Any
+
+
+Prefix part of CURIE
+URI: xsd:string
+ +A URI, CURIE or BNODE that represents a node in a model.
+URI: shex:nonLiteral
+ +A URI or CURIE that represents an object in the model.
+URI: shex:iri
+ +A specification of how to derive the value of a PV from a source enum
+URI: linkmltr:PermissibleValueDerivation
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| name | +0..1 String |
+Target permissible value text | +direct | +
| expr | +0..1 String |
++ | direct | +
| populated_from | +0..1 String |
+Source permissible value | +direct | +
| sources | +0..* String |
++ | direct | +
| hide | +0..1 Boolean |
++ | direct | +
| copy_directives | +0..* CopyDirective |
++ | ElementDerivation | +
| overrides | +0..1 Any |
+overrides source schema slots | +ElementDerivation | +
| is_a | +0..1 ElementDerivation |
++ | ElementDerivation | +
| mixins | +0..* ElementDerivation |
++ | ElementDerivation | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +ElementDerivation | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +ElementDerivation | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +ElementDerivation | +
| mirror_source | +0..1 Boolean |
++ | ElementDerivation | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| EnumDerivation | +permissible_value_derivations | +range | +PermissibleValueDerivation | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:PermissibleValueDerivation | +
| native | +linkmltr:PermissibleValueDerivation | +
name: PermissibleValueDerivation
+description: A specification of how to derive the value of a PV from a source enum
+todos:
+- this is currently under-specified. We will need boolean combinators to express if-then-else
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ name:
+ name: name
+ description: Target permissible value text
+ from_schema: https://w3id.org/linkml/transformer
+ key: true
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ expr:
+ name: expr
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ populated_from:
+ name: populated_from
+ description: Source permissible value
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ hide:
+ name: hide
+ from_schema: https://w3id.org/linkml/transformer
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: boolean
+
+
+name: PermissibleValueDerivation
+description: A specification of how to derive the value of a PV from a source enum
+todos:
+- this is currently under-specified. We will need boolean combinators to express if-then-else
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ name:
+ name: name
+ description: Target permissible value text
+ from_schema: https://w3id.org/linkml/transformer
+ key: true
+ alias: name
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ required: true
+ expr:
+ name: expr
+ from_schema: https://w3id.org/linkml/transformer
+ alias: expr
+ owner: PermissibleValueDerivation
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ populated_from:
+ name: populated_from
+ description: Source permissible value
+ from_schema: https://w3id.org/linkml/transformer
+ alias: populated_from
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ sources:
+ name: sources
+ from_schema: https://w3id.org/linkml/transformer
+ multivalued: true
+ alias: sources
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ClassDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ hide:
+ name: hide
+ from_schema: https://w3id.org/linkml/transformer
+ alias: hide
+ owner: PermissibleValueDerivation
+ domain_of:
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: boolean
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: copy_directives
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: overrides
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ alias: is_a
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ alias: mixins
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: value_mappings
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_value_mappings
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_expression_mappings
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: mirror_source
+ owner: PermissibleValueDerivation
+ domain_of:
+ - ElementDerivation
+ range: boolean
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: PermissibleValueDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: PermissibleValueDerivation
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: PermissibleValueDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+URI: linkmltr:PrefixDerivation
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| name | +1..1 String |
+Name of the element in the target schema | +ElementDerivation | +
| copy_directives | +0..* CopyDirective |
++ | ElementDerivation | +
| overrides | +0..1 Any |
+overrides source schema slots | +ElementDerivation | +
| is_a | +0..1 ElementDerivation |
++ | ElementDerivation | +
| mixins | +0..* ElementDerivation |
++ | ElementDerivation | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +ElementDerivation | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +ElementDerivation | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +ElementDerivation | +
| mirror_source | +0..1 Boolean |
++ | ElementDerivation | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:PrefixDerivation | +
| native | +linkmltr:PrefixDerivation | +
name: PrefixDerivation
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+
+
+name: PrefixDerivation
+from_schema: https://w3id.org/linkml/transformer
+is_a: ElementDerivation
+attributes:
+ name:
+ name: name
+ description: Name of the element in the target schema
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ key: true
+ alias: name
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ - SlotDerivation
+ - EnumDerivation
+ - PermissibleValueDerivation
+ range: string
+ required: true
+ copy_directives:
+ name: copy_directives
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: copy_directives
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: CopyDirective
+ inlined: true
+ overrides:
+ name: overrides
+ description: overrides source schema slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: overrides
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: Any
+ is_a:
+ name: is_a
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:is_a
+ alias: is_a
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ mixins:
+ name: mixins
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: linkml:mixins
+ multivalued: true
+ alias: mixins
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: ElementDerivation
+ inlined: false
+ value_mappings:
+ name: value_mappings
+ description: A mapping table that is applied directly to mappings, in order of
+ precedence
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: value_mappings
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_value_mappings:
+ name: expression_to_value_mappings
+ description: A mapping table in which the keys are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_value_mappings
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ expression_to_expression_mappings:
+ name: expression_to_expression_mappings
+ description: A mapping table in which the keys and values are expressions
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: expression_to_expression_mappings
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: KeyVal
+ inlined: true
+ mirror_source:
+ name: mirror_source
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: mirror_source
+ owner: PrefixDerivation
+ domain_of:
+ - ElementDerivation
+ range: boolean
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: PrefixDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: PrefixDerivation
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: PrefixDerivation
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+| Value | +Meaning | +Description | +
|---|---|---|
| JSON | +None | ++ |
| YAML | +None | ++ |
| TURTLE | +None | ++ |
| Name | +Description | +
|---|---|
| syntax | ++ |
name: SerializationSyntaxType
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+permissible_values:
+ JSON:
+ text: JSON
+ YAML:
+ text: YAML
+ TURTLE:
+ text: TURTLE
+
+
+
+A specification of how to derive the value of a target slot from a source slot
+ +| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| name | +0..1 String |
+Target slot name | +direct | +
| populated_from | +0..1 SlotReference |
+Source slot name | +direct | +
| sources | +0..* SlotReference |
++ | direct | +
| derived_from | +0..* SlotReference |
+Source slots that are used to derive this slot | +direct | +
| expr | +0..1 String |
+An expression to be evaluated on the source object to derive the target slot | +direct | +
| range | +0..1 String |
++ | direct | +
| unit_conversion | +0..1 UnitConversionConfiguration |
++ | direct | +
| inverse_of | +0..1 Inverse |
+Used to specify a class-slot tuple that is the inverse of the derived/target ... | +direct | +
| hide | +0..1 Boolean |
+True if this is suppressed | +direct | +
| type_designator | +0..1 Boolean |
++ | direct | +
| cast_collection_as | +0..1 CollectionType |
++ | direct | +
| dictionary_key | +0..1 String |
++ | direct | +
| stringification | +0..1 StringificationConfiguration |
++ | direct | +
| copy_directives | +0..* CopyDirective |
++ | ElementDerivation | +
| overrides | +0..1 Any |
+overrides source schema slots | +ElementDerivation | +
| is_a | +0..1 ElementDerivation |
++ | ElementDerivation | +
| mixins | +0..* ElementDerivation |
++ | ElementDerivation | +
| value_mappings | +0..* KeyVal |
+A mapping table that is applied directly to mappings, in order of precedence | +ElementDerivation | +
| expression_to_value_mappings | +0..* KeyVal |
+A mapping table in which the keys are expressions | +ElementDerivation | +
| expression_to_expression_mappings | +0..* KeyVal |
+A mapping table in which the keys and values are expressions | +ElementDerivation | +
| mirror_source | +0..1 Boolean |
++ | ElementDerivation | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| TransformationSpecification | +slot_derivations | +range | +SlotDerivation | +
| ClassDerivation | +slot_derivations | +range | +SlotDerivation | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:SlotDerivation | +
| native | +linkmltr:SlotDerivation | +
name: SlotDerivation
description: A specification of how to derive the value of a target slot from a source
slot
from_schema: https://w3id.org/linkml/transformer
@@ -312,14 +476,11 @@
- SlotDerivation
range: StringificationConfiguration
-```
+
name: SlotDerivation
description: A specification of how to derive the value of a target slot from a source
slot
from_schema: https://w3id.org/linkml/transformer
@@ -594,5 +755,17 @@
- SpecificationComponent
range: string
-```
-URI: xsd:string
+ +A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.
+URI: xsd:string
+ +URI: linkmltr:SpecificationComponent
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| description | +0..1 String |
+description of the specification component | +direct | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +direct | +
| comments | +0..* String |
+A list of comments about this component | +direct | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:SpecificationComponent | +
| native | +linkmltr:SpecificationComponent | +
name: SpecificationComponent
+from_schema: https://w3id.org/linkml/transformer
+abstract: true
+attributes:
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ domain_of:
+ - SpecificationComponent
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+name: SpecificationComponent
+from_schema: https://w3id.org/linkml/transformer
+abstract: true
+attributes:
+ description:
+ name: description
+ description: description of the specification component
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: dcterms:description
+ alias: description
+ owner: SpecificationComponent
+ domain_of:
+ - SpecificationComponent
+ implements:
+ name: implements
+ description: A reference to a specification that this component implements.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: implements
+ owner: SpecificationComponent
+ domain_of:
+ - SpecificationComponent
+ range: uriorcurie
+ comments:
+ name: comments
+ description: A list of comments about this component. Comments are free text,
+ and may be used to provide additional information about the component, including
+ instructions for its use.
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ slot_uri: rdfs:comment
+ multivalued: true
+ alias: comments
+ owner: SpecificationComponent
+ domain_of:
+ - SpecificationComponent
+ range: string
+
+
+A character string
+URI: xsd:string
+ +URI: linkmltr:StringificationConfiguration
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| delimiter | +0..1 String |
++ | direct | +
| reversed | +0..1 Boolean |
++ | direct | +
| over_slots | +0..* String |
++ | direct | +
| syntax | +0..1 SerializationSyntaxType |
++ | direct | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| SlotDerivation | +stringification | +range | +StringificationConfiguration | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:StringificationConfiguration | +
| native | +linkmltr:StringificationConfiguration | +
name: StringificationConfiguration
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ delimiter:
+ name: delimiter
+ examples:
+ - value: ','
+ - value: '|'
+ - value: ;
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - StringificationConfiguration
+ range: string
+ reversed:
+ name: reversed
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - StringificationConfiguration
+ range: boolean
+ over_slots:
+ name: over_slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ domain_of:
+ - StringificationConfiguration
+ range: string
+ syntax:
+ name: syntax
+ examples:
+ - value: json
+ - value: yaml
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - StringificationConfiguration
+ range: SerializationSyntaxType
+
+
+name: StringificationConfiguration
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ delimiter:
+ name: delimiter
+ examples:
+ - value: ','
+ - value: '|'
+ - value: ;
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: delimiter
+ owner: StringificationConfiguration
+ domain_of:
+ - StringificationConfiguration
+ range: string
+ reversed:
+ name: reversed
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: reversed
+ owner: StringificationConfiguration
+ domain_of:
+ - StringificationConfiguration
+ range: boolean
+ over_slots:
+ name: over_slots
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ multivalued: true
+ alias: over_slots
+ owner: StringificationConfiguration
+ domain_of:
+ - StringificationConfiguration
+ range: string
+ syntax:
+ name: syntax
+ examples:
+ - value: json
+ - value: yaml
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: syntax
+ owner: StringificationConfiguration
+ domain_of:
+ - StringificationConfiguration
+ range: SerializationSyntaxType
+
+
+A time object represents a (local) time of day, independent of any particular day
+URI: xsd:time
+ +A collection of mappings between source and target classes
+URI: linkmltr:TransformationSpecification
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| id | +0..1 String |
+Unique identifier for this transformation specification | +direct | +
| title | +0..1 String |
+human readable title for this transformation specification | +direct | +
| prefixes | +0..* KeyVal |
+maps prefixes to URL expansions | +direct | +
| source_schema | +0..1 String |
+name of the schema that describes the source (input) objects | +direct | +
| target_schema | +0..1 String |
+name of the schema that describes the target (output) objects | +direct | +
| class_derivations | +0..* ClassDerivation |
+Instructions on how to derive a set of classes in the target schema from clas... | +direct | +
| enum_derivations | +0..* EnumDerivation |
+Instructions on how to derive a set of enums in the target schema | +direct | +
| slot_derivations | +0..* SlotDerivation |
+Instructions on how to derive a set of top level slots in the target schema | +direct | +
| description | +0..1 String |
+description of the specification component | +SpecificationComponent | +
| implements | +0..* Uriorcurie |
+A reference to a specification that this component implements | +SpecificationComponent | +
| comments | +0..* String |
+A list of comments about this component | +SpecificationComponent | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:TransformationSpecification | +
| native | +linkmltr:TransformationSpecification | +
name: TransformationSpecification
description: A collection of mappings between source and target classes
from_schema: https://w3id.org/linkml/transformer
is_a: SpecificationComponent
@@ -213,14 +292,11 @@
inlined: true
tree_root: true
-```
+
name: TransformationSpecification
description: A collection of mappings between source and target classes
from_schema: https://w3id.org/linkml/transformer
is_a: SpecificationComponent
@@ -353,5 +429,17 @@
range: string
tree_root: true
-```
-URI: linkmltr:UnitConversionConfiguration
+| Name | +Cardinality and Range | +Description | +Inheritance | +
|---|---|---|---|
| target_unit | +0..1 String |
++ | direct | +
| target_unit_scheme | +0..1 String |
++ | direct | +
| source_unit | +0..1 String |
++ | direct | +
| source_unit_scheme | +0..1 String |
++ | direct | +
| source_unit_slot | +0..1 String |
++ | direct | +
| source_magnitude_slot | +0..1 String |
++ | direct | +
| target_unit_slot | +0..1 String |
++ | direct | +
| target_magnitude_slot | +0..1 String |
++ | direct | +
| used by | +used in | +type | +used | +
|---|---|---|---|
| SlotDerivation | +unit_conversion | +range | +UnitConversionConfiguration | +
| Mapping Type | +Mapped Value | +
|---|---|
| self | +linkmltr:UnitConversionConfiguration | +
| native | +linkmltr:UnitConversionConfiguration | +
name: UnitConversionConfiguration
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ target_unit:
+ name: target_unit
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ target_unit_scheme:
+ name: target_unit_scheme
+ examples:
+ - value: ucum
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ range: string
+ source_unit:
+ name: source_unit
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ source_unit_scheme:
+ name: source_unit_scheme
+ examples:
+ - value: ucum
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ range: string
+ source_unit_slot:
+ name: source_unit_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ source_magnitude_slot:
+ name: source_magnitude_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ target_unit_slot:
+ name: target_unit_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+ target_magnitude_slot:
+ name: target_magnitude_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ domain_of:
+ - UnitConversionConfiguration
+
+
+name: UnitConversionConfiguration
+from_schema: https://w3id.org/linkml/transformer
+attributes:
+ target_unit:
+ name: target_unit
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: target_unit
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ target_unit_scheme:
+ name: target_unit_scheme
+ examples:
+ - value: ucum
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: target_unit_scheme
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ range: string
+ source_unit:
+ name: source_unit
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: source_unit
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ source_unit_scheme:
+ name: source_unit_scheme
+ examples:
+ - value: ucum
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: source_unit_scheme
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ range: string
+ source_unit_slot:
+ name: source_unit_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: source_unit_slot
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ source_magnitude_slot:
+ name: source_magnitude_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: source_magnitude_slot
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ target_unit_slot:
+ name: target_unit_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: target_unit_slot
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+ target_magnitude_slot:
+ name: target_magnitude_slot
+ from_schema: https://w3id.org/linkml/transformer
+ rank: 1000
+ alias: target_magnitude_slot
+ owner: UnitConversionConfiguration
+ domain_of:
+ - UnitConversionConfiguration
+
+
+a complete URI
+URI: xsd:anyURI
+ +a URI or a CURIE
+URI: xsd:anyURI
+ +URI: linkmltr:add
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
name: add
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: add
+owner: CopyDirective
+domain_of:
+- CopyDirective
+range: Any
+
+
+
+name of the class to be aliased
+URI: linkmltr:alias
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| AliasedClass | +alias-class key value pairs for classes | +no | +
Range: NONE
+Required: True
+name: alias
+description: name of the class to be aliased
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+key: true
+alias: alias
+owner: AliasedClass
+domain_of:
+- AliasedClass
+required: true
+
+
+
+URI: linkmltr:cast_collection_as
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
name: cast_collection_as
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: cast_collection_as
+owner: SlotDerivation
+domain_of:
+- SlotDerivation
+range: CollectionType
+
+
+
+Instructions on how to derive a set of classes in the target schema from classes in the source schema.
+URI: linkmltr:class_derivations
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
Range: ClassDerivation
+Multivalued: True
+name: class_derivations
+description: Instructions on how to derive a set of classes in the target schema from
+ classes in the source schema.
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: class_derivations
+owner: TransformationSpecification
+domain_of:
+- TransformationSpecification
+range: ClassDerivation
+inlined: true
+
+
+
+URI: linkmltr:class_name
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| Inverse | +Used for back references in mapping to relational model | +no | +
name: class_name
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: class_name
+owner: Inverse
+domain_of:
+- Inverse
+
+
+
+local alias for the class
+URI: linkmltr:class_named
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| AliasedClass | +alias-class key value pairs for classes | +no | +
name: class_named
+description: local alias for the class
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: class_named
+owner: AliasedClass
+domain_of:
+- AliasedClass
+
+
+
+A list of comments about this component. Comments are free text, and may be used to provide additional information about the component, including instructions for its use.
+URI: rdfs:comment
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| SpecificationComponent | ++ | no | +
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
Range: String
+Multivalued: True
+name: comments
+description: A list of comments about this component. Comments are free text, and
+ may be used to provide additional information about the component, including instructions
+ for its use.
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+slot_uri: rdfs:comment
+multivalued: true
+alias: comments
+owner: SpecificationComponent
+domain_of:
+- SpecificationComponent
+range: string
+
+
+
+URI: linkmltr:copy_all
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
name: copy_all
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: copy_all
+owner: CopyDirective
+domain_of:
+- CopyDirective
+range: boolean
+
+
+
+| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
Range: CopyDirective
+Multivalued: True
+name: copy_directives
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: copy_directives
+owner: ElementDerivation
+domain_of:
+- ElementDerivation
+range: CopyDirective
+inlined: true
+
+
+
+Datamodel for LinkML schema mappings and transformations.
+A mapper generates instances of a target data model from +instances of a source data model. This transformation process +is guided by a TransformationSpecification.
+The specification is independent of any one method for transforming +data. It allows different approaches, including:
+URI: https://w3id.org/linkml/transformer
+Name: linkml-map
+| Class | +Description | +
|---|---|
| AliasedClass | +alias-class key value pairs for classes | +
| Any | +None | +
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema. Not used for data transformation. | +
| Inverse | +Used for back references in mapping to relational model | +
| KeyVal | +None | +
| SpecificationComponent | +None | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to derive a target element from a source element. | +
| ClassDerivation | +A specification of how to derive a target class from a source class. | +
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enum | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +
| PrefixDerivation | +None | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slot | +
| TransformationSpecification | +A collection of mappings between source and target classes | +
| StringificationConfiguration | +None | +
| UnitConversionConfiguration | +None | +
| Slot | +Description | +
|---|---|
| add | ++ |
| alias | +name of the class to be aliased | +
| cast_collection_as | ++ |
| class_derivations | +Instructions on how to derive a set of classes in the target schema from clas... | +
| class_name | ++ |
| class_named | +local alias for the class | +
| comments | +A list of comments about this component | +
| copy_all | ++ |
| copy_directives | ++ |
| delimiter | ++ |
| derived_from | +Source slots that are used to derive this slot | +
| description | +description of the specification component | +
| dictionary_key | ++ |
| element_name | ++ |
| enum_derivations | +Instructions on how to derive a set of enums in the target schema | +
| exclude | ++ |
| exclude_all | ++ |
| expr | +An expression to be evaluated on the source object to derive the target slot | +
| expression_to_expression_mappings | +A mapping table in which the keys and values are expressions | +
| expression_to_value_mappings | +A mapping table in which the keys are expressions | +
| hide | +True if this is suppressed | +
| id | +Unique identifier for this transformation specification | +
| implements | +A reference to a specification that this component implements | +
| include | ++ |
| inverse_of | +Used to specify a class-slot tuple that is the inverse of the derived/target ... | +
| is_a | ++ |
| joins | +Additional classes to be joined to derive instances of the target class | +
| key | ++ |
| mirror_source | ++ |
| mixins | ++ |
| name | +Name of the element in the target schema | +
| over_slots | ++ |
| overrides | +overrides source schema slots | +
| permissible_value_derivations | +Instructions on how to derive a set of PVs in the target schema | +
| populated_from | +Name of the class in the source schema | +
| prefixes | +maps prefixes to URL expansions | +
| range | ++ |
| reversed | ++ |
| slot_derivations | +Instructions on how to derive a set of top level slots in the target schema | +
| slot_name | ++ |
| source_magnitude_slot | ++ |
| source_schema | +name of the schema that describes the source (input) objects | +
| source_unit | ++ |
| source_unit_scheme | ++ |
| source_unit_slot | ++ |
| sources | ++ |
| stringification | ++ |
| syntax | ++ |
| target_magnitude_slot | ++ |
| target_schema | +name of the schema that describes the target (output) objects | +
| target_unit | ++ |
| target_unit_scheme | ++ |
| target_unit_slot | ++ |
| title | +human readable title for this transformation specification | +
| type_designator | ++ |
| unit_conversion | ++ |
| value | ++ |
| value_mappings | +A mapping table that is applied directly to mappings, in order of precedence | +
| Enumeration | +Description | +
|---|---|
| CollectionType | ++ |
| SerializationSyntaxType | ++ |
| Type | +Description | +
|---|---|
| Boolean | +A binary (true or false) value | +
| ClassReference | ++ |
| Curie | +a compact URI | +
| Date | +a date (year, month and day) in an idealized calendar | +
| DateOrDatetime | +Either a date or a datetime | +
| Datetime | +The combination of a date and time | +
| Decimal | +A real number with arbitrary precision that conforms to the xsd:decimal speci... | +
| Double | +A real number that conforms to the xsd:double specification | +
| EnumReference | ++ |
| Float | +A real number that conforms to the xsd:float specification | +
| Integer | +An integer | +
| Jsonpath | +A string encoding a JSON Path | +
| Jsonpointer | +A string encoding a JSON Pointer | +
| Ncname | +Prefix part of CURIE | +
| Nodeidentifier | +A URI, CURIE or BNODE that represents a node in a model | +
| Objectidentifier | +A URI or CURIE that represents an object in the model | +
| SlotReference | ++ |
| Sparqlpath | +A string encoding a SPARQL Property Path | +
| String | +A character string | +
| Time | +A time object represents a (local) time of day, independent of any particular... | +
| Uri | +a complete URI | +
| Uriorcurie | +a URI or a CURIE | +
| Subset | +Description | +
|---|---|
| + | + |
URI: linkmltr:delimiter
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| StringificationConfiguration | ++ | no | +
| Value | +
|---|
| , | +
| + |
| ; | +
name: delimiter
+examples:
+- value: ','
+- value: '|'
+- value: ;
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: delimiter
+owner: StringificationConfiguration
+domain_of:
+- StringificationConfiguration
+range: string
+
+
+
+Source slots that are used to derive this slot. This can be computed from the expr, if the expr is declarative.
+ + + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
Range: SlotReference
+Multivalued: True
+name: derived_from
+description: Source slots that are used to derive this slot. This can be computed
+ from the expr, if the expr is declarative.
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: derived_from
+owner: SlotDerivation
+domain_of:
+- SlotDerivation
+range: SlotReference
+
+
+
+description of the specification component
+URI: dcterms:description
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| SpecificationComponent | ++ | no | +
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
name: description
+description: description of the specification component
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+slot_uri: dcterms:description
+alias: description
+owner: SpecificationComponent
+domain_of:
+- SpecificationComponent
+
+
+
+| Name | +Description | +Modifies Slot | +
|---|---|---|
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
name: dictionary_key
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: dictionary_key
+owner: SlotDerivation
+domain_of:
+- SlotDerivation
+range: string
+
+
+
+| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
Range: NONE
+Required: True
+name: element_name
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+key: true
+alias: element_name
+owner: CopyDirective
+domain_of:
+- CopyDirective
+required: true
+
+
+
+Instructions on how to derive a set of enums in the target schema
+URI: linkmltr:enum_derivations
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
Range: EnumDerivation
+Multivalued: True
+name: enum_derivations
+description: Instructions on how to derive a set of enums in the target schema
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: enum_derivations
+owner: TransformationSpecification
+domain_of:
+- TransformationSpecification
+range: EnumDerivation
+inlined: true
+
+
+
+This tutorial walks through basic programmatic use of the LinkML-Map framework. +This is intended for Python developers - note that many of the operations here can also be performed +at the command line.
+import yaml
+
+
+
+We will use a LinkML SchemaBuilder object to progressively build up a schema, adding +additional features as we go.
+We'll start with a simple Person schema, with a few single valued scalar slots:
from linkml.utils.schema_builder import SchemaBuilder
+from linkml_runtime.linkml_model import SlotDefinition
+
+sb = SchemaBuilder()
+sb.add_class("Person", slots=[SlotDefinition("family_name", range="string"),
+ SlotDefinition("given_name", range="string"),
+ SlotDefinition("age_in_years", range="integer"),
+ SlotDefinition("height_in_cm", range="float"),
+ ])
+sb.add_defaults()
+print(yaml.dump(sb.as_dict(), sort_keys=False))
+
+
+
+We will use a Session object which conveniently wraps a number of different capabilities;
+the first of these capabilities is to map (transform) data objects from one schema to another
+(implicit) schema using a transformer specification).
Our initial transformer specification will be a trivial isomorphic one that:
+Person class to an Individual classname fields as-isage_in_years and height_in_cm to age and height)from linkml_map.session import Session
+
+session = Session()
+session.set_source_schema(sb.as_dict())
+
+
+
+# Transformer specification (in YAML)
+session.set_object_transformer("""
+class_derivations:
+ Individual:
+ populated_from: Person
+ slot_derivations:
+ family_name:
+ populated_from: family_name
+ given_name:
+ populated_from: given_name
+ age:
+ populated_from: age_in_years
+ height:
+ populated_from: height_in_cm
+""")
+
+
+
+We can visualize the transformer specification using graphviz:
+session.graphviz()
+
+
+
+We'll next make a simple Person object. Note that for simplicity we are specifying this
+using a Python dictionary. The framework also works with objects instantiating either
+Pydantic or Dataclasses classes (use the transform_object method instead of transform).
obj = {
+ "given_name": "Jane",
+ "family_name": "Doe",
+ "age_in_years": 42,
+ "height_in_cm": 180.0,
+ }
+session.transform(obj)
+
+
+
+This does what we expect - it renames the two fields, but leaves all values intact.
+Note that because we use using dictionaries here, the renaming of the class has no effect, +as this is implicit with JSON/dictionaries.
+TODO: docs on type designator fields
+For command line users, the same thing can be achieved with the map-data command.
LinkML-Transformer is intended as a declarative framework, in contrast to writing Python +transformation code. This allows tools to introspect mappings and perform other kinds of inference. +An example of this is deriving the (implicit) target schema
+Here we use the target_schema method on the session object to derive the target schema:
from linkml_runtime.dumpers import yaml_dumper
+
+print(yaml_dumper.dumps(session.target_schema))
+
+
+
+As expected, this is isomorphic to the original (source) schema, with fields and classes renamed.
+In addition to renaming fields, we can derive field values via evaluation of function expressions.
+You are encouraged to follow the subset of Python defined by the LinkML expression language. This provides +both safety, and declarativity. However, if you need +to, you can include arbitrary Python code, provided you configure the session to allow this.
+We'll keep the original schema, and will provide a new Transformer specification, +giving an example of both string manipulation functions and arithmetic functions; the latter +perform unit conversions (later on we will see more flexible and declarative ways to perform unit conversions).
+
+session.set_object_transformer("""
+class_derivations:
+ Individual:
+ populated_from: Person
+ slot_derivations:
+ name:
+ expr: "{given_name} + ' ' + {family_name}"
+ description: Concatenating given and family names
+ note this is a bad assumption for names in general,
+ this is just for demonstration
+ age_in_months:
+ expr: age_in_years * 12
+ height_in_meters:
+ expr: height_in_cm / 100
+""")
+
+
+
+
+Note that when we visualize this specification, dotted lines are shown indicating a relationship +between source and target that is different from direct copy:
+session.graphviz()
+
+
+
+Now we'll transform the same object as before, and see the results:
+session.transform(obj)
+
+
+
+As expected, we concatenated the name fields, and converted the age and height fields to different units.
+Let's take a look at the derived schema for this new transformation:
+print(yaml_dumper.dumps(session.target_schema))
+
+
+
+Note that at this time, deriving ranges using expressions is not supported, so the two measurement fields
+are erroneously typed as having the default_range of string. However, in principle, if you use the
+linkml subset of Python it should be possible to infer the range of the derived field, and this may be added
+in future versions. Currently the tool chain is at an early stage of development.
Next we will look at a different way of doing unit conversions. The LinkML specification allows
+schemas to explicitly declare the units of slots, so let's modify our schema to do this, adding
+a UCUM code for our height_in_cm slot:
from linkml_runtime.linkml_model.units import UnitOfMeasure
+sb.schema.slots['height_in_cm'].unit = UnitOfMeasure(ucum_code='cm')
+session.set_source_schema(sb.as_dict())
+print(yaml.dump(sb.as_dict(), sort_keys=False))
+
+
+
+We will create a new transformer specification, focusing on the height_in_cm field. We will
+transform this into a height_in_meters field, and will use the target_unit field to specify
+the target unit.
session.set_object_transformer("""
+class_derivations:
+ Individual:
+ populated_from: Person
+ slot_derivations:
+ name:
+ expr: "{given_name} + ' ' + {family_name}"
+ height_in_meters:
+ populated_from: height_in_cm
+ unit_conversion:
+ target_unit: m
+""")
+
+
+
+session.transform(obj)
+
+
+
+Next we'll look at the derived target schema, and as expected we see that it has inferred
+the target unit for the height_in_meters field:
print(yaml_dumper.dumps(session.target_schema))
+
+
+
+
+slot = sb.add_slot("aliases", multivalued=True, range="string", replace_if_present=True)
+
+
+
+sb.schema.classes['Person'].slots.append(slot.name)
+
+
+
+session.set_source_schema(sb.as_dict())
+
+
+
+session.set_object_transformer("""
+class_derivations:
+ Individual:
+ populated_from: Person
+ slot_derivations:
+ family_name:
+ populated_from: family_name
+ given_name:
+ populated_from: given_name
+ age:
+ populated_from: age_in_years
+ height:
+ populated_from: height_in_cm
+ aliases:
+ populated_from: aliases
+ stringification:
+ delimiter: '|'
+""")
+
+
+
+obj = {
+ "given_name": "Jane",
+ "family_name": "Doe",
+ "age_in_years": 42,
+ "height_in_cm": 180.0,
+ "aliases": ["Jane", "Janie", "Janey"]
+ }
+flattened = session.transform(obj)
+flattened
+
+
+
+this can easily be serialized to a CSV/TSV
+If a transform does not contain one-way functions, +it can be reversed.
+In this case, reversing the transform allows us to map +from the tabular form back to the richer original representation.
+session.reverse_transform(flattened)
+
+
+
+
+
+
+
+URI: linkmltr:exclude
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
name: exclude
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: exclude
+owner: CopyDirective
+domain_of:
+- CopyDirective
+range: Any
+
+
+
+URI: linkmltr:exclude_all
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
name: exclude_all
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: exclude_all
+owner: CopyDirective
+domain_of:
+- CopyDirective
+range: boolean
+
+
+
+URI: linkmltr:expr
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
name: expr
+alias: expr
+domain_of:
+- SlotDerivation
+- EnumDerivation
+- PermissibleValueDerivation
+
+
+
+A mapping table in which the keys and values are expressions
+URI: linkmltr:expression_to_expression_mappings
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
Range: KeyVal
+Multivalued: True
+name: expression_to_expression_mappings
+description: A mapping table in which the keys and values are expressions
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: expression_to_expression_mappings
+owner: ElementDerivation
+domain_of:
+- ElementDerivation
+range: KeyVal
+inlined: true
+
+
+
+A mapping table in which the keys are expressions
+URI: linkmltr:expression_to_value_mappings
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
Range: KeyVal
+Multivalued: True
+name: expression_to_value_mappings
+description: A mapping table in which the keys are expressions
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: expression_to_value_mappings
+owner: ElementDerivation
+domain_of:
+- ElementDerivation
+range: KeyVal
+inlined: true
+
+
+
+There are a number of excellent frameworks for performing mapping and data transformations. +The LinkML Transformer framework was born out of a need for a framework that:
+In its current state, this framework is less powerful and expressive than many other frameworks +or methodologies for performing transformations. If you need to perform complex data transformations, +you might be better off using an expressive query language like SPARQL or SQL, or even just coding +transformations directly in a programming language or library like Python or Pandas (but note that +even for the coding use case, the LinkML Transformer framework can be useful as a standard way +of documenting transformations).
+Currently the main use case for this framework is mostly isomorphic transformations, with lightweight +manipulations. These lend themselves well to a declarative framework. Uses cases that are a particularly good fit +involve mapping between data-dictionary like standards, with large numbers of metadata elements, where these +elements can often be mapped one-to-one, or with simple manipulations (e.g. unit conversions).
+The origins lie partly in the SSSOM standard, which is intended as an ultra-simple way of specifying +precise mappings between entities (e.g. schema.org Person is the same as DBPedia person). We observed +that many people wanted to extend the language to perform more complex mappings. To address this, we +help a workshop at the Biocuration conference in Padua, Italy in 2022.
+URI: linkmltr:hide
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
name: hide
+alias: hide
+domain_of:
+- SlotDerivation
+- EnumDerivation
+- PermissibleValueDerivation
+
+
+
+Unique identifier for this transformation specification
+URI: schema:identifier
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
name: id
+description: Unique identifier for this transformation specification
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+slot_uri: schema:identifier
+alias: id
+owner: TransformationSpecification
+domain_of:
+- TransformationSpecification
+
+
+
+A reference to a specification that this component implements.
+URI: linkmltr:implements
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| SpecificationComponent | ++ | no | +
| TransformationSpecification | +A collection of mappings between source and target classes | +no | +
Range: Uriorcurie
+Multivalued: True
+name: implements
+description: A reference to a specification that this component implements.
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: implements
+owner: SpecificationComponent
+domain_of:
+- SpecificationComponent
+range: uriorcurie
+
+
+
+URI: linkmltr:include
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| CopyDirective | +Instructs a Schema Mapper in how to map to a target schema | +no | +
name: include
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: include
+owner: CopyDirective
+domain_of:
+- CopyDirective
+range: Any
+
+
+
+LinkML Map is a framework for specifying and executing mappings between data models.
+Features:
+This documentation are available at:
+ +Status:
+The transformation data model is not yet fully stable, and may be subject to change. +Not all parts of the model are implemented in the reference Python framework.
+Given an object that conforms to a LinkML schema,e.g.:
+given_name: Jane
+family_name: Doe
+height_in_cm: 172.0
+age_in_years: 33
+aliases: [Janey, Janie]
+
+Define a mapping in YAML:
+class_derivations:
+ Individual:
+ populated_from: Person
+ slot_derivations:
+ name:
+ expr: "{given_name} + ' ' + {family_name}"
+ description: Concatenating given and family names
+ note this is a bad assumption for names in general,
+ this is just for demonstration
+ height_in_meters:
+ populated_from: height_in_cm
+ unit_conversion:
+ target_unit: m
+ aliases:
+ populated_from: aliases
+ stringification:
+ delimiter: '|'
+
+The schema mapping (aka TransformationSpecification) specifies how to transform the data model.
+The schema mapping is a collection of one or more ClassDerivation objects, +which themselves consist of one or more SlotDerivation objects.
+Transform the data:
+linkml-tr map-data -T tr.yaml -s schema.yaml my-data.yaml
+
+Giving:
+name: Jane Doe
+height_in_meters: 1.72
+aliases: Janey|Janie
+
+Installation and command line usage:
+pip[x] install linkml-map
+cd tests/input/examples/personinfo_basic
+linkml-tr map-data \
+ -T transform/personinfo-to-agent.transform.yaml \
+ -s source/personinfo.yaml \
+ data/Container-001.yaml \
+ -o output/Translated-001.yaml
+
+The command line has subcommands for:
+map-data - map data from a source schema to a target schemaderive-schema - derive a target schema from a source schema and a mappinginvert - reverses a mappingcompile - compiles a mapping to another frameworkmarkdown - for generating static sitesgraphviz - for generating visualizationspython - (partial)r2rml, ...This repo contains both:
+The transformation language is specified in terms of LinkML schemas. +It is intended to be a ployglot transformation language, used for +specifying how to map data models independent of underlying representation +(TSVs, JSON/YAML, RDF, SQL Database, ...).
+Use cases include:
+The data model for transformations mirrors the data model for schemas:
+See the generated docs
+The Maps conformance suite contains a collection of tests for each feature of the language.
+See:
+ +linkml-tr --help
+Usage: linkml-tr [OPTIONS] COMMAND [ARGS]...
+
+ CLI for linkml-map.
+
+Options:
+ -v, --verbose
+ -q, --quiet TEXT
+ --help Show this message and exit.
+
+Commands:
+ derive-schema Derive a schema from a source schema and a mapping.
+ map-data Map data in a source schema using a transformation.
+
+Transforms (maps) data from a source schema to a target schema. This could range from a simple data dictionary mapping +through to a complex mappings.
+cd tests/input/examples/personinfo_basic
+linkml-tr map-data -T transform/personinfo-to-agent.transform.yaml -s source/personinfo.yaml data/Container-001.yaml
+
+cd tests/input/examples/personinfo_basic
+linkml-tr derive-schema -T transform/personinfo-to-agent.transform.yaml source/personinfo.yaml
+
+
+ Used to specify a class-slot tuple that is the inverse of the derived/target slot. This is used primarily for mapping to relational databases or formalisms that do not allow multiple values. The class representing the repeated element has a foreign key slot inserted in that 'back references' the original multivalued slot.
+URI: linkmltr:inverse_of
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
name: inverse_of
+description: Used to specify a class-slot tuple that is the inverse of the derived/target
+ slot. This is used primarily for mapping to relational databases or formalisms that
+ do not allow multiple values. The class representing the repeated element has a
+ foreign key slot inserted in that 'back references' the original multivalued slot.
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+alias: inverse_of
+owner: SlotDerivation
+domain_of:
+- SlotDerivation
+range: Inverse
+
+
+
+URI: linkml:is_a
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| EnumDerivation | +A specification of how to derive the value of a target enum from a source enu... | +no | +
| ElementDerivation | +An abstract grouping for classes that provide a specification of how to deri... | +no | +
| PrefixDerivation | ++ | no | +
| SlotDerivation | +A specification of how to derive the value of a target slot from a source slo... | +no | +
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
| PermissibleValueDerivation | +A specification of how to derive the value of a PV from a source enum | +no | +
name: is_a
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+slot_uri: linkml:is_a
+alias: is_a
+owner: ElementDerivation
+domain_of:
+- ElementDerivation
+range: ElementDerivation
+
+
+
+Additional classes to be joined to derive instances of the target class
+URI: linkmltr:joins
+ + +| Name | +Description | +Modifies Slot | +
|---|---|---|
| ClassDerivation | +A specification of how to derive a target class from a source class | +no | +
Range: AliasedClass
+Multivalued: True
+name: joins
+description: Additional classes to be joined to derive instances of the target class
+comments:
+- not yet implemented
+from_schema: https://w3id.org/linkml/transformer
+rank: 1000
+multivalued: true
+alias: joins
+owner: ClassDerivation
+domain_of:
+- ClassDerivation
+range: AliasedClass
+inlined: true
+
+
+
+