Maintenance Tools
Overview
This page documents the use of various other maintenance tools.
Prerequisites
MySQL database must already exist (e.g. "mappingservicedb") and be loaded with production data.
MySQL database connection parameters must be defined in the properties file specified by "run.config".
IMPORTANT: The Tomcat server must not be running while this is run, otherwise indexes can get corrupted.
Details
A review of the "mojo" project reveals a lot of additional tools that can be used alongside the standard lifecycle management tools. In fact, mojos are often a very convenient way of developing one-time or ad hoc tooling to make batch changes to the underlying data model. These tools can properly bootstrap the environment allowing direct interaction with the internal service APIs supporting a very wide range of maintenance use cases.
Here are a few examples of tools that have been developed to enable certain maintenance tasks
Mojo: ComputeDefaultPreferredNameMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/loader
Configuration Parameters
A profile of "DefaultPreferredNames" must be used
run.config - the standard configuration file specified as a -D parameter
terminology - The terminology to compute preferred names for.
terminologyVersion - the terminology version to compute preferred names for.
The tool is set up to only work properly for SNOMEDCT and would need to be reconfigured/rewritten to support other terminologies.
Mojo: CreateMapAdministratorMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/loader
Configuration Parameters
A profile of "CreateMapAdmin" must be used
run.config - the standard configuration file specified as a -D parameter
map.user - the new admin user username
This mojo creates a new user with the specified username and an ADMINISTRATOR application role
It additionally creates an empty map project if there are no map projects yet (because the application requires at least one project to exist)
Mojo: MapAdviceRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/remover
Configuration Parameters
A profile of "MapAdvice" must be used
run.config - the standard configuration file specified as a -D parameter
map.advice.name - the advice to remove
This mojo entirely removes an advice value from a project, from all records, and from the map advices table itself.
Mojo: TreeposComputerMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/loader
Configuration Parameters
run.config - the standard configuration file specified as a -D parameter
terminology - the terminology to compute tree positions for specified as a -D parameter
Any existing tree positions should be removed before running this.
Mojo: TreeposRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)
Project: admin/remover
Configuration Parameters
run.config - the standard configuration file specified as a -D parameter
terminology - the terminology to remove tree positions for specified as a -D parameter
References/Links
n/a
Copyright © 2025, SNOMED International