diff --git a/.gitignore b/.gitignore index c893d6f7..4edce55c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # Elements that are built using Make .venv/ target/ -/docs/ /make-venv/ # Ignore all of linkml_model except the model directory diff --git a/docs/00preamble/index.html b/docs/00preamble/index.html new file mode 100644 index 00000000..81c0ab42 --- /dev/null +++ b/docs/00preamble/index.html @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + Linked Data Modeling Language: Specification - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+ + + + +

Linked Data Modeling Language: Specification

+

Authors:

+
    +
  • Chris Mungall, Lawrence Berkeley National Laboratory
  • +
  • Harold Solbrig, Johns Hopkins University
  • +
+

Abstract

+

The Linked Data Modeling Language (LinkML) is a language for working with and specifying the structure of instance data. A LinkML schema (aka model or datamodel) describes the structure of instance data, and specifies valid instances and rules for performing inference over instance data.

+

This document defines the structure of instance data using a functional-style syntax, and defines the structure of a particular class of instance data, a LinkML schema, and the rules for these schemas.

+

Notes

+

More information about LinkML can be found on the LinkML site, which includes introductory material and tutorials. +It also includes a reference implementation and set of tools for working with LinkML schemas and data.

+

The specification provided here is intended to be independent of any particular tool or implementation.

+

Status of this specification

+

This is a draft specification open from comments to all.

+

License

+

This specification, like all parts of LinkML are in the public domain under a Creative Commons Zero license waiver.

+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/01introduction/index.html b/docs/01introduction/index.html new file mode 100644 index 00000000..eb1ad4db --- /dev/null +++ b/docs/01introduction/index.html @@ -0,0 +1,623 @@ + + + + + + + + + + + + + + + + Introduction - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + + + + +
+
+ + + + +

Introduction

+

This document is a functional draft specification for the Linked Data Modeling Language (LinkML).

+

LinkML is a data modeling language for describing the structure of a collection of instances, where instances are tree-like object-oriented structures. Instances are pieces of information that represent things of interest in a particular domain, such as individual people, biological samples, places, events, or abstract entities.

+

Instances are either primitive types such as numbers or strings, or objects that are typed using classes from a LinkML schema. Classes are categories or groupings of things in the domain of interest; for example, "Person", "Medical History", "Data file", or "Country". Instances can be inter-related by assigning slot values; for example, an instance of a Person may have values for slots "name" or "country of birth".

+

LinkML schemas also specify rules for determining if instances conform to the schema, and for inference adding additional implicit slot values.

+

LinkML is independent of any programming language, database technology, and is independent of any concrete form for serializing instances of schemas. Mappings are provided for serializing instances as JSON, YAML, RDF, flat tables, or relational models, or for mapping to programming language structures. However, the structure and semantics of LinkML are independent from any of these. Schemas are typically expressed using the YAML serialization, but this specification is defined independent of that particular serialization.

+

LinkML is self-describing, and any LinkML schema is itself a collection instances that instantiates elements in a special schema called the LinkML metamodel.

+

Audience

+

This document is intended for LinkML tool and framework implementors, and is intended to provide formal clarity about +the structure and semantics of LinkML.

+

For a more lightweight introduction, consult the material on the main LinkML site, +including the LinkML tutorial.

+

Conventions and terminology

+

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

+

BNF

+

Grammars in this document are written using the BNF notation, summarized below:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstructSyntax
terminal symbolsenclosed in single quotes
a set of terminal symbols described in Englishitalic
nonterminal symbolsboldface
zero or morecurly braces
zero or onesquare brackets
alternativevertical bar
+

We also include a meta-production rule for expressing comma-delimited lists

+
<NT>List ::= [ <NT> { ',' <NT>List } ]
+
+

Outline

+

The specification is organized in 6 parts. The parts cannot be read independently, as each part builds on +concepts introduced in previous parts.

+

Part 1: Introduction

+

This section. Provides background information and preliminary definitions

+

Part 2: Structure and Syntax of Instances

+

Specification of the data model for instances in LinkML.

+

The data model shown as UML for informative purposes. A normative functional-style syntax is provided for instances, and this syntax is used throughout the specification.

+

This section also introduces a path accessor syntax for specifying how to traverse LinkML instances.

+

Part 3: Structure of Schemas

+

Specification of the core elements of a LinkML schema: ClassDefinitions, TypeDefinitions, SlotDefinitions, EnumDefinitions, as well as ancillary structures.

+

Part 4: Derived Schemas and Schema Semantics

+

Specification of inference procedures for derived schemas, which can be used for purposes such as validation.

+

Part 5: Validation of Instance Data

+

Specification of the procedure for validating LinkML instances using a derived schema

+

Part 6: Mapping of Instance Data

+

Specification of how LinkML instances are mapped to other data models and syntaxes:

+
    +
  • JSON/YAML
  • +
  • RDF and JSON-LD
  • +
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/02instances/index.html b/docs/02instances/index.html new file mode 100644 index 00000000..c846057b --- /dev/null +++ b/docs/02instances/index.html @@ -0,0 +1,537 @@ + + + + + + + + + +LinkML Instances - LinkML Model + + + + + + + + + + + + +
+ + Skip to content + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+

LinkML Instances

+

Functional Instance Syntax and Structure

+

This specification provides a grammar for a functional syntax for +expressing LinkML instances. This syntax is not intended for data +exchange, but instead for unambiguous describing data in LinkML.

+

Section 6 specifies how the instance model is converted to JSON, YAML, and RDF.

+

Instances

+

An instance is either one of four definition types, or a collection, or the special token None:

+
+

Instance := None | InstanceOfClass | InstanceOfType | InstanceOfEnum | InstanceOfReference | CollectionInstance +AtomicInstance :=

+
+
classDiagram + Instance <|-- InstanceOfClass + Instance <|-- AtomicInstance + AtomicInstance <|-- InstanceOfReference + AtomicInstance <|-- InstanceOfType + AtomicInstance <|-- InstanceOfEnum + Instance <|-- CollectionInstance + Instance <-- None + +
+

Definition Types and Names

+

Definition names are used to unambiguously indicate definitions specified in a schema

+

ClassDefinitionName := ElementName

+

ClassDefinitionReferenceName := ElementName

+

TypeDefinitionName := ElementName

+

EnumDefinitionName := ElementName

+

SlotDefinitionName := ElementName

+

ElementName := a finite sequence of characters matching the PN_LOCAL production of SPARQL and not matching any of the keyword terminals of the syntax

+

Note that the grammar needs a table mapping names to types in order to +unambiguously parse a serialization in functional syntax

+

names must not be shared across definition types

+

Instances of Classes

+

An InstanceOfClass is a pair consisting of (1) a ClassDefinition Name that indicates the instantiation type of the instance, and (2) zero to many Assignments, where each +assignment is a key-value pair of a SlotName and an Instance* value.

+

InstanceOfClass := ClassDefinitionName '(' <Assignment>List ')'

+

Assignment := SlotName '=' Instance

+
classDiagram + Instance <|-- InstanceOfClass + InstanceOfClass "0..*" *--> Assignment + Assignment "1" --> Instance + + class InstanceOfClass { + +ClassDefinitionName type + +Assignment assignments + } + class Assignment { + +SlotDefinitionName slot + +Instance value + } +
+

No SlotName can appear twice in any set of Assignments (i.e. SlotName is a key)

+

An example instance might be written in functional syntax as:

+
Person(id=...,
+       name=...,
+       age=...,
+       <other Assignments>)
+
+

Where this instantiates the class Person.

+

Schemas

+

The set of permitted slots for a class is defined by LinkML +schema. Schemas are covered in the next section.

+

An instance can be syntactically valid (i.e conforming to the +grammar defined in this section) while structurally invalid (i.e not +conforming to a schema). Section 5 covers validation.

+

Primitive (Atomic) Instances

+

There are 3 types of primitive instances, each is a pair consisting of (1) a Name of the element instantiated (2) an atomic value

+

InstanceOfType := TypeDefinitionName '(' AtomicValue ')'

+

InstanceOfEnum := EnumDefinitionName '(' AtomicValue ')'

+

InstanceOfReference := ClassDefinitionReferenceName '(' AtomicValue ')'

+
classDiagram + Instance <|-- AtomicInstance + AtomicInstance <|-- InstanceOfReference + AtomicInstance <|-- InstanceOfType + AtomicInstance <|-- InstanceOfEnum + class Instance { + + } + class AtomicInstance { + +AtomicValue value + } + class InstanceOfReference { + +ClassDefinitionName type + } + class InstanceOfType { + +TypeDefinitionName type + } + class InstanceOfEnum { + +EnumDefinitionName type + } +
+

Atomic Values

+

An atomic value is either a string or number or boolean, where numbers can be floating points, decimals, or integers.

+

AtomicValue := StringValue | NumberValue | BooleanValue

+

StringValue := a finite sequence of characters in which " (U+22) and \ (U+5C) occur only in pairs of the form \" (U+5C, U+22) and \ (U+5C, U+5C), enclosed in a pair of " (U+22) characters

+

NumberValue := FloatingPointValue | DecimalValue | IntegerValue

+

FloatingPointValue ::= [ '+' | '-'] ( Digits ['.'Digits] [ Exponent ] | '.' Digits [ Exponent ]) ( 'f' | 'F' )

+

Exponent ::= ('e' | 'E') ['+' | '-'] Digits

+

DecimalValue ::= ['+' | '-'] Digits '.' Digits

+

IntegerValue ::= ['+' | '-'] Digits

+

NonNegativeInteger ::= Zero | PositiveInteger

+

PositiveInteger ::= NonZero { Digit }

