Module: Openphar::Registry

Defined in:
lib/openphar/registry.rb,
lib/openphar/registry/type_registry.rb,
lib/openphar/registry/publisher_registry.rb

Overview

Registry layer for model type resolution.

Provides a central registry for mapping JSON-LD @type values to Ruby model classes. This decouples type resolution from specific exporters (like Neo4j) and provides a single source of truth for type mappings.

Examples:

Registering a custom model type

Openphar::Registry::TypeRegistry.register(
  'CustomMonograph',
  Openphar::Models::CustomMonograph
)

Looking up a model class by type

klass = Openphar::Registry::TypeRegistry.for('CrudeDrugMonograph')
# => Openphar::Models::CrudeDrugMonograph

Defined Under Namespace

Classes: PublisherRegistry, TypeRegistry