Module: Chemicalml::Cml::Schema24::Configuration

Extended by:
Chemicalml::ContextConfiguration
Defined in:
lib/chemicalml/cml/schema24/configuration.rb

Constant Summary collapse

CONTEXT_ID =
:chemicalml_schema24

Class Method Summary collapse

Methods included from Chemicalml::ContextConfiguration

context, context_id, create_context, default_context_id, ensure_registered!, populate_context!, register_elements!, register_model, register_models!

Class Method Details

.register_models!Object

Schema 2.4 lacks (Schema 3 only) — skip its registration. Schema 2.4 also declares three legacy elements (, , ) not in Schema 3; register those explicitly from SCHEMA24_ONLY.

Also skip registering , , as types — their ids collide with lutaml-model primitives (:float, :integer, :string), and registering them would shadow the primitive, breaking every attribute typed as :string in any Schema24 wire class. They remain defined as wire classes and parseable as document roots.



22
23
24
25
26
27
28
# File 'lib/chemicalml/cml/schema24/configuration.rb', line 22

def self.register_models!
  register_elements!(except: Chemicalml::Cml::Elements::SCHEMA3_ONLY)
  register_elements!(
    only: true,
    except: Chemicalml::Cml::Elements::SCHEMA24_TYPE_COLLISIONS
  )
end