Merge Tool

Description

The merge tool is a command-line utility for merging two or more topicmaps and outputting the result. The source of the topic maps must be XML files using XTM 1.0 syntax. The output is also in XTM 1.0 syntax and may be written either to a file or the standarad output stream.

Both the subject-base merging constraint and the name-based merging constraint are honoured. Two topics will be determined as mergeable if one of the following apply:

For the purposes of matching, all http protocol URLs are normalised, forcing domain names to lower case, stripping the port number if it is the default port (80) and correclty encoding all path elements and fragment identifiers. All strings are compared using Java's internal string comparison function.

Usage

java org.tm4j.topicmap.cmd.Merge {options} input_file [-b {input_file_base_uri}] [input_file [-b {input_file_base_uri]...]

or, if using the scripts provided in the bin directory:

merge {options} input_file [-b {input_file_base_uri}] [input_file [-b {input_file_base_uri]...]

Options

-v | -verbose
Produce logging information on stdout. This option is currently not supported.
-o | -output {output-file-name}
Specifies the output file to be written. If no file is specified, output is sent to the standard output stream (stdout).
-d | --include-doctype
If specified, then the output file will be written with a DOCTYPE declaration
-S | --system-id {system-identifier}
Specifies the SYSTEM identifier to be written in the output file's DOCTYPE declaration. This option is ignored if the -d option is not also specified on the command line.
-P | --public-id {public-identifier}
Specifies the PUBLIC identifier to be written in the output file's DOCTYPE declaration. This option is ignored if the -d option is not also specified on the command line.
-e | --encoding {encoding-name}
Specifies the character encoding to be used for writing the output file. The character encoding name is parsed according to standard Java rules.
-I | --indentation {indent}
Specifies the indentation to be used for pretty-printing the output file. If this option is not specified, the file will not be pretty-printed.
-F | --factory {topicmap-provider-factory-name}
Specifies the full Java class name of the provider factory to be used to retrieve the topics to be processed. Any properties specified using the -D option to the java interpreter will be passed to the topic map provider factory for initialisation purposes.
-B | --output-base-uri {output-topicmap-baseuri}
Specifies the base URI of the output topic map generated by the merge process.
-n | --nomerge
Ignore mergeMap elements in the input files. If this option is not specified, the processor will attempt to retrieve and merge in topic maps references by a mergeMap element or any topic map which contains a topic referenced by a read topic map.
-c | --consistent
Make the output topic map a consistent topic map according to the rules of XTM 1.0 prior to writing it out.
-? | --help
List help on the command.
-b
The base URI to be assigned to the topic map read from the preceeding input file. This is used as a base location for the resolution of URI references contained in the input topic map file.

Last modified $Date: 2003/03/20 21:25:40 $