Class: Ea::Xmi::LookupService

Inherits:
Object
  • Object
show all
Defined in:
lib/ea/xmi/lookup_service.rb

Overview

Bridge between Liquid Drop classes and the XMI parser. Drops receive an instance of this service to look up XMI elements.

Instance Method Summary collapse

Constructor Details

#initialize(parser) ⇒ LookupService

Returns a new instance of LookupService.



8
9
10
# File 'lib/ea/xmi/lookup_service.rb', line 8

def initialize(parser)
  @parser = parser
end

Instance Method Details

#doc_node_attribute_value(node_id, attr_name) ⇒ Object



12
13
14
# File 'lib/ea/xmi/lookup_service.rb', line 12

def doc_node_attribute_value(node_id, attr_name)
  @parser.doc_node_attribute_value(node_id, attr_name)
end

#fetch_connector(link_id) ⇒ Object



40
41
42
# File 'lib/ea/xmi/lookup_service.rb', line 40

def fetch_connector(link_id)
  @parser.fetch_connector(link_id)
end

#fetch_definition_node_value(link_id, node_name) ⇒ Object



44
45
46
# File 'lib/ea/xmi/lookup_service.rb', line 44

def fetch_definition_node_value(link_id, node_name)
  @parser.fetch_definition_node_value(link_id, node_name)
end

#find_matched_element(xmi_id) ⇒ Object



76
77
78
# File 'lib/ea/xmi/lookup_service.rb', line 76

def find_matched_element(xmi_id)
  xmi_index&.find_element(xmi_id)
end

#find_packaged_element_by_id(id) ⇒ Object



28
29
30
# File 'lib/ea/xmi/lookup_service.rb', line 28

def find_packaged_element_by_id(id)
  @parser.find_packaged_element_by_id(id)
end

#find_subtype_of_from_generalization(id) ⇒ Object



60
61
62
# File 'lib/ea/xmi/lookup_service.rb', line 60

def find_subtype_of_from_generalization(id)
  @parser.find_subtype_of_from_generalization(id)
end

#find_subtype_of_from_owned_attribute_type(id) ⇒ Object



64
65
66
# File 'lib/ea/xmi/lookup_service.rb', line 64

def find_subtype_of_from_owned_attribute_type(id)
  @parser.find_subtype_of_from_owned_attribute_type(id)
end

#find_upper_level_packaged_element(klass_id) ⇒ Object



24
25
26
# File 'lib/ea/xmi/lookup_service.rb', line 24

def find_upper_level_packaged_element(klass_id)
  @parser.find_upper_level_packaged_element(klass_id)
end

#get_ns_by_xmi_id(xmi_id) ⇒ Object



32
33
34
# File 'lib/ea/xmi/lookup_service.rb', line 32

def get_ns_by_xmi_id(xmi_id)
  @parser.get_ns_by_xmi_id(xmi_id)
end

#get_package_name(package) ⇒ Object



68
69
70
# File 'lib/ea/xmi/lookup_service.rb', line 68

def get_package_name(package)
  @parser.get_package_name(package)
end

#id_name_mappingObject



84
85
86
# File 'lib/ea/xmi/lookup_service.rb', line 84

def id_name_mapping
  @parser.id_name_mapping
end

#lookup_assoc_def(association) ⇒ Object



36
37
38
# File 'lib/ea/xmi/lookup_service.rb', line 36

def lookup_assoc_def(association)
  @parser.lookup_assoc_def(association)
end

#lookup_attribute_documentation(xmi_id) ⇒ Object



20
21
22
# File 'lib/ea/xmi/lookup_service.rb', line 20

def lookup_attribute_documentation(xmi_id)
  @parser.lookup_attribute_documentation(xmi_id)
end

#lookup_entity_name(xmi_id) ⇒ Object



16
17
18
# File 'lib/ea/xmi/lookup_service.rb', line 16

def lookup_entity_name(xmi_id)
  @parser.lookup_entity_name(xmi_id)
end

#select_all_packaged_elements(all_elements, model, type) ⇒ Object



56
57
58
# File 'lib/ea/xmi/lookup_service.rb', line 56

def select_all_packaged_elements(all_elements, model, type)
  @parser.select_all_packaged_elements(all_elements, model, type)
end

#select_dependencies_by_client(client_id) ⇒ Object



52
53
54
# File 'lib/ea/xmi/lookup_service.rb', line 52

def select_dependencies_by_client(client_id)
  @parser.select_dependencies_by_client(client_id)
end

#select_dependencies_by_supplier(supplier_id) ⇒ Object



48
49
50
# File 'lib/ea/xmi/lookup_service.rb', line 48

def select_dependencies_by_supplier(supplier_id)
  @parser.select_dependencies_by_supplier(supplier_id)
end

#xmi_indexObject



72
73
74
# File 'lib/ea/xmi/lookup_service.rb', line 72

def xmi_index
  @parser.xmi_index
end

#xmi_root_modelObject



80
81
82
# File 'lib/ea/xmi/lookup_service.rb', line 80

def xmi_root_model
  @parser.xmi_root_model
end