Class: Lutaml::Xmi::XmiLookupService
- Inherits:
-
Object
- Object
- Lutaml::Xmi::XmiLookupService
- Includes:
- Parsers::XmiBase
- Defined in:
- lib/lutaml/xmi/xmi_lookup_service.rb
Overview
Single bridge between Liquid Drop classes and the XMI document tree. Drops receive an instance of this service instead of including XmiBase directly.
Instance Method Summary collapse
-
#find_matched_element(xmi_id) ⇒ Object
Convenience: find extension element by XMI id (used by Drops for dependency/inheritance lookups).
-
#initialize(xmi_root_model, id_name_mapping) ⇒ XmiLookupService
constructor
A new instance of XmiLookupService.
Methods included from Parsers::XmiBase
#cardinality_min_max_value, #connector_labels, #connector_lookup, #connector_name_by_source_or_target, #connector_node_by_id, #connector_source_name, #fetch_assoc_connector, #fetch_connector, #fetch_connector_name, #fetch_definition_node_value, #fetch_element, #fetch_owned_attribute_node, #generalization_association, #get_ns_by_xmi_id, included, #loopup_assoc_def, #member_end_name, #serialize_member_end, #serialize_member_type, #serialize_owned_type, #set_xmi_model, #xmi_index
Constructor Details
#initialize(xmi_root_model, id_name_mapping) ⇒ XmiLookupService
Returns a new instance of XmiLookupService.
12 13 14 15 |
# File 'lib/lutaml/xmi/xmi_lookup_service.rb', line 12 def initialize(xmi_root_model, id_name_mapping) @xmi_root_model = xmi_root_model @id_name_mapping = id_name_mapping end |
Instance Method Details
#find_matched_element(xmi_id) ⇒ Object
Convenience: find extension element by XMI id (used by Drops for dependency/inheritance lookups)
37 38 39 |
# File 'lib/lutaml/xmi/xmi_lookup_service.rb', line 37 def find_matched_element(xmi_id) xmi_index&.find_element(xmi_id) end |