Skip to content

Commit

Permalink
Correct AOM profiles handling.
Browse files Browse the repository at this point in the history
Add plain build option.
  • Loading branch information
wolandscat committed Jul 15, 2024
1 parent f184bb2 commit 5729b64
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions apps/adl_workbench/src/gui/main/gui_app_root.e
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ feature {NONE} -- Initialization
splash.show
process_events
app_root.initialise_shell
app_root.initialise_cfg
if app_root.ready_to_initialise_app then
app_root.initialise_app
process_graphical_events
Expand Down
8 changes: 6 additions & 2 deletions apps/adlc/src/main/application.e
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ note
--cfg : output default configuration file location (Optional)
<file path>: .cfg file path
--build : build system and generate report to std_out
--build : build system, OPTs, and reports and generate log to std_out
-x --export : export matching archetypes in specified format
-r --report : generate reports in specified format
-o --output : output directory to write files to; '.' for current directory
Expand Down Expand Up @@ -132,7 +132,7 @@ feature -- Initialization
end

app_root.initialise_cfg

if app_root.ready_to_initialise_app then
app_root.initialise_app

Expand Down Expand Up @@ -406,6 +406,10 @@ feature {NONE} -- Commands
-- AOM profiles file
buffer.append (get_msg ({ADL_MESSAGES_IDS}.ec_aom_profiles_location, <<aom_profile_directory>>))

-- terminology file
buffer.append (get_msg ({ADL_MESSAGES_IDS}.ec_terminology_location, <<terminology_directory>>))


-- RM schemas info
buffer.append ("%N" + get_text ({ADL_MESSAGES_IDS}.ec_rm_schemas_info_text))
across bmm_models_access.bmm_models as loaded_rms_csr loop
Expand Down
3 changes: 2 additions & 1 deletion apps/resources/messages/compiled/adl_messages_db.e
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ feature -- Initialisation

make
do
create message_table.make (971)
create message_table.make (972)
message_table.put ("Terminology initialisation failed; reason: $1", ec_terminology_init_failed)
message_table.put ("Using ADL version $1 for output serialisation", ec_adl_version_warning)
message_table.put ("Validation level STRICT", ec_validation_strict)
Expand Down Expand Up @@ -323,6 +323,7 @@ feature -- Initialisation
message_table.put ("User .cfg file location: $1%N", ec_config_file_location)
message_table.put ("XML rules file location: $1%N", ec_xml_rules_file_location)
message_table.put ("AOM profiles location: $1%N", ec_aom_profiles_location)
message_table.put ("openEHR terminology file location: $1%N", ec_terminology_location)
message_table.put ("Configured repositories: %N", ec_repos_info_text)
message_table.put ("Current library: $1%N", ec_current_lib_info_text)
message_table.put ("Loaded RM schemas (BMM files): %N", ec_rm_schemas_info_text)
Expand Down
1 change: 1 addition & 0 deletions apps/resources/messages/compiled/adl_messages_ids.e
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ feature -- Definitions
ec_config_file_location: STRING = "config_file_location"
ec_xml_rules_file_location: STRING = "xml_rules_file_location"
ec_aom_profiles_location: STRING = "aom_profiles_location"
ec_terminology_location: STRING = "terminology_location"
ec_repos_info_text: STRING = "repos_info_text"
ec_current_lib_info_text: STRING = "current_lib_info_text"
ec_rm_schemas_info_text: STRING = "rm_schemas_info_text"
Expand Down
1 change: 1 addition & 0 deletions apps/resources/messages/source/app_adlc_ui_messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ templates = <
["config_file_location"] = <"User .cfg file location: $1%N">
["xml_rules_file_location"] = <"XML rules file location: $1%N">
["aom_profiles_location"] = <"AOM profiles location: $1%N">
["terminology_location"] = <"openEHR terminology file location: $1%N">
["repos_info_text"] = <"Configured repositories: %N">
["current_lib_info_text"] = <"Current library: $1%N">
["rm_schemas_info_text"] = <"Loaded RM schemas (BMM files): %N">
Expand Down
6 changes: 4 additions & 2 deletions components/aom_profile/src/aom_profiles_access.e
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ feature -- Initialisation
make
profile_directory := an_absolute_dir
load_profiles
validate
if not profile_descriptor_candidates.is_empty then
validate
end
end

feature -- Access
Expand Down Expand Up @@ -167,7 +169,7 @@ feature -- Commands
aom_pd.load
profile_descriptor_candidates.extend (aom_pd)
end
if profiles.is_empty then
if profile_descriptor_candidates.is_empty then
add_error ({ADL_MESSAGES_IDS}.ec_aom_profile_dir_contains_no_valid_profiles, <<profile_directory>>)
end
end
Expand Down
9 changes: 5 additions & 4 deletions components/app_shell/app_root.e
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,13 @@ feature -- Initialisation
if file_system.directory_exists (aom_profile_directory) then
aom_profiles_access.initialise (aom_profile_directory)

-- make sure it is in the cfg file
if aom_profile_user_directory.is_empty then
set_aom_profile_user_directory (aom_profile_directory)
end
if not aom_profiles_access.found_valid_profiles then
merge_errors (aom_profiles_access.errors)
else
-- make sure it is in the cfg file
if aom_profile_user_directory.is_empty then
set_aom_profile_user_directory (aom_profile_directory)
end
end
else
add_error ({ADL_MESSAGES_IDS}.ec_aom_profile_dir_not_valid, <<aom_profile_directory>>)
Expand Down

0 comments on commit 5729b64

Please sign in to comment.