8000 Issue 84 by hsolbrig · Pull Request #89 · biolink/biolinkml · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions biolinkml/generators/jsonldgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def end_schema(self, context: str = None, **_) -> None:
# TODO: For testing purposes we use local contexts. JSON-LD requires absolute URI's for contexts (double check
# that this is true), so we end up recording local path names in the tests. All of these must be converted
# to URL's before this can be submitted and used
# Note: This is NOT true -- relative URI's work find. Fix this next time you have to update local models
abs_contexts = ['file://' + os.path.abspath(os.path.join(self.base_dir, c))
if '://' not in c else c for c in context]

Expand Down
5 changes: 4 additions & 1 deletion biolinkml/generators/markdowngen.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@ def _link(self, obj: Optional[Element], *, after_link: str = None, use_desc: boo
link_ref = underscore(obj.name)
elif isinstance(obj, TypeDefinition):
link_name = camelcase(obj.name)
link_ref = f"type/{link_name}"
link_ref = f"types/{link_name}"
elif isinstance(obj, ClassDefinition):
link_name = camelcase(obj.name)
link_ref = camelcase(link_name)
else:
link_name = obj.name
link_ref = link_name
Expand Down
2 changes: 1 addition & 1 deletion biolinkml/utils/schemasynopsis.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def errors(self) -> List[str]:
# rval += [f"\tSlot {slotname} has multiple owners: ({owners_str})"]
real_owner = self.schema.slots[slotname].owner
if real_owner is None or (real_owner != slotname and real_owner != owners[0]):
rval += [f'\tSlot "{slotname}"" owner ({self.schema.slots[slotname].owner}) does not match {owners[0]}']
rval += [f'\tSlot "{slotname}" owner ({self.schema.slots[slotname].owner}) does not match {owners[0]}']
for slotname, slot in sorted(self.schema.slots.items(), key=lambda e: e[0]):
if slotname not in self.owners:
# Lack of ownership is no longer a sin
Expand Down
11 changes: 5 additions & 6 deletions docs/AltDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ URI: [meta:AltDescription](https://w3id.org/biolink/biolinkml/meta/AltDescriptio

![img](http://yuml.me/diagram/nofunky;dir:TB/class/\[Element]++-%20alt_descriptions%200..*>\[AltDescription|source(pk):ncname;description:string])


## Referenced by class

* **[element](element.md)** *[alt_descriptions](alt_descriptions.md)* <sub>0..*</sub> **[alt_description](alt_description.md)**
* **[Element](Element.md)** *[alt_descriptions](alt_descriptions.md)* <sub>0..*</sub> **[AltDescription](AltDescription.md)**

## Attributes

Expand All @@ -21,16 +20,16 @@ URI: [meta:AltDescription](https://w3id.org/biolink/biolinkml/meta/AltDescriptio

* [alt_description➞source](alt_description_source.md) <sub>REQ</sub>
* Description: the source of an attributed description
* range: [Ncname](type/Ncname.md)
* range: [Ncname](types/Ncname.md)
* [alt_description➞description](alt_description_text.md) <sub>REQ</sub>
* Description: text of an attributed description
* range: [String](type/String.md)
* range: [String](types/String.md)

### Domain for slot:

* [alt_description➞source](alt_description_source.md) <sub>REQ</sub>
* Description: the source of an attributed description
* range: [Ncname](type/Ncname.md)
* range: [Ncname](types/Ncname.md)
* [alt_description➞description](alt_description_text.md) <sub>REQ</sub>
* Description: text of an attributed description
* range: [String](type/String.md)
* range: [String](types/String.md)
150 changes: 75 additions & 75 deletions docs/ClassDefinition.md

Large diffs are not rendered by default.

114 changes: 57 additions & 57 deletions docs/Definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ URI: [meta:Definition](https://w3id.org/biolink/biolinkml/meta/Definition)

## Parents

* is_a: [element](element.md) - a named element in the model
* is_a: [Element](Element.md) - a named element in the model

## Children

* [class_definition](class_definition.md) - the definition of a class or interface
* [slot_definition](slot_definition.md) - the definition of a property or a slot
* [ClassDefinition](ClassDefinition.md) - the definition of a class or interface
* [SlotDefinition](SlotDefinition.md) - the definition of a property or a slot

## Referenced by class

* **[definition](definition.md)** *[apply_to](apply_to.md)* <sub>0..*</sub> **[definition](definition.md)**
* **[definition](definition.md)** *[is_a](is_a.md)* <sub>OPT</sub> **[definition](definition.md)**
* **[definition](definition.md)** *[mixins](mixins.md)* <sub>0..*</sub> **[definition](definition.md)**
* **[slot_definition](slot_definition.md)** *[owner](owner.md)* <sub>OPT</sub> **[definition](definition.md)**
* **[Definition](Definition.md)** *[apply_to](apply_to.md)* <sub>0..*</sub> **[Definition](Definition.md)**
* **[Definition](Definition.md)** *[is_a](is_a.md)* <sub>OPT</sub> **[Definition](Definition.md)**
* **[Definition](Definition.md)** *[mixins](mixins.md)* <sub>0..*</sub> **[Definition](Definition.md)**
* **[SlotDefinition](SlotDefinition.md)** *[owner](owner.md)* <sub>OPT</sub> **[Definition](Definition.md)**

## Attributes

Expand All @@ -32,134 +32,134 @@ URI: [meta:Definition](https://w3id.org/biolink/biolinkml/meta/Definition)

* [abstract](abstract.md) <sub>OPT</sub>
* Description: an abstract class is a high level class or slot that is typically used to group common slots together and cannot be directly instantiated.
* range: [Boolean](type/Boolean.md)
* range: [Boolean](types/Boolean.md)
* [apply_to](apply_to.md) <sub>0..*</sub>
* Description: Used to extend class or slot definitions. For example, if we have a core schema where a gene has two slots for identifier and symbol, and we have a specialized schema for my_organism where we wish to add a slot systematic_name, we can avoid subclassing by defining a class gene_my_organism, adding the slot to this class, and then adding an apply_to pointing to the gene class. The new slot will be 'injected into' the gene class.
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [is_a](is_a.md) <sub>OPT</sub>
* Description: specifies single-inheritance between classes or slots. While multiple inheritance is not allowed, mixins can be provided effectively providing the same thing. The semantics are the same when translated to formalisms that allow MI (e.g. RDFS/OWL). When translating to a SI framework (e.g. java classes, python classes) then is a is used. When translating a framework without polymorphism (e.g. json-schema, solr document schema) then is a and mixins are recursively unfolded
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [mixin](mixin.md) <sub>OPT</sub>
* Description: this slot or class can only be used as a mixin -- equivalent to abstract
* range: [Boolean](type/Boolean.md)
* range: [Boolean](types/Boolean.md)
* [mixins](mixins.md) <sub>0..*</sub>
* Description: List of definitions to be mixed in. Targets may be any definition of the same type
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [values_from](values_from.md) <sub>0..*</sub>
* Description: the identifier of a "value set" -- a set of identifiers that form the possible values for the range of a slot
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)

### Inherited from element:

* [id_prefixes](id_prefixes.md) <sub>0..*</sub>
* Description: the identifier of this class or slot must begin with one of the URIs referenced by this prefix
* range: [Ncname](type/Ncname.md)
* inherited from: [element](element.md)
* range: [Ncname](types/Ncname.md)
* inherited from: [Element](Element.md)
* [name](name.md) <sub>REQ</sub>
* Description: the unique name of the element within the context of the schema. Name is combined with the default prefix to form the globally unique subject of the target class.
* range: [String](type/String.md)
< 10BC8 span class='blob-code-inner blob-code-marker js-skip-tagsearch' data-code-marker="-"> * inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [definition_uri](definition_uri.md) <sub>OPT</sub>
* Description: the "native" URI of the element
* range: [Uriorcurie](type/Uriorcurie.md)
* inherited from: [element](element.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: [Element](Element.md)
* [aliases](aliases.md) <sub>0..*</sub>
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* [local_names](local_names.md) <sub>0..*</sub>
* range: [local_name](local_name.md)
* inherited from: [element](element.md)
* range: [LocalName](LocalName.md)
* inherited from: [Element](Element.md)
* [mappings](mappings.md) <sub>0..*</sub>
* Description: A list of terms from different schemas or terminology systems that have comparable meaning. These may include terms that are precisely equivalent, broader or narrower in meaning, or otherwise semantically related but not equivalent from a strict ontological perspective.
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None
* [description](description.md) <sub>OPT</sub>
* Description: a description of the element's purpose and use
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [alt_descriptions](alt_descriptions.md) <sub>0..*</sub>
* range: [alt_description](alt_description.md)
* inherited from: [element](element.md)
* range: [AltDescription](AltDescription.md)
* inherited from: [Element](Element.md)
* [deprecated](deprecated.md) <sub>OPT</sub>
* Description: Description of why and when this element will no longer be used
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* [todos](todos.md) <sub>0..*</sub>
* Description: Outstanding issue that needs resolution
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* [notes](notes.md) <sub>0..*</sub>
* Description: editorial notes about an element intended for internal consumption
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [comments](comments.md) <sub>0..*</sub>
* Description: notes and comments about an element intended for external consumption
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [examples](examples.md) <sub>0..*</sub>
* Description: example usages of an element
* range: [example](example.md)
* inherited from: [element](element.md)
* range: [Example](Example.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [in_subset](in_subset.md) <sub>0..*</sub>
* Description: used to indicate membership of a term in a defined subset of biolink terms used for a particular domain or application (e.g. the translator_minimal subset holding the minimal set of predicates used in a translator knowledge graph)
* range: [subset_definition](subset_definition.md)
* inherited from: [element](element.md)
* range: [SubsetDefinition](SubsetDefinition.md)
* inherited from: [Element](Element.md)
* [from_schema](from_schema.md) <sub>OPT</sub>
* Description: id of the schema that defined the element
* range: [Uri](type/Uri.md)
* inherited from: [element](element.md)
* range: [Uri](types/Uri.md)
* inherited from: [Element](Element.md)
* [imported_from](imported_from.md) <sub>OPT</sub>
* Description: the imports entry that this element was derived from. Empty means primary source
* range: [String](type/String.md)
* inherited from: [element](element.md)
* range: [String](types/String.md)
* inherited from: [Element](Element.md)
* [see_also](see_also.md) <sub>0..*</sub>
* Description: a reference
* range: [Uriorcurie](type/Uriorcurie.md)
* inherited from: [element](element.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: [Element](Element.md)
* in subsets: (owl)
* [exact mappings](exact_mappings.md) <sub>0..*</sub>
* Description: A list of terms from different schemas or terminology systems that have identical meaning.
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None
* [close mappings](close_mappings.md) <sub>0..*</sub>
* Description: A list of terms from different schemas or terminology systems that have close meaning.
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None
* [related mappings](related_mappings.md) <sub>0..*</sub>
* Description: A list of terms from different schemas or terminology systems that have related meaning.
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None
* [deprecated element has exact replacement](deprecated_element_has_exact_replacement.md) <sub>OPT</sub>
* Description: When an element is deprecated, it can be automatically replaced by this uri or curie
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None
* [deprecated element has possible replacement](deprecated_element_has_possible_replacement.md) <sub>OPT</sub>
* Description: When an element is deprecated, it can be potentially replaced by this uri or curie
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
* inherited from: None

### Domain for slot:

* [abstract](abstract.md) <sub>OPT</sub>
* Description: an abstract class is a high level class or slot that is typically used to group common slots together and cannot be directly instantiated.
* range: [Boolean](type/Boolean.md)
* range: [Boolean](types/Boolean.md)
* [apply_to](apply_to.md) <sub>0..*</sub>
* Description: Used to extend class or slot definitions. For example, if we have a core schema where a gene has two slots for identifier and symbol, and we have a specialized schema for my_organism where we wish to add a slot systematic_name, we can avoid subclassing by defining a class gene_my_organism, adding the slot to this class, and then adding an apply_to pointing to the gene class. The new slot will be 'injected into' the gene class.
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [is_a](is_a.md) <sub>OPT</sub>
* Description: specifies single-inheritance between classes or slots. While multiple inheritance is not allowed, mixins can be provided effectively providing the same thing. The semantics are the same when translated to formalisms that allow MI (e.g. RDFS/OWL). When translating to a SI framework (e.g. java classes, python classes) then is a is used. When translating a framework without polymorphism (e.g. json-schema, solr document schema) then is a and mixins are recursively unfolded
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [mixin](mixin.md) <sub>OPT</sub>
* Description: this slot or class can only be used as a mixin -- equivalent to abstract
* range: [Boolean](type/Boolean.md)
* range: [Boolean](types/Boolean.md)
* [mixins](mixins.md) <sub>0..*</sub>
* Description: List of definitions to be mixed in. Targets may be any definition of the same type
* range: [definition](definition.md)
* range: [Definition](Definition.md)
* [values_from](values_from.md) <sub>0..*</sub>
* Description: the identifier of a "value set" -- a set of identifiers that form the possible values for the range of a slot
* range: [Uriorcurie](type/Uriorcurie.md)
* range: [Uriorcurie](types/Uriorcurie.md)
Loading
0