Module: ArchestryLookup::Lookup
- Defined in:
- lib/context/_refactor_dialog/main.rb,
lib/context/_refactor_dialog/folder_lookup.rb,
lib/context/_refactor_dialog/data/3.GenData2Dest.rb,
lib/context/_refactor_dialog/data/4.Results2GenData.rb,
lib/context/_refactor_dialog/data/2.GetData2Elements.rb,
lib/context/_refactor_dialog/data/1.ModReceive2GetData.rb,
lib/context/_refactor_dialog/functional/1.Expect2Events.rb,
lib/context/_refactor_dialog/functional/7.ElementChains.rb,
lib/context/_refactor_dialog/constructors/Element2ModSend.rb,
lib/context/_refactor_dialog/functional/6.ModElementsSpecs.rb,
lib/context/_refactor_dialog/functional/2.1.Events2AppEvent.rb,
lib/context/_refactor_dialog/functional/3.Appevent2EventBus.rb,
lib/context/_refactor_dialog/functional/5.2.Element2ModSend.rb,
lib/context/_refactor_dialog/constructors/ElementsInElements.rb,
lib/context/_refactor_dialog/functional/4.1.AppEvent2Elements.rb,
lib/context/_refactor_dialog/functional/4.2.Elements2AppEvent.rb,
lib/context/_refactor_dialog/functional/2.2.1.Events2ModReceive.rb,
lib/context/_refactor_dialog/functional/5.1.Element2ModElements.rb,
lib/context/_refactor_dialog/functional/2.2.2.ModReceive2AppEvent.rb,
lib/context/_refactor_dialog/constructors/DockedGroupings2AppFunctions.rb
Class Method Summary collapse
- .dialog_folder_lookup(args, state) ⇒ Object
- .dialog_lookup_main(args, state) ⇒ Object
- .dialog_lookup_main_constructor(args, state) ⇒ Object
- .dialog_lookup_post(args, state) ⇒ Object
- .lookup_constructors_DockedGroupings2AppFunctions(args, state, viewId, viewType) ⇒ Object
- .lookup_constructors_Element2ModSend(args, state, viewId, viewType) ⇒ Object
- .lookup_constructors_ElementsInElements(args, state, viewId, viewType) ⇒ Object
- .lookup_data_GenData2Dest(args, state, viewId, viewType) ⇒ Object
- .lookup_data_GetData2Elements(args, state, viewId, viewType) ⇒ Object
- .lookup_data_ModReceive2GetData(args, state, viewId, viewType) ⇒ Object
- .lookup_data_Results2GenData(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_AppEvent2Elements(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Appevent2EventBus(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Element2ModElements(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Element2ModSend(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_ElementChains(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Elements2AppEvent(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Events2AppEvent(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Events2ModReceive(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_Expect2Events(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_ModElementsSpecs(args, state, viewId, viewType) ⇒ Object
- .lookup_functional_ModReceive2AppEvent(args, state, viewId, viewType) ⇒ Object
Class Method Details
.dialog_folder_lookup(args, state) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/context/_refactor_dialog/folder_lookup.rb', line 16 def dialog_folder_lookup(args, state) folderDialog = sqlQuery(state, "select id from folders where name in ('#{state[:myAppName]}') and id in ('#{conFolder[0]}')")[0] if folderDialog.is_a?(Array) sqlQuery(state, "select view_id as view_id2, view_version, model_version from views_in_model where parent_folder_id in ('#{folderDialog[0]}') and model_version = (select max(model_version) from views_in_model where view_id in (view_id2))") do |row| viewAtr = sqlQuery(state, "select name, version from views where id in ('#{row[0]}') and version = (select max(version) from views where id in ('#{row[0]}'))") if row[1] == viewAtr[0][1] id = row[0].tr("-", "_") args[:views][id] ||= {} args[:views][id][:version] = row[1] args[:views][id][:name] = state[:dialectFolder] ArchestryLookup.logger.info "ArchestryLookup functional view '#{viewAtr[0][0]}' (id #{id}, view ver.#{row[1]}, model ver.#{row[2]}) suits for me!" # of interface '#{Dialog.config.naming.interface}' for bot '#{Dialog.config.naming.instance}' end end end end |
.dialog_lookup_main(args, state) ⇒ Object
16 17 18 |
# File 'lib/context/_refactor_dialog/main.rb', line 16 def dialog_lookup_main(args, state) dialog_lookup_main_constructor(args, state) end |
.dialog_lookup_main_constructor(args, state) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/context/_refactor_dialog/main.rb', line 21 def dialog_lookup_main_constructor(args, state) args[:stages][state[:dialectFolder]] = {codegenGlobal: {}, codegenPerView: {}, x: {}, panView: {lookup: {}}, perView: {}, constructor: {}} ###_constructors views folderId = state[:dbhandler].execute("select id from folders where name in ('_constructors')")[0][0] state[:dbhandler].execute("select folder_id, folder_version, model_version from folders_in_model where parent_folder_id in ('#{folderId}') and model_version = (select max(model_version) from folders_in_model where parent_folder_id in ('#{folderId}')) and folder_version = (select max(folder_version) from folders_in_model where parent_folder_id in ('#{folderId}'))").each do |conFolder| state[:dbhandler].execute("select view_id as view_id2, view_version, model_version from views_in_model where parent_folder_id in ('#{conFolder[0]}') and model_version = (select max(model_version) from views_in_model where view_id in (view_id2))") do |row| viewAtr = state[:dbhandler].execute("select name, version from views where id in ('#{row[0]}') and version = (select max(version) from views where id in ('#{row[0]}'))") id = row[0].tr("-", "_") args[:con_views][id] ||= {} args[:con_views][id][:version] = row[1] args[:con_views][id][:name] = state[:dialectFolder] Dialog.logger.info "ArchestryLookup constructor view '#{viewAtr[0][0]}' (id #{id}, view ver.#{row[1]}, model ver.#{row[2]}) suits for me!" end end end |
.dialog_lookup_post(args, state) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/context/_refactor_dialog/main.rb', line 39 def dialog_lookup_post(args, state) args[:con_views].each do |viewId, _viewProps| viewType = :constructors lookup_constructors_DockedGroupings2AppFunctions(args, state, viewId, viewType) lookup_constructors_Element2ModSend(args, state, viewId, viewType) lookup_constructors_ElementsInElements(args, state, viewId, viewType) end args[:views].each do |viewId, viewProps| viewType = :perView ArchestryLookup.logger.debug "ArchestryLookup_lookup RUN instance '#{state[:dialectFolder]}' view '#{viewProps[:name]}' ver.#{viewProps[:version]}" ###functional lookupStruct = {'functional' => [ 'Expect2Events', 'Events2AppEvent', 'Events2ModReceive', 'ModReceive2AppEvent', 'Appevent2EventBus', 'AppEvent2Elements', 'Elements2AppEvent', 'Element2ModElements', 'Element2ModSend', 'ModElementsSpecs', 'ElementChains']} #1 lookup_run(args, lookupStruct, state, viewId, viewType) ###data lookupStruct = {'data' => [ 'ModReceive2GetData', 'GetData2Elements', 'GenData2Dest', 'Results2GenData']} #1 lookup_run(args, lookupStruct, state, viewId, viewType) ### end end |
.lookup_constructors_DockedGroupings2AppFunctions(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/constructors/DockedGroupings2AppFunctions.rb', line 16 def lookup_constructors_DockedGroupings2AppFunctions(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_constructors_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'CompositionRelationship', fPropKey: :docked, fPropValue: "true", fClass: 'Grouping', fFqn: "#{state[:myAppName]}Element*", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}Element*" } dialectLookup(args, state, viewId, viewType) # dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_constructors_Element2ModSend(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/constructors/Element2ModSend.rb', line 16 def lookup_constructors_Element2ModSend(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_constructors_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModSend*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_constructors_ElementsInElements(args, state, viewId, viewType) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/context/_refactor_dialog/constructors/ElementsInElements.rb', line 17 def lookup_constructors_ElementsInElements(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_constructors_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'SpecializationRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}Element*" } dialectLookup(args, state, viewId, viewType) # dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_data_GenData2Dest(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/context/_refactor_dialog/data/3.GenData2Dest.rb', line 16 def lookup_data_GenData2Dest(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_data_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'ServingRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'ApplicationService', tFqn: "#{state[:myAppName]}ArchiGendata*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_data_GetData2Elements(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/context/_refactor_dialog/data/2.GetData2Elements.rb', line 16 def lookup_data_GetData2Elements(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_data_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'TriggeringRelationship', fClass: 'ApplicationService', fFqn: "#{state[:myAppName]}ArchiGetdata*", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}Element*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_data_ModReceive2GetData(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/context/_refactor_dialog/data/1.ModReceive2GetData.rb', line 16 def lookup_data_ModReceive2GetData(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_data_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationService', fFqn: "#{state[:myAppName]}ArchiGetdata*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModReceiveData*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_data_Results2GenData(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/context/_refactor_dialog/data/4.Results2GenData.rb', line 16 def lookup_data_Results2GenData(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_data_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'RealizationRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'ApplicationService', tFqn: "#{state[:myAppName]}ArchiGendata*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_AppEvent2Elements(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/4.1.AppEvent2Elements.rb', line 16 def lookup_functional_AppEvent2Elements(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'TriggeringRelationship', fClass: 'ApplicationEvent', fFqn: "#{state[:myAppName]}ArchiAppevent*", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}Element*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Appevent2EventBus(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/3.Appevent2EventBus.rb', line 16 def lookup_functional_Appevent2EventBus(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'ServingRelationship', fClass: 'ApplicationService', fFqn: "#{state[:myAppName]}ArchiEventBus", tClass: 'ApplicationEvent', tFqn: "#{state[:myAppName]}ArchiAppevent*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Element2ModElements(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/5.1.Element2ModElements.rb', line 16 def lookup_functional_Element2ModElements(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModElement*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Element2ModSend(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/context/_refactor_dialog/functional/5.2.Element2ModSend.rb', line 16 def lookup_functional_Element2ModSend(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModSend*" } dialectLookup(args, state, viewId, viewType) end |
.lookup_functional_ElementChains(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/7.ElementChains.rb', line 16 def lookup_functional_ElementChains(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'TriggeringRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}ElementSend*", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}ElementSend*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Elements2AppEvent(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/4.2.Elements2AppEvent.rb', line 16 def lookup_functional_Elements2AppEvent(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'ServingRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Element*", tClass: 'ApplicationEvent', tFqn: "#{state[:myAppName]}ArchiAppevent*"} dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Events2AppEvent(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/2.1.Events2AppEvent.rb', line 16 def lookup_functional_Events2AppEvent(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'FlowRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Event*", tClass: 'ApplicationEvent', tFqn: "#{state[:myAppName]}ArchiAppevent*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Events2ModReceive(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/2.2.1.Events2ModReceive.rb', line 16 def lookup_functional_Events2ModReceive(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}Event*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModReceiveData*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_Expect2Events(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/1.Expect2Events.rb', line 16 def lookup_functional_Expect2Events(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AggregationRelationship', fClass: 'ApplicationFunction', fFqn: "#{state[:myAppName]}ArchiEventExpect", tClass: 'ApplicationFunction', tFqn: "#{state[:myAppName]}Event*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_ModElementsSpecs(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/6.ModElementsSpecs.rb', line 16 def lookup_functional_ModElementsSpecs(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'SpecializationRelationship', fClass: 'DataObject', fFqn: "#{state[:myAppName]}ModSend*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModElement*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |
.lookup_functional_ModReceive2AppEvent(args, state, viewId, viewType) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/context/_refactor_dialog/functional/2.2.2.ModReceive2AppEvent.rb', line 16 def lookup_functional_ModReceive2AppEvent(args, state, viewId, viewType) queryName = __method__.to_s; queryName.slice! 'lookup_functional_'; queryName.to_sym args[:dialectLookupQuery] = {queryName: queryName, cClass: 'AccessRelationship', fClass: 'ApplicationEvent', fFqn: "#{state[:myAppName]}ArchiAppevent*", tClass: 'DataObject', tFqn: "#{state[:myAppName]}ModReceiveData*" } dialectLookup(args, state, viewId, viewType) dialectRepack(args, state, viewId, viewType, queryName) end |