Owl

Overview

Web Ontology Language OWL is modeling language used to author ontologies.

OWL is used for building ontologies, whereas LinkML is a schema language. Nevertheless, it can be useful to render Schemas as OWL (and in fact many semantic web schemas such as PROV have an OWL or RDFS rendering)

See also

The linkml-owl maps between LinkML data and OWL

Note

The OWL is rendered as RDF/turte. We recommend the suffix .owl.ttl to distinguish from the direct RDF mapping

Warning

Currently imports are included in the rendered OWL, this means if you import linkml/types these will also be rendered, which can be confusing

Mapping

  • Each LinkML class maps to an OWL class

  • Each LinkML slot maps to an OWL property

    • if the range of the slot is class, then an ObjectProperty is used

    • otherwise DataProperty is used

  • OWL restrictions are used for cardinality and range constraints

    • only (universal restrictions) is used for ranges

    • If a slot is not multivalued then a max 1 cardinality restrictions are used

    • required non-multivalued slots have an exactly 1 cardinality restriction

    • required multivalued slots have a min 1 cardinality restriction

    • it should be understood that OWL follows the Open World Assumption, thus OWL reasoners enforce a weaker model

  • Each LinkML element is rendered as an instance of the relevant metamodel class

    • This means punning is used

    • In future this behavior may be configurable

Docs

Command Line

gen-owl

Generate an OWL representation of a LinkML model

gen-owl [OPTIONS] YAMLFILE

Options

-o, --output <output>

Output file name

--ontology-iri-suffix <ontology_iri_suffix>

Suffix to append to schema id to generate OWL Ontology IRI

-f, --format <format>

Output format (default=owl)

Options

owl | ttl | json-ld | xml | n3 | turtle | ttl | ntriples | nt | nt11 | nquads | trix | trig

--metadata, --no-metadata

Include metadata in output (default=–metadata)

--useuris, --metauris

Include metadata in output (default=–useuris)

-im, --importmap <importmap>

Import mapping file

--log_level <log_level>

Logging level (default=WARNING)

Options

CRITICAL | ERROR | WARNING | INFO | DEBUG

--mergeimports, --no-mergeimports

Merge imports into source file (default=mergeimports)

Arguments

YAMLFILE

Required argument

Code