+

Digits ::= Digit { Digit }

+

Digit ::= Zero | NonZero

+

NonZero := '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

+

Zero ::= '0'

+

BooleanValue ::= 'True' | 'False'

+

Examples of atomic values are:

+
    +
  • 180.2 -- a DecimalValue
  • +
  • 5 -- an IntegerValue
  • +
  • "Alex" -- a StringValue
  • +
+

Atomic Instance Examples

+

An InstanceOfType instance might look like:

+
Integer(23)
+
+

For this to be a valid InstanceOfType, "Integer" must be the name of a TypeDefinition in the schema

+

Another exampleL

+
PhoneNumber("+1 800 555 0100")
+
+

For this to be a valid InstanceOfType, "PhoneNumber" must be the name of a TypeDefinition in the schema

+

If the schema includes a ClassReference "PersonId" then the following is a valid InstanceOfReference

+
PersonId("SSN:456")
+
+

This MAY be the same string used to identify an instance of a ClassDefinition Person(id="SSN:456"), but this is not required.

+

Collections

+

A collection is zero or more instances, serialized as a comma-delimited list:

+

CollectionInstance := '[' <Instance>List ']'

+
+classDiagram +Instance <|-- CollectionInstance +CollectionInstance "0..*" --> Instance +
+

Examples of collections:

+
    +
  • [String("A"), String("B"), Integer(5)] -- a list of primitive instances
  • +
  • [Person(name=..., ...), Person(name=..., ...)] -- a list of class instances
  • +
  • [Person(name=..., ...), Integer(5), None] -- a heterogeneous collection
  • +
  • [] -- an empty collection
  • +
+

None (Null) instances

+

A special symbol is included to indicate null or missing values

+

None := 'None'

+

An assignment of a slot to None is equivalent to omitting that assignment. I.e. the following two instance serializations are equivalent:

+
Person(address=None)
+
+
Person()
+
+

Combined Example

+

The following is an example of an instance of a ClassDefinition called Person:

+
Person(
+  id=String("SSN:123"),
+  name=String("Alex"),
+  aliases=[String("Alexandra")],
+  address=None,
+  phone=PhoneNumber("+1 800 555 0100"),
+  height=
+    Measurement(value=Decimal(170.2)
+                unit=UnitCode("cm")),
+  relationships=[
+    FamilialRelationship(
+      type=RelationshipType("SIBLING_OF"),
+      related_to=PersonId("SSN:456")
+    )
+  ]
+)                
+
+

