The Convert to Generic Publication Algorithm is a plugin which takes as input a path to a .hmap properties file, then uses the header mapping in the file to standardize the headings in a table. The .hmap file contains key-value pairs, with the original headers as keys, and the headers they should be replaced with as values. The Algorithm then uses this mapping to iterate through the headers in a Sci2 table, replacing headers with their Sci2 Generic Publication equivalents.


This Algorithm can be used when a data type uses proprietary headers that are not supported by Sci2. A .hmap file can be easily created by the user, which will then be used replace any troublesome headers with those that Sci^2 and other algorithms can interpret successfully.

Implementation Details

At the core of this algorithm's functionality is the .hmap file, which is a key-value mapping of headers and what they should be replaced with. The .hmap file is nothing more than a Java properties file, with key-value pairs on each line, and pairs separated by an equal sign. This properties file is read in to provide a mapping of old headers and what they should be replaced with. The algorithm then iterates through a table that has already been imported into Sci2 to replace the designated headers.