You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

This page documents the use of admin tools to import, export, and remove map project data.

 

Prerequisites

  • MySQL database must already exist (e.g. "mappingservicedb").
  • MySQL database connection parameters must be defined in the properties file specified by "run.config".
  • Create/Update DB mojo must also have already run so that the database schema exists.
  • Map projects refer to terminologies that must also be loaded.  To load all sample map project data provided, all four terminologies must be loaded: SNOMEDCT, ICD10, ICPC, and ICD9CM.
  • IMPORTANT: The Tomcat server must not be running while this is run, otherwise indexes can get corrupted.

 

Details

This tool is used to export and import map project data.  The mapping-service-data project on CollabNet contains sample projects used by IHTSDO that can be loaded using this mechanism.  You can also use this to transport map project info between systems, say UAT and PROD.

It uses an XML serialization for most map projecct data and then text files for scope includes and excludes concepts.

 

Following are some details about the implementation of this tool:

Mojo: MapProjectDataImportMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/import

Configuration Parameters

  • run.config - the standard configuration file specified as a -D parameter
  • import.output.dir - specified in the properties file specified by run.config
    • This is the directory where imported projects be loaded from.
  • mini - specify this to be "true" if loading a mini to avoid problems looking up scope concepts

 

Mojo: MapProjectDataExportMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/export

Configuration Parameters

  • run.config - the standard configuration file specified as a -D parameter
  • export.output.dir - specified in the properties file specified by run.config
    • This is the directory where exported projects will go.

 

Mojo: MapProjectDataRemoverMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/remover

Configuration Parameters

  • A profile of "MapProjectData must be specified.
  • run.config - the standard configuration file specified as a -D parameter

 

Samples

Sample command line call of the admin tool to import project data into a system loaded with SNOMEDCT "mini" data.  Leave the "mini" flag off if importing projects into a database loaded with full SNOMEDCT.

% cd admin/import
% mvn -Dmini=true -Drun.config=/home/ihtsdo/data/config.properties install

 

Sample command line call of the admin tool to export existing map project data to files:

 

% cd admin/export
% mvn -Drun.config=/home/ihtsdo/data/config.properties install

 

Sample command line call of the admin tool to remove all map project data:

 

% cd admin/remover
% mvn -PMapProjectData -Drun.config=/home/ihtsdo/data/config.properties install

 

Sample Eclipse run configuration for importing project data when mini SNOMEDCT is loaded:

 

Sample Eclipse run configuration for exporting project data:


Sample Eclipse run configuration for removing project data:

 

  • n/a

 

 

  • No labels