See (YAML-Mapping)[#YAML-Mapping] for an example of the equivalent structure expressed in YAML.

+

Parsing this requires a table that maps definition names to schema element types:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Definition NameType
PersonClassDefinition
MeasurementClassDefinition
FamilialRelationshipClassDefinition
UnitCodeEnumDefinition
PersonClassDefinition
+

Identity conditions

+

For two instances i and j to be identical they must be of the same metatype.

+

Identity conditions for two primitive instances are satisfied if both DefinitionName and AtomicValue match

+

None is identical to itself

+

Two collections are identical if they are of the same length and each member of i is identical to at least one member of j

+

Two ClassDefinition instances are identical if the instantiated ClassDefinitionName is identical and each non-None assignment +in i is identical an assignment in j and, and each non-None assignment in j is identical to an assignment in i

+

Two assignments are identical if the slot name is the same, and the value is identical

+

Instance Serializations

+

The abstract syntax provided here is intended as a normative syntax for the purposes +of specifying the semantics of LinkML.

+

See future sections for details on how this functional syntax maps to other serialization +syntaxes and models such as JSON and RDF.

+

Instance Accessor Syntax

+

For a given instance i, accessor syntax can be used to dereference values.

+

Path := Source { PathExtension }

+

PathExtension := '.' SlotDefinitionName | '[' Identifier ']'

+

To interpret an accessor for a given instance i:

+
    +
  • if the path extension is .<s> then i must be a ClassDefinition instance, and the value is equal to the value of the slot assignment for slot s
  • +
  • if the path extension is [<id>] then i must be a Collection instance, and the value is equals to the member of that list that has a slot with the role of identifier whose value is <id>
  • +
+

For example, if i is equal to the Person instance in the example above:

+
    +
  • i.id == String("SSN:123")
  • +
  • i.height.unit == String("cm")
  • +
+
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/03schemas/index.html b/docs/03schemas/index.html new file mode 100644 index 00000000..5e0b5578 --- /dev/null +++ b/docs/03schemas/index.html @@ -0,0 +1,764 @@ + + + + + + + + + +LinkML Schemas - LinkML Model + + + + + + + + + + + + +
+ + Skip to content + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+

LinkML Schemas

+

This section describes the structure of a LinkML schema.

+

Schema Basics

+

A LinkML schema specifies rules and structural conformance conditions for instances. Schemas allow for:

+
    +
  • parsing of instance serializations to LinkML instance structures
  • +
  • structurally and semantically validating LinkML instance structures
  • +
  • inferring missing values in LinkML instance structures
  • +
+

Every LinkML schema m is itself an instance of a special class SchemaDefinition that forms part of a special schema called the LinkML metamodel (abbreviated MM). +There is exactly one metamodel.

+

In this specification:

+
    +
  • Classes in MM are called Metaclasses
  • +
  • Slots in MM are called Metaslots
  • +
+

The metamodel is itself expressed in LinkML, and the latest version can be browsed online

+ +

A schema is canonically represented in YAML. This representation is the YAML serialization of a SchemaDefinition instance following the rules for YAML +serialization in the mapping section.

+

This specification specifies the minimal elements necessary to specify the behavior of LinkML schemas. Schemas may have additional +elements provided in the metamodel.

+

Formally a schema m consists at least of the following elements:

+
    +
  • class definitions MC = {c1,...}, which group instances
  • +
  • slot definitions MS = {s1, ...}, which describe how instances relate to other instances
  • +
  • enum definitions ME = {e1, ...}, enumerated values (value sets)
  • +
  • Enum definitions MT = {t1, ...}, scalar/atomic Enums, such as integers, strings
  • +
  • subset definitions MP = {ss1, ..}, which partition model elements into groupings or views
  • +
  • URI prefixes MU = {prefix1, ..}, which partition model elements into groupings or views
  • +
  • imports MI = {imp1, ..}, which reference schemas that are reused
  • +
  • class definition references MR = {r1,...}, which group pointers to instances
  • +
  • model-level metadata
  • +
+

These are stored in the SchemaDefinition instance as follows:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathElement
m.classesMC
m.slotsMS
m.enumsME
m.EnumsMT
m.subsetsMP
m.importsMI
m.prefixesMU
m.<metaslot>model-level metadata
+

the high level schema can be depicted as:

+
classDiagram + SchemaDefinition "*"-->ClassDefinition: classes + SchemaDefinition "*"-->SlotDefinition: slots + SchemaDefinition "*"-->EnumDefinition: enums + SchemaDefinition "*"-->EnumDefinition: Enums + SchemaDefinition "*"-->SubsetDefinition: subsets + SchemaDefinition "*"-->Prefix: prefixes + ClassDefinition --|> Element + SlotDefinition --|> Element + EnumDefinition --|> Element + EnumDefinition --|> Element + class SchemaDefinition { + +Uri id + +NcName name + +UriOrCurie[] imports + +Ncname default_prefix + +Uri default_range + } +
+

The metamodel makes use of the standard types library, see below

+

For example, consider a schema that models representations of individual people and organizations they belong to may include a class definition Person, and slot definitions for name, address, relationships and so on.

+

Because schemas, are instances of the metamodel, this hypothetical schema may be serialized in functional instance syntax as follows:

+
SchemaDefinition(
+  id=String('http://example.org/organization'),
+  classes=[
+    ClassDefinition(
+      name=String("Person"),
+      slots=[
+        String("id"),
+        String("name"),
+        String("height"),
+        String("age"),
+        ...
+      ]
+    ),
+    ClassDefinition(
+      name=String("Organization"),
+      slots=[
+        String("id"),
+        ...
+      ]
+    ),
+    ...
+  ],
+  slots=[
+    SlotDefinition(
+      name=String("id"),
+      identifier=True,
+      description=String("..."),
+      range=String("String"),
+      ...
+    ),
+    SlotDefinition(
+      name=String("name"),
+      description=String("..."),
+      range=String("String"),
+      ...
+    )
+  ],
+  enums=[
+     EnumDefinition(
+       name=String("JobCode"),
+       permissible_values=[...],
+     )
+  ],
+  Enums=[
+     EnumDefinition(
+       name=String("Date"),
+       ...
+     ),
+     EnumDefinition(
+       name=String("String"),
+       ...
+     ),
+  ]
+)  
+
+

This maps to:

+ + + + + + + + + + + + + + + + + + + + +
Example Model: Organization Schema
MC Classes: Person, Organization, Address, ...
MS Slots: id, name, date_of_birth, employed_at, lives_at, ...
ME Enums: JobCode, ...
MT Enums: Date, String, ...
+

To help understand the basic concepts, it can be helpful to think about analogous structures in other frameworks. +However, it should be understood these are not equivalents.

+
    +
  • ClassDefinitions are analogous to:
      +
    • classes in object-oriented languages
    • +
    • tables in relational databases and spreadsheets
    • +
    • owl:Class entities in RDFS/OWL
    • +
    +
  • +
  • SlotDefinitions are analogous to:
      +
    • attributes in object-oriented languages
    • +
    • columns or fields in relational databases and spreadsheets
    • +
    • properties in JSON-Schema
    • +
    • rdf:Property entities in RDFS/OWL
    • +
    +
  • +
  • EnumDefinitions are analogous to:
      +
    • enumerated Enums in programming languages and some relational systems
    • +
    • Note however that in LinkML enums are optionally backed by stronger semantics with enum elements (permissible values) mapped to vocabularies or ontologies
    • +
    +
  • +
  • EnumDefinitions are analogous to:
      +
    • data Enums in most OO languages
    • +
    • primitive Enums in database systems
    • +
    • extensible Enums in some systems
    • +
    • rdf:Literals in RDF
    • +
    • DataEnums in OWL
    • +
    +
  • +
+

Elements and Expressions

+

For each of the 4 core element Enums <T>, there are a triad of 3 classes in the metamodel:

+
    +
  • <T>Expression
  • +
  • Anonymous<T>Expression
  • +
  • <T>Definition
  • +
+

depicted as:

+
classDiagram +T_Expression "*" --> AnonymousT_Expression: <boolean combinator> +class T_Definition { + +T_Name name +} +T_Definition --|> T_Expression +AnonymousT_Expression --|> T_Expression +
+

For many purposes, all that is required is the Definition element. The purpose of the above abstraction is to allow +composition of anonymous expressions using boolean operators. For example, we may want to refer to the union of collection +of ClassDefinitions.

+

Metaclasses

+
    +
  • metamodel documentation: Element
  • +
+

The following describes the structure of schema elements. Each element of a schema instantiates a Metaclass

+

ClassDefinition

+ +

Instances of ClassDefinition are instantiable.

+

Any LinkML instance that instantiates a ClassDefinition will have zero to many slot-value assignments, constrained +by rules that operate off of the metaslot assignments of that class.

+

ClassDefinition inherits from both Element and ClassExpression. A ClassDefinition must have a name. +ClassDefinitions may refer to AnonymousClassExpressions as part of boolean expressions.

+
classDiagram +ClassExpression "*" --> AnonymousClassExpression: any_of +ClassExpression "*" --> AnonymousClassExpression: exactly_one_of +ClassExpression "*" --> AnonymousClassExpression: none_of +ClassExpression "*" --> AnonymousClassExpression: all_of +ClassDefinition --|> ClassExpression: mixin +ClassDefinition --|> Element: is_a +AnonymousClassExpression --|> ClassExpression +class ClassDefinition { + +ClassDefinitionName name + +boolean abstract + +boolean mixin +} +ClassDefinition "*"--> SlotDefinition: slots +ClassDefinition "*"--> SlotDefinition: slot_usage +ClassDefinition "*"--> AttributeDefinition: slot_usage +ClassDefinition "0..1"--> ClassDefinition: is_a +ClassDefinition "*"--> ClassDefinition: mixins +ClassDefinition "*"--> AnonymousClassExpression: classification_rules +ClassDefinition "*"--> ClassRule: rules +
+
    +
  • name is a required field that uniquely identifiers the ClassDefinition within a schema
  • +
  • slots is a list of slot names indicating the slots that are applicable for that class
  • +
  • slot_usage is a list of slots that specifies more specific usage conditions for the slot in the context of this class
  • +
  • attributes is a list of slots that are intended to be local to the class
  • +
  • is_a is an optional parent class which this class inherits from
  • +
  • mixins is a list of parent mixin class which this class inherits from
  • +
  • abstract is a boolean indicating whether the class is intended to be directly instantiated
  • +
  • mixin is a boolean indicating whether the class is intended to be uses as a mixin
  • +
+

An example collection of ClassDefinitions in a schema specified using the functional syntax might be:

+
SchemaDefinition(
+  classes=[
+   ClassDefinition(
+    name=String("NamedThing"),
+    abstract=True,
+    slots=[
+        String("id"),
+        String("name"),
+        ...
+      ]
+    ),
+   ClassDefinition(
+    name=String("Person"),
+    description=String("A person, living or dead"),
+    is_a=String("NamedThing"),
+    attributes=[
+        SlotDefinition(
+            name=String("height"),
+            ...),
+        SlotDefinition(
+            name=String("age"),
+            ...)
+    ],
+    ...
+    )
+
+

This might be used to validate an instance:

+
Person(id=String("P:123"),
+       name=String("Alex"),
+       height=...
+       age=...)
+
+

See the next sections for validation rules

+

SlotDefinition

+ +

SlotDefinition is NOT instantiable. Each assignment in a LinkML ClassDefinition instance must use a SlotDefinition from the schema.

+

SlotDefinition inherits from both Element and SlotExpression. A SlotDefinition must have a name. +other schema elements may refer to AnonymousSlotExpressions composed using boolean operators.

+
classDiagram +class SlotExpression { + +SlotDefinitionName range +} +SlotExpression "*" --> AnonymousSlotExpression: any_of +SlotExpression "*" --> AnonymousSlotExpression: exactly_one_of +SlotExpression "*" --> AnonymousSlotExpression: none_of +SlotExpression "*" --> AnonymousSlotExpression: all_of +class SlotDefinition { + +SlotDefinitionName name + +boolean identifier + +boolean key + +boolean abstract + +boolean mixin + +boolean designates_type + +SlotDefinitionName is_a + +SlotDefinitionName[] mixins + +ClassDefinitionName range + +Decimal minimum_value + +Decimal maximum_value + +String equals_expression + +String pattern + +String string_serialization + +boolean symmetric + +boolean asymmetric + +boolean reflexive + +boolean irreflexive + +boolean locally_reflexive + +boolean transitive + +SlotDefinition transitive_form_of + +SlotDefinition reflexive_transitive_form_of + +SlotDefinition inverse +} +SlotDefinition --|> SlotExpression: mixin +SlotDefinition --|> Element: is_a +SlotDefinition "0..1" --> SlotDefinition: is_a +SlotDefinition "*" --> SlotDefinition: mixins +
+

An example collection of SlotDefinitions might be:

+
SchemaDefinition(
+  slots=[
+   SlotDefinition(
+    name=String("id"),
+    identifier=True,
+    description=String("A unique identifier for an object"),
+    range=String("String"),
+    ...
+    ),
+   SlotDefinition(
+    name=String("name"),
+    description=String("..."),
+    range=String("String"),
+    ...
+    )
+
+

EnumDefinition

+ +

EnumDefinition instances are instantiable.

+
classDiagram +class EnumExpression { + +TypeDefinitionName range +} +EnumExpression "*" --> AnonymousEnumExpression: any_of +EnumExpression "*" --> AnonymousEnumExpression: exactly_one_of +EnumExpression "*" --> AnonymousEnumExpression: none_of +EnumExpression "*" --> AnonymousEnumExpression: all_of +class EnumDefinition { + +EnumDefinitionName name +} +EnumDefinition "*" --> PermissibleValue: permissible_values +class PermissibleValue { + +String text + +String description + +UriOrCurie meaning +} +
+

TypeDefinition

+ +

TypeDefinition instances are instantiable.

+
classDiagram +class TypeExpression { + +TypeDefinitionName range +} +TypeExpression "*" --> AnonymousTypeExpression: any_of +TypeExpression "*" --> AnonymousTypeExpression: exactly_one_of +TypeExpression "*" --> AnonymousTypeExpression: none_of +TypeExpression "*" --> AnonymousTypeExpression: all_of +class TypeDefinition { + +TypeDefinitionName name + +TypeDefinitionName typeof + +TypeDefinitionName[] mixins + +Uri uri + +String base + +String repo +} +TypeDefinition --|> TypeExpression: mixin +TypeDefinition --|> Element: is_a + +
+

See below for the standard types included with LinkML. These can be extended using typeof

+

ClassDefinitionReferences

+

ClassDefinitionReferences are primitive elements that provide a way to reference a particular instances.

+

ClassDefinitionReferences are not part of the asserted metamodel but are derived from derivation rules -- see next section

+

Other Schema Elements

+

Prefixes

+
    +
  • metamodel documentation: Prefix
  • +
+
classDiagram + SchemaDefinition "*"-->Prefix: prefixes + class Prefix { + +Ncname prefix_prefix + +Uri prefix_reference + } +
+

Example:

+
SchemaDefinition(
+    prefixes=[
+       Prefix(prefix_prefix=Ncname("linkml")
+              prefix_reference=Uri("https://w3id.org/linkml/")),
+       Prefix(prefix_prefix=Ncname("schema")
+              prefix_reference=Uri("http://schema.org")),
+       Prefix(prefix_prefix=Ncname("wgs")
+              prefix_reference=Uri("http://www.w3.org/2003/01/geo/wgs84_pos#")),
+       Prefix(prefix_prefix=Ncname("qudt")
+              prefix_reference=Uri("http://qudt.org/1.1/schema/qudt#"))
+    ])
+
+

Composition of Expressions

+

Built in and defined types

+

LinkML has a number of types defined in the types model, documented here

+
    +
  • Boolean (Bool) - A binary (true or false) value
  • +
  • Date (XSDDate) - a date (year, month and day) in an idealized calendar
  • +
  • Datetime (XSDDateTime) - The combination of a date and time
  • +
  • Decimal (Decimal) - A real number with arbitrary precision that conforms to the xsd:decimal specification
  • +
  • Double (float) - A real number that conforms to the xsd:double specification
  • +
  • Float (float) - A real number that conforms to the xsd:float specification
  • +
  • Integer (int) - An integer
  • +
  • Ncname (NCName) - Prefix part of CURIE
  • +
  • Nodeidentifier (NodeIdentifier) - A URI, CURIE or BNODE that represents a node in a model.
  • +
  • Objectidentifier (ElementIdentifier) - A URI or CURIE that represents an object in the model.
  • +
  • String (str) - A character string
  • +
  • Time (XSDTime) - A time object represents a (local) time of day, independent of any particular day
  • +
  • Uri (URI) - a complete URI
  • +
  • Uriorcurie (URIorCURIE) - a URI or a CURIE
  • +
+
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/04derived-schemas/index.html b/docs/04derived-schemas/index.html new file mode 100644 index 00000000..ae60712b --- /dev/null +++ b/docs/04derived-schemas/index.html @@ -0,0 +1,544 @@ + + + + + + + + + +Derived Schemas - LinkML Model + + + + + + + + + + + + +
+ + Skip to content + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+

Derived Schemas

+

This section describes rules that can be applied to a schema to obtain a derived (aka induced) schema.

+

The derived schema can be materialized, or it may be present as a view onto a schema. A derived view may also be referred to +as an inferred or induced view.

+
flowchart TD + M[Asserted Schema] --> Derivation{Derivation Procedure} + Derivation -->|derives| Mstar[Derived Schema] + R[Rules] --> Derivation +
+

Derivations happen via rules that are specified below, using a set of convenience functions

+

Conventions

+

We use m to denote the input or asserted schema (model), and m* to denote the derived schema

+

Functions

+

Function: ClassIdentifier

+

The function ClassIdentifier(c) takes a ClassDefinition or ClassDefinitionName as input and returns:

+
    +
  • the name of a derived attribute s in c where s.identifier is True in m*
  • +
  • None if there is no such slot
  • +
  • An error if there are multiple such slots
  • +
+

Function: Closure

+

The function Closure(x, s) takes as input an element x and a metaslot s and returns the mathematical closure +of looking up x.<s>

+

The ReflexiveClosure includes x

+

Function: Ancestors

+

The function Ancestors(x) returns the Closure of the Parents function applied to x. Parents itself is the union of is_a and mixins.

+

The function ReflexiveAncestors uses the ReflexiveClosure.

+

Derivation Rules

+

Rule: Model Imports

+

Each model imports zero to many imports, indicated by the SchemaDefinition.imports metaslot.

+

m* is set to be the union of all schema elements from the ReflexiveClosure of m.imports

+

When copying an element x from an import into m*, the name x.name must be unique - if the same name has been used in another model, the derivation procedure fails, and an error is thrown.

+

Note: If two or more models import the same target (e.g. m1 imports m2 and m3 and m2 imports m3), m3 will be only be resolved once.

+

Note: Two models are considered to be "identical" if they both +have the same id. If m2 and m3 both have id: http://models-r.us/modelA, it is assumed that, despite the different location, they represent the same thing. LinkML will check the model version field and will raise an error if m2 has version: 1.0.0 and m3 has version: 1.0.1

+

Each imported module must be resolved - i.e the value of the import slot is mapped to a location on disk or on the web

+

Rule: fromschema elements

+

Each element in the schema as assigned a metaslot fromschema value. This is the value of the id of the schema in which that element is defined.

+

This is preserved over imports, such that if m imports m2, and m2 defines a class c, then m*[c].fromschema = m2

+

Rule: Applicable Slot Names

+

The set of applicable slot names for a class c are determined by taking the union of:

+
    +
  • The names of all values of x.attributes
  • +
  • The names of all values of x.slots
  • +
+

For all x in ReflexiveAncestors(c)

+

Rule: Derived Attributes

+

Derived attributes can be calculated for every applicable slot name for any class c

+

c.attributes[s] = DerivedAttributes(c,s)

+

This is the combination of asserted attributes for c, as well as asserted attributes for ancestors of c, +as well as the SlotDefinition corresponding to that attribute, together with any overrides specified by slot_usage in c +and ancestors of c

+
    +
  • attributes asserted directly in c.attributes in the base schema
  • +
  • attributes derived from each SlotDefinition s in c.slots by
      +
    • looking up s in m*.slots and copying the slot-value assignments from these SlotDefinitions
    • +
    • overriding these slot-value assignments with any slot-value assignments provided by c.slot_usage[s]
    • +
    +
  • +
  • inheriting from parents of c using precedence rules
  • +
  • inheriting from parents of s
  • +
+

The precedence rules for derived attributes are as follows:

+

If a metaslot s is declared multivalued then when copying s from a parent to a child, the values are appended.

+

If a metaslot s is declared multivalued

+

if a slot is multi valued then copying will append, unless the element already exists.

+

if the slot is single valued, and intersection rules can be applied to the slot, then these are performed on all values

+

if the slot is single valued, and intersection rules cannot be applied to the slot, then the following precedence rules are applied:

+
    +
  • metaslot values from slot_usage take the highest priority
  • +
  • metaslot values from the slot definition take the next highest priority
  • +
  • direct mixins take the next highest priority. where multiple direct mixins are provided as a list, the last element takes highest priority
  • +
  • direct is_as take the next highest priority
  • +
  • the above two rules are applied one level up, and then recursively applied
  • +
+

Intersection rules

+ + + + + + + + + + + + + + + + + + + + + + + + + +
metaslotrule
maximum_valuemin(v1,v2)
minimum_valuemax(v1,v2)
patternTBD
rangeIF subsumes(v1,v2) then v2
ELSE IF subsumes(v2,v1) then v2 ELSE UNDEFINED
+

If the result of applying any intersection rule is UNDEFINED then we fall back on precedence rules

+

Rule: Default Range

+

For all attributes in the derived model, if a range is not assigned using the above method, then the range is assigned a value corresponding +to the value of default_range for the schema in which the slot is defined.

+

Rule: Derived Class and Slot URIs

+

For each class or slot, if a class_uri or slot_uri is not specified, then this is derived by concatenating m.default_prefix with the CURIE separator : followed by the SafeUpperCamelCase encoding of the name of that class or slot definition

+

Rule: Generation of patterns from structured patterns

+

For any slot s, if s.structured_pattern = p and p is not None then s.pattern is assigned a value based on the following +procedure:

+

If p.interpolated is True, then the value of s.syntax is interpolated, by replacing all occurrences of braced text {VAR} +with the value of VAR. The value of VAR is obtained using m.settings[VAR], where m is the schema in which p is introduced.

+

If p.interpolated is not True, then the value of s.syntax is used directly.

+

If p.partial_match is not True, then s.pattern has a '^' character inserted at the begining and a '$' character inserted as the end.

+

Rule: Generation of ClassDefinitionReferences

+

For every ClassDefinition c, if there exists a slot s such that s.identifer=True, +then a corresponding ClassDefinitionReference r is generated.

+

r.name is assigned to be the concatenation of c.name and s.name

+

r functionally serves as a foreign key to instances of r, and allows for non-inlined +representation of instance references in tree-based formats such as JSON.

+

Structural Conformance Rules

+

Rule: Each referenced entity must be present

+

Every ClassDefinition, ClassDefinitionReference, SlotDefinitionReference, EnumDefinitionReference, and TypeDefinitionReference must be resolvable within m*

+

However, not every element needs to be referenced. For example, it is valid to have a list of SlotDefinitions that are never used in m*.

+

ClassDefinition Structural Conformance Rules

+

Each c in m*.classes must conform to the rules below:

+
    +
  • c must be an instance of a ClassDefinition
  • +
  • c must have a unique name c.name, and this name must not be shared by any other class or element in m*
  • +
  • c lists permissible slots in c.slots, the range of this is a reference to a SlotDefinition in m*.slots
  • +
  • c defines how slots are used in the context of c via a collection of SlotDefinitions specified in c.slot_usage
  • +
  • c may define local slots using c.attributes, the value of this is a. collection of SlotDefinitions
  • +
  • c may have certain boolean properties defined such as c.mixin and c.abstract
  • +
  • c must have exactly one value for c.class_uri in m*, and the value must be an instance of the builtin type UriOrCurie
  • +
  • c may have parent ClassDefinitions defined via c.is_a and c.mixins
      +
    • the value of c.is_a must be a ClassDefinitionReference
    • +
    • the value of c.mixins must be a collection of ClassDefinitonReferences
    • +
    +
  • +
  • For any parent p of c, if p.mixin is True, then c.mixin SHOULD be True
  • +
  • c includes additional rules in c.rules and c.classificiation_rules
  • +
  • c may have any number of additional slot-value assignments consistent with the validation rules provided here with the metamodel MM
  • +
+

SlotDefinition Structural Conformance Rules

+

Each s in m*.slots must conform to the rules below:

+
    +
  • s must be an instance of a SlotDefinition
  • +
  • s must have a unique name s.name, and this name must not be shared by any other type or element
  • +
  • s must have a range specified via s.range in m*
  • +
  • s may have an assignment s.identifier which is True if s plays the role of a unique identifier
  • +
  • s may have certain boolean properties defined such as s.mixin and s.abstract
  • +
  • s must have exactly one value for s.slot_uri in m*, and the value must be an instance of the builtin type UriOrCurie
  • +
  • s may have parent SlotDefinitions defined via s.is_a and s.mixins
      +
    • the value of s.is_a must be a SlotDefinitionReference
    • +
    • the value of s.mixins must be a collection of SlotDefinitionReferences
    • +
    • For any parent p of s, if p.mixin is True, then s.mixin SHOULD be True
    • +
    +
  • +
  • s may have any number of additional slot-value assignments consistent with the validation rules provided here with the metamodel MM
  • +
+

TypeDefinition Structural Conformance Rules

+

Each s in m*.types must conform to the rules below:

+
    +
  • t must be an instance of a TypeDefinition
  • +
  • t must have a unique name t.name, and this name must not be shared by any other type or element
  • +
  • t must have a mapping to an xsd type provided via t.uri in m*
  • +
  • t may have a parent type declared via t.typeof
  • +
  • t may have any number of additional slot-value assignments consistent with the validation rules provided here with the metamodel MM
  • +
+

EnumDefinition Structural Conformance Rules

+

Each e in m*.enums must conform to the rules below:

+
    +
  • e must be an instance of a EnumDefinition
  • +
  • e must have a unique name e.name, and this name must not be shared by any other enum or element
  • +
  • e lists all static permissible values via e.permissible_values, the value of which is a list of instances of the MM class PermissibleValue
  • +
  • e may have any number of additional slot-value assignments consistent with the validation rules provided here with the metamodel MM
  • +
+

ClassDefinitionReference Structural Conformance Rules

+

Each r in m*.class_references must conform to the rules below:

+
    +
  • r must be an instance of a ClassDefinitionReference
  • +
  • r must have a unique name r.name, and this name must not be shared by any other type or element
  • +
+

Metamodel Conformance Rules

+

Both the asserted and derived schema should be valid instances of the LinkML metamodel MM +using the instance validation rules described in the next section

+
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/05validation/index.html b/docs/05validation/index.html new file mode 100644 index 00000000..ba392ff5 --- /dev/null +++ b/docs/05validation/index.html @@ -0,0 +1,487 @@ + + + + + + + + + +Validation using Schemas - LinkML Model + + + + + + + + + + + + +
+ + Skip to content + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ +
+
+

Validation using Schemas

+

Validation is a procedure that takes as input:

+
    +
  • A LinkML instance structure i, where i is to be validated
  • +
  • A LinkML instance structure root. This may be the same as i
  • +
  • A derived schema m*
  • +
+

The validation procedure will produce output that can be used to determine if the instance is structurally and semantically valid according to the schema.

+
flowchart TD + M[Asserted Schema] --> Derivation{Derivation Procedure} + Derivation -->|derives| Mstar[Derived Schema] + R[Rules] --> Derivation + I[Instance] --> Validation{Validation Procedure} + Validation -->|produces| Results[Validation Results] + Mstar --> Validation +
+

The following holds for any validation procedure:

+
    +
  • The output MUST include a boolean slot indicating whether the input can be demonstrated to be false
  • +
  • The output SHOULD include additional information about the nature of all problems encountered.
  • +
  • The output SHOULD be conformant with the LinkML validation schema.
  • +
  • The output MAY also return cases where recommendations are not adhered to
  • +
  • The output MAY also be combined with parsing to yield the precise location (i.e. line numbers) in the source serialization document where problems are found.
  • +
  • The procedure MAY restrict validation to defined subsets (profiles) of the Metamodel
  • +
  • The procedure SHOULD return in its payload an indication of which profile and version is used.
  • +
+

The validation procedure is to first take the metaclass that is instantiated by the type of the instance i, +and apply one of the 4 checks below, with each check performing its own sub-rules. The ClassDefinition check +is recursive, checking each slot-value assignment. This means a check on any instance will always validate the +full instance tree.

+

Validation of ClassDefinitions

+

Given an instance i of a ClassDefinition:

+

ClassDefinitionName( SVs )

+

Where SVs is a collection of length N, with index i..N and members slot_i=value_i, +and ClassDefinitionName is the name of a ClassDefinition in m*, such that C=m*.classes[ClassDefinitionName]

+

CD Rule: Assignment values must be valid

+

for each slot=value assignment in SVs, the validation procedure is performed on value, with +root remaining the same

+

CD Rule: ClassDefinition instances must instantiate a class in the schema

+

ClassDefinitionName MUST be the name of a ClassDefinition in m*

+

C is assigned to be the value of m*[ClassDefinitionName]

+

Atts is assigned to be the value of C.attributes (see the previous section)

+

C SHOULD have all the following properties:

+
    +
  • C.deprecated SHOULD be None
  • +
  • C.abstract SHOULD NOT be True
  • +
  • C.mixin SHOULD NOT be True
  • +
+

CD Rule: identifiers must be unique

+

We define a procedure IdVal(i) which yields the value of i.<identifier_slot> where identifier_slot +is the slot n Atts with metaslot assignment identifier=True

+

If there is no such slot then **IdVal**(i`) is None and this check is ignored.

+

i is invalid if there exists another instance j such that j is reachable from root, +and IdVal(i)=IdVal(j) and i and j are distinct.

+

CD Rule: All assignments must be to permitted slots

+

For each s=value assignment in <Assignment1>, <Assignment2>, ..., <AssignmentN>:

+
    +
  • s must be in Atts
  • +
+

Rule: All required slots must be specified

+

For each slot s in Atts, if s.required=True, then i.<s> must be neither None nor the empty collection []

+ +

For each slot s in Atts, if s.recommended=True, then i.<s> should be neither None nor the empty collection []

+

If this condition is not met, this is considered a warning rather than invalidity

+

Rule: Assigned values must conform to multivalued cardinality

+

For each slot s in Atts,

+
    +
  • if s.multivalued is True, then i.<s> must be a collection or None
  • +
  • If s.multivalued is False, then i.<s> must not be a collection
  • +
+

Rule: values should be within stated bounds

+

For each slot s in Atts,

+
    +
  • if s.maximum_value is not None, then i.<s> must be a number and must be less that or equal to the maximum value
  • +
  • if s.minimum_value is not None, then i.<s> must be a number and must be greater that or equal to the minimum value
  • +
+

Rule: values should equal evaluable expression

+

For each slot s in Atts, if s.equals_expression is not None, then i.<s> must equal +the value of Eval(s.equals_expression). See section on expression language +for details of syntax.

+

Note: this rule can be executed in inference mode

+

Rule: values should equal string_serialization

+

For each slot s in Atts, if s.string_serialization is not None, then i.<s> must equal +the value of Stringify(s.string_serialization). See section on expression language +for details of syntax.

+

Rule: values should equal regular expression patterns

+

Note: this rule can be executed in inference mode

+

Range class instantiation check

+

For each slot s in Atts, if i.<s> is not None, and s.range is in m*.classes, +then s.range must be in ReflexiveAncestors(Type(i.<s>))

+

Additional checks MAY be performed based on whether s.inlined is True

+
    +
  • if s.inlined, then i.<s> SHOULD NOT be a Reference
  • +
  • if s.inlined is False, then EITHER:
      +
    • i.<s> SHOULD be a Reference
    • +
    • OR i.<s> instantiates a class R such that R has no slot rs that is declared to be an identifier. i.e. rs.identifier = True
    • +
    +
  • +
+

Range type check

+

For each slot s in Atts, if i.<s> is not None, and s.range is in m*.types, +where i.<s> = *T*( **AtomicValue** ) must match s.range,

+

here T.uri is used to determine the type:

+
    +
  • for xsd floats, doubles, and decimals, AtomicValue must be a decimal- for xsd floats, doubles, and decimals, AtomicValue must be a decimal
  • +
  • for xsd ints, AtomicValue must be an Integer
  • +
  • for xsd dates, datetimes, and times, AtomicValue must be a string conforming to the relevant ISO type
  • +
  • for xsd booleans, AtomicValue must be True or False
  • +
+

Range enum check

+

For each slot s in Atts, if i.<s> is not None, and s.range is in m*.enums, +then i.<s> must be equal to pv.text for some pv in m*.enums[s.range]

+

Boolean combinations of expressions

+

There are 4 boolean operator metaslots:

+
    +
  • any_of
  • +
  • exactly_one_of
  • +
  • none_of
  • +
  • all_of
  • +
+

These can apply to classes, slots, types, or enums. The range is always a list of operand expressions +of the same type.

+

In all cases, the semantics are as follows:

+
    +
  • any_of: true if there exists a member of the operands that evaluates to true
  • +
  • for empty lists this is always false
  • +
  • exactly_one_of: true if there exists a member of the operands that evaluates to true, and all other members evaluate to false
  • +
  • for empty lists this is always false
  • +
  • none_of: true if there does not exist a member of the operands that evaluates to true
  • +
  • for empty lists this is always true
  • +
  • for lists of length 1 this is the same as the logical NOT operator
  • +
  • for lists of length 2 this is the same as the logical XOR operator
  • +
  • all_of: true if there are no members that evaluate to false
  • +
  • for empty lists this is always true
  • +
+

range expression checks

+

For each slot s in Atts, if i.<s> is not None, and RE = s.range_expression is not None, then a check +CE(x) is performed on i.<s>

+

Rule evaluation

+

For each rule r in C.rules:

+
    +
  • if r.preconditions is None or r.preconditions is satisfied, then
  • +
  • r.postconditions are applied
  • +
+

Classification Rule evaluation

+

type designator checks

+

Inference of new values

+
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/06mapping/index.html b/docs/06mapping/index.html new file mode 100644 index 00000000..c4dbfdb5 --- /dev/null +++ b/docs/06mapping/index.html @@ -0,0 +1,722 @@ + + + + + + + + + + + + + + + + Translation of instance graphs - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + + + + +
+
+ + + + +

Translation of instance graphs

+

This section describes how LinkML instances are translated to different formats and data models.

+
    +
  • Conversion from LinkML instances to another format is called serialization or dumping
  • +
  • Conversion to LinkML instances from another format is called parsing or loading
  • +
+

The reference implementation is the linkml-runtime but other implementations that conform to this specification are valid.

+

Translation of instances to JSON or YAML

+
    +
  • Serialization to JSON takes as input:
      +
    • a (root) instance
    • +
    +
  • +
  • Parsing from JSON takes as input:
      +
    • a JSON document
    • +
    • a target ClassDefinitionName
    • +
    • a SchemaDefinition
    • +
    +
  • +
+

Instances of ClassDefinition

+

Given an instance i of a ClassDefinition:

+

ClassDefinitionName( s1=v1, ..., sn=v2 )

+

This is translated to

+
{
+   Tr(s1) = Tr(v1),
+   ...,
+   Tr(s2) = Tr(v2)           
+}
+
+

Note this is potentially lossy, as the type is dropped

+

When parsing, if this is the root instance, then the target ClassDefinition is used

+

If this is not the root instance, then the type is inferred from the root of the parent slot in the derived schema

+

Optionally, this type is deepened if C.type_designator is not None - the value of this slot is used to +set the target ClassDefinitionName

+

Instances of None

+

The parent slot is omitted

+

Instances of Collection

+

If the parent slot s.inlined_as_list=True

+
{
+   IdVal(member1): 
+      Tr(member1) - IdField(member1)
+   ...
+   IdVal(memberN): 
+      Tr(memberN) - IdField(memberN)
+}
+
+

otherwise:

+
[
+   Tr(member_1),
+   ...
+   Tr(member_n),
+]
+
+

Instances of TypeDefinition

+

The direct value is used

+

Instances of EnumDefinition

+

The direct value is used

+

Instances of ClassDefinitionReference

+

The direct value is used

+

Translation to RDF

+

Two RDF translations are provided:

+
    +
  • A direct translation
  • +
  • Translation via JSON-LD, which combines
      +
    1. Translation of a LinkML SchemaDefinition to a JSON-LD Context
    2. +
    3. The standard translation of LinkML instances to JSON
    4. +
    +
  • +
+

Both translations make use of the prefixes provided in the schema

+

The semantic content of both is equivalent.

+

Mapping of CURIEs to URIs

+

LinkML provides standard types:

+
    +
  • Curie
  • +
  • Uri
  • +
  • CurieOrUri
  • +
+

The syntax for a CURIE is defined by W3C CURIE Syntax 1.0

+

curie := [ [ prefix ] ':' ] reference

+

prefix := NCName

+

reference := irelative-ref

+

We define a function CurieToUri(x) that maps (expands) a CurieOrUri to a Uri

+

If x is already a Uri, then x is returned, otherwise the following procedure is followed

+

To expand a CURIE with an explicit prefix to a URI using a schema m, first m.prefixes is consulted for m.prefixes[prefix].

+

If this is present, then m.prefixes[prefix].prefix_reference is uses as the Base URI

+

If this is not present, then m.prefixes[m.default_prefix].prefix_reference is used as the Base URI

+

to obtain the URI, the Base URI is concatenated with the reference

+

If the CURIE has no explicit prefix, and the CURIE is value of a slot s, then s.implicit_prefix is used

+

Direct Translation of instance graphs to RDF

+

A translation Tr operates on an instance i, in the context of a derived schema m*

+

Instances of ClassDefinition

+

If i is an instance of a ClassDefinition, then Tr(i) is as follows:

+

ClassDefinitionName( s1=v1, ..., sn=v2 )

+

We assign a value to subject which will be either an IRI, or a blank node

+
    +
  • If IdVal(i) is None, the subject is assigned a blank node
  • +
  • Otherwise subject = CurieToUri(IdVal(i))
  • +
+

We assign a value object for the type of i. This will be equivalent to the c.class_uri in m*

+

This is used to generate a triple (subject rdf:type CurieToUri(object))

+

For each s=v in the assignments where s.identifier=True does not hold, and v is not None, we generate a triple

+

(subject TrSlot(s) Tr(v))

+

Here TrSlot(s) = CurieToUri(s.slot_uri)

+

Instances of TypeDefinition

+

If i is an instance of a TypeDefinition of type t +then Tr(i) is translated to an RDF literal, with datatype CurieToUri(t.uri)

+

Instances of EnumDefinition

+

If i is an instance of a EnumDefinition, then Tr(i) is as follows:

+

If i corresponds to a PermissibleValue with pv.meaning that is not None, then +Tr(i) = CurieToUri(pv.meaning)

+

Instances of ClassDefinitionReference

+

If i is an instance of a ClassDefinitionReference +then Tr(i) = CurieToUri(i.value)

+

Translation of instance graphs to RDF graphs (via JSON-LD)

+

To be specified

+

Translation of instance graphs to RDF* and property graphs

+

To be specified

+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/AliasPredicateEnum/index.html b/docs/AliasPredicateEnum/index.html new file mode 100644 index 00000000..fa980ecf --- /dev/null +++ b/docs/AliasPredicateEnum/index.html @@ -0,0 +1,545 @@ + + + + + + + + + + + + + + + + AliasPredicateEnum - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+ + + + +

AliasPredicateEnum

+

None

+

URI: AliasPredicateEnum

+

Permissible Values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueMeaningDescriptionInfo
EXACT_SYNONYMskos:exactMatch
RELATED_SYNONYMskos:relatedMatch
BROAD_SYNONYMskos:broaderMatch
NARROW_SYNONYMskos:narrowerMatch
+

Identifier and Mapping Information

+

Schema Source

+
    +
  • from schema: https://w3id.org/linkml/meta
  • +
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/BasicSubset/index.html b/docs/BasicSubset/index.html new file mode 100644 index 00000000..375fc6d0 --- /dev/null +++ b/docs/BasicSubset/index.html @@ -0,0 +1,2583 @@ + + + + + + + + + + + + + + + + BasicSubset - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+ +
+ + +
+
+ + + + +

BasicSubset

+

An extension of MinimalSubset that avoids advanced constructs and can be implemented by a broad variety of tools

+

Identifier and Mapping Information

+

Schema Source

+
    +
  • from schema: https://w3id.org/linkml/meta
  • +
+

Classes in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassDescription
SchemaDefinitiona collection of subset, type, slot and class definitions
ClassDefinitionan element whose instances are complex objects that may have slot-value assig...
SlotDefinitionan element that describes how instances are related to other instances
TypeDefinitionan element that whose instances are atomic scalar values that can be mapped t...
EnumDefinitionan element whose instances must be drawn from a specified set of permissible ...
SubsetDefinitionan element that can be used to group other metamodel elements
Prefixprefix URI tuple
PermissibleValuea permissible value, accompanied by intended text and an optional mapping to ...
UniqueKeya collection of slots whose values uniquely identify an instance of a class
CommonMetadataGeneric metadata shared across definitions
Elementa named element in the model
Definitionabstract base class for core metaclasses
Exampleusage example and description
AltDescriptionan attributed description
+

SchemaDefinition

+

a collection of subset, type, slot and class definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
id1..1
Uri
The official schema URI
name1..1
Ncname
a unique name for the schema that is both human-readable and consists of only... identifier
classes0..*
ClassDefinition
An index to the collection of all class definitions in the schema
title0..1
String
the official title of the element
slot_definitions0..*
SlotDefinition
An index to the collection of all slot definitions in the schema
enums0..*
EnumDefinition
An index to the collection of all enum definitions in the schema
description0..1 recommended
String
a description of the element's purpose and use
types0..*
TypeDefinition
An index to the collection of all type definitions in the schema
subsets0..*
SubsetDefinition
An index to the collection of all subset definitions in the schema
prefixes0..*
Prefix
prefix / URI definitions to be added to the context beyond those fetched from...
default_prefix0..1
String
default and base prefix -- used for ':' identifiers, @base and @vocab
default_range0..1
TypeDefinition
default slot range to be used if range element is omitted from a slot definit...
imports0..*
Uriorcurie
other schemas that are included in this schema
license0..1
String
license for the schema
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
version0..1
String
particular version of schema
default_curi_maps0..*
String
ordered list of prefixcommon biocontexts to be fetched to resolve id prefixes...
metamodel_version0..1
String
Version of the metamodel used to load the schema
source_file0..1
String
name, uri or description of the source of the schema
source_file_date0..1
Datetime
modification date of the source of the schema
source_file_size0..1
Integer
size in bytes of the source of the schema
generation_date0..1
Datetime
date and time that the schema was loaded/generated
categories0..*
Uriorcurie
controlled terms used to categorize an element
keywords0..*
String
Keywords or tags used to describe the element
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

ClassDefinition

+

an element whose instances are complex objects that may have slot-value assignments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
class_uri0..1
Uriorcurie
URI of the class that provides a semantic interpretation of the element in a ...
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
is_a0..1
ClassDefinition
A primary parent class from which inheritable metaslots are propagated
mixins0..*
ClassDefinition
A collection of secondary parent mixin classes from which inheritable metaslo...
slots0..*
SlotDefinition
collection of slot names that are applicable to a class
slot_usage0..*
SlotDefinition
the refinement of a slot in the context of the containing class definition
attributes0..*
SlotDefinition
Inline definition of slots
tree_root0..1
Boolean
indicator that this is the root class in tree structures
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
unique_keys0..*
UniqueKey
A collection of unique keys for this class
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
created_by0..1
Uriorcurie
agent that created the element
created_on0..1
Datetime
time at which the element was created
last_updated_on0..1
Datetime
time at which the element was last updated
modified_by0..1
Uriorcurie
agent that modified the element
status0..1
Uriorcurie
status of the element
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

SlotDefinition

+

an element that describes how instances are related to other instances

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
slot_uri0..1
Uriorcurie
predicate of this slot for semantic web application
title0..1
String
the official title of the element
identifier0..1
Boolean
True means that the key slot(s) uniquely identify the container
description0..1 recommended
String
a description of the element's purpose and use
multivalued0..1
Boolean
true means that slot can have more than one value
required0..1
Boolean
true means that the slot must be present in the loaded definition
recommended0..1
Boolean
true means that the slot should be present in the loaded definition, but this...
is_a0..1
SlotDefinition
A primary parent slot from which inheritable metaslots are propagated
mixins0..*
SlotDefinition
A collection of secondary parent mixin slots from which inheritable metaslots...
inlined0..1
Boolean
True means that keyed or identified slot appears in an outer structure by val...
inlined_as_list0..1
Boolean
True means that an inlined slot is represented as a list of range instances
pattern0..1
String
the string value of the slot must conform to this regular expression expresse...
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
singular_name0..1
String
a name that is used in the singular form
key0..1
Boolean
True means that the key slot(s) uniquely identify the container
slot_group0..1
SlotDefinition
allows for grouping of related slots into a grouping slot that serves the rol...
is_grouping_slot0..1
Boolean
true if this slot is a grouping slot
range0..1
Element
defines the type of the object of the slot
minimum_value0..1
Integer
for slots with ranges of type number, the value must be equal to or higher th...
maximum_value0..1
Integer
for slots with ranges of type number, the value must be equal to or lowe than...
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
created_by0..1
Uriorcurie
agent that created the element
created_on0..1
Datetime
time at which the element was created
last_updated_on0..1
Datetime
time at which the element was last updated
modified_by0..1
Uriorcurie
agent that modified the element
status0..1
Uriorcurie
status of the element
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

TypeDefinition

+

an element that whose instances are atomic scalar values that can be mapped to primitive types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
type_uri0..1
Uriorcurie
The uri that defines the possible values for the type definition
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
typeof0..1
TypeDefinition
Names a parent type
base0..1
String
python base type that implements this type definition
repr0..1
String
the name of the python object that implements this type definition
pattern0..1
String
the string value of the slot must conform to this regular expression expresse...
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
minimum_value0..1
Integer
for slots with ranges of type number, the value must be equal to or higher th...
maximum_value0..1
Integer
for slots with ranges of type number, the value must be equal to or lowe than...
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

EnumDefinition

+

an element whose instances must be drawn from a specified set of permissible values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
is_a0..1
Definition
A primary parent class or slot from which inheritable metaslots are propagate...
mixins0..*
Definition
A collection of secondary parent classes or slots from which inheritable meta...
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
enum_uri0..1
Uriorcurie
URI of the enum that provides a semantic interpretation of the element in a l...
code_set0..1
Uriorcurie
the identifier of an enumeration code set
code_set_tag0..1
String
the version tag of the enumeration code set
code_set_version0..1
String
the version identifier of the enumeration code set
pv_formula0..1
PvFormulaOptions
Defines the specific formula to be used to generate the permissible values
permissible_values0..*
PermissibleValue
A list of possible values for a slot range
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
created_by0..1
Uriorcurie
agent that created the element
created_on0..1
Datetime
time at which the element was created
last_updated_on0..1
Datetime
time at which the element was last updated
modified_by0..1
Uriorcurie
agent that modified the element
status0..1
Uriorcurie
status of the element
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

SubsetDefinition

+

an element that can be used to group other metamodel elements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

Prefix

+

prefix URI tuple

+ + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
prefix_prefix0..1
Ncname
the nsname (sans ':' for a given prefix)
prefix_reference1..1
Uri
A URI associated with a given prefix
+

PermissibleValue

+

a permissible value, accompanied by intended text and an optional mapping to a concept URI

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
text1..1
String
identifier
meaning0..1
Uriorcurie
the value meaning of a permissible value
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

UniqueKey

+

a collection of slots whose values uniquely identify an instance of a class

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
unique_key_name1..1
String
name of the unique key
unique_key_slots1..*
SlotDefinition
list of slot names that form a key
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

CommonMetadata

+

Generic metadata shared across definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

Element

+

a named element in the model

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

Definition

+

abstract base class for core metaclasses

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
title0..1
String
the official title of the element
description0..1 recommended
String
a description of the element's purpose and use
is_a0..1
Definition
A primary parent class or slot from which inheritable metaslots are propagate...
mixins0..*
Definition
A collection of secondary parent classes or slots from which inheritable meta...
rank0..1
Integer
the relative order in which the element occurs, lower values are given preced...
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
created_by0..1
Uriorcurie
agent that created the element
created_on0..1
Datetime
time at which the element was created
last_updated_on0..1
Datetime
time at which the element was last updated
modified_by0..1
Uriorcurie
agent that modified the element
status0..1
Uriorcurie
status of the element
id_prefixes0..*
Ncname
the identifier of this class or slot must begin with the URIs referenced by t...
conforms_to0..1
String
An established standard to which the element conforms
alt_descriptions0..*
AltDescription
A sourced alternative description for an element
deprecated0..1
String
Description of why and when this element will no longer be used
todos0..*
String
Outstanding issue that needs resolution
notes0..*
String
editorial notes about an element intended for internal consumption
comments0..*
String
notes and comments about an element intended for external consumption
examples0..*
Example
example usages of an element
in_subset0..*
SubsetDefinition
used to indicate membership of a term in a defined subset of terms used for a...
source0..1
Uriorcurie
A related resource from which the element is derived
see_also0..*
Uriorcurie
a reference
aliases0..*
String
Alaternate names for the element
+

Example

+

usage example and description

+ + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
value0..1
String
example value
value_description0..1
String
description of what the value is doing
+

AltDescription

+

an attributed description

+ + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
alt_description_source0..1
String
the source of an attributed description
alt_description_text1..1
String
text of an attributed description
+

Slots in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotDescription
idThe official schema URI
namethe unique name of the element within the context of the schema
prefix_prefixthe nsname (sans ':' for a given prefix)
class_uriURI of the class that provides a semantic interpretation of the element in a ...
slot_uripredicate of this slot for semantic web application
type_uriThe uri that defines the possible values for the type definition
prefix_referenceA URI associated with a given prefix
titlethe official title of the element
classesAn index to the collection of all class definitions in the schema
slot_definitionsAn index to the collection of all slot definitions in the schema
descriptiona description of the element's purpose and use
enumsAn index to the collection of all enum definitions in the schema
identifierTrue means that the key slot(s) uniquely identify the container
typesAn index to the collection of all type definitions in the schema
multivaluedtrue means that slot can have more than one value
typeofNames a parent type
subsetsAn index to the collection of all subset definitions in the schema
requiredtrue means that the slot must be present in the loaded definition
basepython base type that implements this type definition
recommendedtrue means that the slot should be present in the loaded definition, but this...
reprthe name of the python object that implements this type definition
prefixesprefix / URI definitions to be added to the context beyond those fetched from...
is_aA primary parent class or slot from which inheritable metaslots are propagate...
default_prefixdefault and base prefix -- used for ':' identifiers, @base and @vocab
mixinsA collection of secondary parent classes or slots from which inheritable meta...
default_rangedefault slot range to be used if range element is omitted from a slot definit...
slotscollection of slot names that are applicable to a class
text
importsother schemas that are included in this schema
meaningthe value meaning of a permissible value
slot_usagethe refinement of a slot in the context of the containing class definition
inlinedTrue means that keyed or identified slot appears in an outer structure by val...
inlined_as_listTrue means that an inlined slot is represented as a list of range instances
attributesInline definition of slots
licenselicense for the schema
tree_rootindicator that this is the root class in tree structures
patternthe string value of the slot must conform to this regular expression expresse...
rankthe relative order in which the element occurs, lower values are given preced...
conforms_toAn established standard to which the element conforms
categoriescontrolled terms used to categorize an element
keywordsKeywords or tags used to describe the element
id_prefixesthe identifier of this class or slot must begin with the URIs referenced by t...
aliasesAlaternate names for the element
deprecatedDescription of why and when this element will no longer be used
todosOutstanding issue that needs resolution
noteseditorial notes about an element intended for internal consumption
commentsnotes and comments about an element intended for external consumption
in_subsetused to indicate membership of a term in a defined subset of terms used for a...
see_alsoa reference
owned_byagent that owns or is the steward of the element
created_byagent that created the element
created_ontime at which the element was created
last_updated_ontime at which the element was last updated
modified_byagent that modified the element
statusstatus of the element
sourceA related resource from which the element is derived
abstractIndicates the class or slot cannot be directly instantiated and is intended f...
mixinIndicates the class or slot is not intended to inherited from without being a...
code_setthe identifier of an enumeration code set
code_set_versionthe version identifier of the enumeration code set
code_set_tagthe version tag of the enumeration code set
pv_formulaDefines the specific formula to be used to generate the permissible values
permissible_valuesA list of possible values for a slot range
enum_uriURI of the enum that provides a semantic interpretation of the element in a l...
versionparticular version of schema
default_curi_mapsordered list of prefixcommon biocontexts to be fetched to resolve id prefixes...
metamodel_versionVersion of the metamodel used to load the schema
source_filename, uri or description of the source of the schema
source_file_datemodification date of the source of the schema
source_file_sizesize in bytes of the source of the schema
generation_datedate and time that the schema was loaded/generated
unique_keysA collection of unique keys for this class
unique_key_namename of the unique key
unique_key_slotslist of slot names that form a key
rangedefines the type of the object of the slot
singular_namea name that is used in the singular form
keyTrue means that the key slot(s) uniquely identify the container
minimum_valuefor slots with ranges of type number, the value must be equal to or higher th...
maximum_valuefor slots with ranges of type number, the value must be equal to or lowe than...
alt_description_texttext of an attributed description
alt_description_sourcethe source of an attributed description
alt_descriptionsA sourced alternative description for an element
valueexample value
value_descriptiondescription of what the value is doing
examplesexample usages of an element
slot_groupallows for grouping of related slots into a grouping slot that serves the rol...
is_grouping_slottrue if this slot is a grouping slot
+

Enumerations in subset

+ + + + + + + + + + + + + +
EnumerationDescription
PvFormulaOptionsThe formula used to generate the set of permissible values from the code_set ...
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/MinimalSubset/index.html b/docs/MinimalSubset/index.html new file mode 100644 index 00000000..51de486d --- /dev/null +++ b/docs/MinimalSubset/index.html @@ -0,0 +1,736 @@ + + + + + + + + + + + + + + + + MinimalSubset - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+ + + + +

MinimalSubset

+

The absolute minimal set of elements necessary for defining a minimal schema

+

Identifier and Mapping Information

+

Schema Source

+
    +
  • from schema: https://w3id.org/linkml/meta
  • +
+

Classes in subset

+ + + + + + + + + + + + + + + + + + + + + +
ClassDescription
SchemaDefinitiona collection of subset, type, slot and class definitions
ClassDefinitionan element whose instances are complex objects that may have slot-value assig...
SlotDefinitionan element that describes how instances are related to other instances
+

SchemaDefinition

+

a collection of subset, type, slot and class definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
id1..1
Uri
The official schema URI
name1..1
Ncname
a unique name for the schema that is both human-readable and consists of only... identifier
classes0..*
ClassDefinition
An index to the collection of all class definitions in the schema
default_prefix0..1
String
default and base prefix -- used for ':' identifiers, @base and @vocab
default_range0..1
TypeDefinition
default slot range to be used if range element is omitted from a slot definit...
+

ClassDefinition

+

an element whose instances are complex objects that may have slot-value assignments

+ + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
attributes0..*
SlotDefinition
Inline definition of slots
+

SlotDefinition

+

an element that describes how instances are related to other instances

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
identifier0..1
Boolean
True means that the key slot(s) uniquely identify the container
multivalued0..1
Boolean
true means that slot can have more than one value
required0..1
Boolean
true means that the slot must be present in the loaded definition
range0..1
Element
defines the type of the object of the slot
+

Slots in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotDescription
idThe official schema URI
namethe unique name of the element within the context of the schema
classesAn index to the collection of all class definitions in the schema
identifierTrue means that the key slot(s) uniquely identify the container
multivaluedtrue means that slot can have more than one value
requiredtrue means that the slot must be present in the loaded definition
default_prefixdefault and base prefix -- used for ':' identifiers, @base and @vocab
default_rangedefault slot range to be used if range element is omitted from a slot definit...
attributesInline definition of slots
rangedefines the type of the object of the slot
+

Enumerations in subset

+ + + + + + + + + + + + + +
EnumerationDescription
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/ObjectOrientedProfile/index.html b/docs/ObjectOrientedProfile/index.html new file mode 100644 index 00000000..11991f9f --- /dev/null +++ b/docs/ObjectOrientedProfile/index.html @@ -0,0 +1,760 @@ + + + + + + + + + + + + + + + + ObjectOrientedProfile - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+ + + + +

ObjectOrientedProfile

+

A profile that includes all the metamodel elements whose semantics can be expressed using a minimal +implementation of the object oriented metamodel as employed by languages such as Java and Python

+

Identifier and Mapping Information

+

Schema Source

+
    +
  • from schema: https://w3id.org/linkml/meta
  • +
+

Classes in subset

+ + + + + + + + + + + + + + + + + + + + + +
ClassDescription
SchemaDefinitiona collection of subset, type, slot and class definitions
ClassDefinitionan element whose instances are complex objects that may have slot-value assig...
EnumDefinitionan element whose instances must be drawn from a specified set of permissible ...
+

SchemaDefinition

+

a collection of subset, type, slot and class definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
Ncname
a unique name for the schema that is both human-readable and consists of only... identifier
classes0..*
ClassDefinition
An index to the collection of all class definitions in the schema
enums0..*
EnumDefinition
An index to the collection of all enum definitions in the schema
types0..*
TypeDefinition
An index to the collection of all type definitions in the schema
+

ClassDefinition

+

an element whose instances are complex objects that may have slot-value assignments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
is_a0..1
ClassDefinition
A primary parent class from which inheritable metaslots are propagated
mixins0..*
ClassDefinition
A collection of secondary parent mixin classes from which inheritable metaslo...
attributes0..*
SlotDefinition
Inline definition of slots
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
+

EnumDefinition

+

an element whose instances must be drawn from a specified set of permissible values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
is_a0..1
Definition
A primary parent class or slot from which inheritable metaslots are propagate...
mixins0..*
Definition
A collection of secondary parent classes or slots from which inheritable meta...
abstract0..1
Boolean
Indicates the class or slot cannot be directly instantiated and is intended f...
mixin0..1
Boolean
Indicates the class or slot is not intended to inherited from without being a...
+

Slots in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotDescription
namethe unique name of the element within the context of the schema
classesAn index to the collection of all class definitions in the schema
enumsAn index to the collection of all enum definitions in the schema
typesAn index to the collection of all type definitions in the schema
multivaluedtrue means that slot can have more than one value
requiredtrue means that the slot must be present in the loaded definition
is_aA primary parent class or slot from which inheritable metaslots are propagate...
mixinsA collection of secondary parent classes or slots from which inheritable meta...
attributesInline definition of slots
abstractIndicates the class or slot cannot be directly instantiated and is intended f...
mixinIndicates the class or slot is not intended to inherited from without being a...
rangedefines the type of the object of the slot
+

Enumerations in subset

+ + + + + + + + + + + + + +
EnumerationDescription
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/OwlProfile/index.html b/docs/OwlProfile/index.html new file mode 100644 index 00000000..bac7f685 --- /dev/null +++ b/docs/OwlProfile/index.html @@ -0,0 +1,833 @@ + + + + + + + + + + + + + + + + OwlProfile - LinkML Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+ + + + +

OwlProfile

+

A profile that includes all the metamodel elements whose semantics can be expressed in OWL

+

Identifier and Mapping Information

+

Schema Source

+
    +
  • from schema: https://w3id.org/linkml/meta
  • +
+

Classes in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassDescription
SchemaDefinitiona collection of subset, type, slot and class definitions
ClassDefinitionan element whose instances are complex objects that may have slot-value assig...
SlotDefinitionan element that describes how instances are related to other instances
TypeDefinitionan element that whose instances are atomic scalar values that can be mapped t...
EnumDefinitionan element whose instances must be drawn from a specified set of permissible ...
+

SchemaDefinition

+

a collection of subset, type, slot and class definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
id1..1
Uri
The official schema URI
name1..1
Ncname
a unique name for the schema that is both human-readable and consists of only... identifier
classes0..*
ClassDefinition
An index to the collection of all class definitions in the schema
slot_definitions0..*
SlotDefinition
An index to the collection of all slot definitions in the schema
enums0..*
EnumDefinition
An index to the collection of all enum definitions in the schema
types0..*
TypeDefinition
An index to the collection of all type definitions in the schema
imports0..*
Uriorcurie
other schemas that are included in this schema
+

ClassDefinition

+

an element whose instances are complex objects that may have slot-value assignments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
is_a0..1
ClassDefinition
A primary parent class from which inheritable metaslots are propagated
mixins0..*
ClassDefinition
A collection of secondary parent mixin classes from which inheritable metaslo...
attributes0..*
SlotDefinition
Inline definition of slots
union_of0..*
ClassDefinition
indicates that the domain element consists exactly of the members of the elem...
+

SlotDefinition

+

an element that describes how instances are related to other instances

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
is_a0..1
SlotDefinition
A primary parent slot from which inheritable metaslots are propagated
mixins0..*
SlotDefinition
A collection of secondary parent mixin slots from which inheritable metaslots...
union_of0..*
TypeDefinition
indicates that the domain element consists exactly of the members of the elem...
+

TypeDefinition

+

an element that whose instances are atomic scalar values that can be mapped to primitive types

+ + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
union_of0..*
TypeDefinition
indicates that the domain element consists exactly of the members of the elem...
+

EnumDefinition

+

an element whose instances must be drawn from a specified set of permissible values

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameCardinality and RangeDescription
name1..1
String
the unique name of the element within the context of the schema identifier
is_a0..1
Definition
A primary parent class or slot from which inheritable metaslots are propagate...
mixins0..*
Definition
A collection of secondary parent classes or slots from which inheritable meta...
+

Slots in subset

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotDescription
idThe official schema URI
namethe unique name of the element within the context of the schema
classesAn index to the collection of all class definitions in the schema
slot_definitionsAn index to the collection of all slot definitions in the schema
enumsAn index to the collection of all enum definitions in the schema
typesAn index to the collection of all type definitions in the schema
is_aA primary parent class or slot from which inheritable metaslots are propagate...
mixinsA collection of secondary parent classes or slots from which inheritable meta...
importsother schemas that are included in this schema
attributesInline definition of slots
union_ofindicates that the domain element consists exactly of the members of the elem...
+

Enumerations in subset

+ + + + + + + + + + + + + +
EnumerationDescription
+ + +
+ +
+
+ +
+ + + +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/types/index.html b/docs/PresenceEnum/index.html similarity index 95% rename from docs/types/index.html rename to docs/PresenceEnum/index.html index 922274d4..56b817f9 100644 --- a/docs/types/index.html +++ b/docs/PresenceEnum/index.html @@ -13,7 +13,7 @@ - Slot: types - LinkML Model + PresenceEnum - LinkML Model @@ -64,7 +64,7 @@
- + Skip to content @@ -97,7 +97,7 @@
- Slot: types + PresenceEnum
@@ -419,8 +419,8 @@