Overview
This page documents the use of admin tools to import, export, and remove map project data.
Prerequisites
For this mojo to run, a MySQL database must already exist (e.g. "mappingservicedb").
Additionally the DB connection parameters must be defined in the properties file specified by "run.config".
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.
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:
References/Links
- n/a