abcd-j / schema-form

https://abcd-j.github.io/schema-form/
MIT License
0 stars 0 forks source link

Notes from exploring LinkML's Tool Developer Guide #7

Open jsheunis opened 6 months ago

jsheunis commented 6 months ago

The guide at https://linkml.io/linkml/developers/tool-developer-guide.html provides a number of handy suggestions.

1. SchemaView module

https://linkml.io/linkml/developers/schemaview.html

A python utility module in linkml-runtime to explore and edit the classes and slots of a YAML schema.

2. Creating custom types for use by applications

Custom types can be annotated with description, comments and annotations to enrich the information that is subsequently parsed by a custom application. As an example:

A simple example might be a slot that takes a string as range. A generic data entry application has no way of knowing how big a text entry box to provide, and whether this should accept single-line or multi-line output.

For example, one can create a custom type NameString to be used instead as the range for the slot:

slots:
  full_name:
    range: NameString

types:

  NameString:
    typeof: string
    pattern: "^[^\\n]$"
    description: A description that holds a human readable name
    comments:
     - This is designed to support different styles of names from
       multiple languages, but certain characters such as newlines are
       never in names
    annotations:
      dash.singleLine: true

The dash vocabulary can be used for semantic annotations for applications such as form builders.

3. Vue web components for LinkML

Generic faceted data browsers that flexibly operate over multiple schemas

https://docs.google.com/document/d/1jOLRF_doeSomVxZD5H8Ig_WujQ-2sNxhvWBmojZos3o/edit