tmimport : XTM Import Utility

Command Synopsis
Usage Examples

The tmimport command can be used to import data from an XTM file into a topic map in the TMCore system. The imported data can either be merged with an existing topic map or loaded into a new topic map.

Command Synopsis

tmimport [/host:<string>] [/database:<string>] [/userid:<string>] [/password:<string>] [/mapname:<string>] [/verbose] {filename}

Table 1. tmimport Parameter Summary

Parameter (Short Form)

Description

/host (/h)

Specifies the name or IP address of the database server that hosts the TMCore system database.

Defaults to 'localhost'.

/database (/d)

Specifies the name of the database catalog that contains the TMCore system tables.

Defaults to 'topicmap'.

/userid (/u)

Specifies the database user ID to use when connecting to the database.

If this parameter is omitted, the connection will instead use the current Windows login for database authentication.

/password (/p)

Specifies the password to use when connection to the database.

This parameter is ignored if the /userid: parameter is not present. If the /userid: parameter is present and this parameter is omitted, the program will attempt to connect to the database using the specified user ID and no password.

/srcuri (/s)

Specifies the URI which will be used for the resolution of relative paths contained in the XTM file.

If this parameter is not specified, then relative paths will be resolved against the path to the imported file.

/mapname (/m)

Specifies the name of the topic map to be populated with the XTM data.

If the TMCore system does not contain a topic map with that name, then a new topic map will be created. If a topic map already exists with the specified name, then the XTM data will be merged with the existing data in the named topic map. If this parameter is omitted, then the value of the /srcuri: parameter will be used as the topic map name.

If both this parameter and the /srcuri: parameter are omitted, then the file:// URI of the imported XTM file will be used as the topic map name.

/verbose (/v)

Give more verbose error messages.

filename

The path to the XTM file to be imported.

Usage Examples

tmimport c:\mymap.xtm

Imports data from mymap.xtm into the TMCore system. All relative URIs will be resolved against the path to the topic map expressed as a file:// URI (i.e. against file://c/mymap.xtm). This URI will also be used as the name of the imported topic map in the TMCore system (if a topic map with this name already exists, then the data from mymap.xtm will be merged into the existing topic map).

tmimport /host:tmserver /database:test c:\mymap.xtm

Operates in the same way as the first example, but connects to a remote database server and a non-default catalog. Note that even when importing data into a remote server, all file paths are still resolved locally and the topic map name will still be generated from the file:// URI of the local file.

tmimport /userid:tmguy /password:ihearttms c:\mymap.xtm

Operates in the same way as the first example, but uses a database account to authorise access to the TMCore system.

tmimport /srcuri:http://www.example.com/tmdata/mymap.xtm mymap.xtm

Imports data from mymap.xtm into the TMCore system. All relative URIs will be resolved against the URI http://www.example.com/tmdata/mymap.xtm. This URI will also be used as the name of the imported topic map in the TMCore system.

tmimport /srcuri:http://www.example.com/tmdata/index.xtm /mapname:index.xtm mymap.xtm

Imports data from mymap.xtm into the TMCore system. All relative URIs will be resolved against the URI http://www.example.com/tmdata/index.xtm. The data will be imported into the topic map named index.xtm (if the topic map does not already exist, it will be created).