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

Compare with Current View Page History

« Previous Version 9 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.
  • 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

  • A profile of "MapProject" must be specified.
  • run.config - the standard configuration file specified as a -D parameter
  • import.dir - the input directory specified as a -D parameter
    • This is the directory where imported projects be loaded from.
  • mini - specify this to be "true" (e.g. -Dmini=true) if database is loaded with a mini version of SNOMEDCT 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

  • A profile of "MapProject" must be specified.
  • run.config - the standard configuration file specified as a -D parameter
  • output.dir - the output directory specified as a -D parameter
    • 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 "MapProject" 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 -PMapProject -Dmini=true -Drun.config=~/config/config.properties install

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

% cd admin/export
% mvn -PMapProject -Drun.config=~/config/config.properties install

 

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

% cd admin/remover
% mvn -PMapProject -Drun.config=~/config/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