Skip to main content

Module export

Module export 

Source
Expand description

Provides functionality to export data models to LinkML format.

This module contains implementations for converting internal data model representations to LinkML schema format. It handles the conversion of objects, attributes, and enumerations to their corresponding LinkML representations.

The module provides several key components:

  • Serialization of DataModel instances to LinkML YAML format
  • Conversion implementations between internal model types and LinkML schema types
  • Utilities for handling global slots and attribute sharing between classes
  • Pattern constraint management through slot usage

The conversion process preserves:

  • Documentation and descriptions
  • Data types and ranges
  • Cardinality constraints
  • Identifier flags
  • Required/optional status
  • URI/term mappings
  • Enumeration values and meanings
  • Minimum/maximum value constraints
  • Pattern validation rules

Functionsยง

serialize_linkml
Serializes a DataModel to LinkML YAML format and writes it to a file.