Abbreviated Link Format Migration Tool

In Smartfacts 2022.11, we introduced an abbreviated link format for source code links. We provide a simple Java based migration tool for the migration between the old link format, e.g.

LINK:{"oslc:label": "<label>","ID": "<id>", "appliedStereotypes": "<...>", "sf:linkType": "LT-<...>", "sf:unitId": "UN-<...>", "rdf:resource": "mdel://<...>?projectId=<...>&elementId=<...>&<...>" }

into the new, abbreviated format, e.g.,

oslc://<linkTypeBriefName>/<unitBriefName>/<id>/?label=<label>

The migration is performed on a client PC using the checked-out source code containing links of the old format.

During the migration, all files of the specified directory and transitive sub-directories thereof are scanned for links of the old format. If possible, they are converted into the new format. The output logs every transformed link as well as problems during the conversion.

Prerequisites

  • Java 11 (JRE) or higher

  • The Source Code Link Format Definition file (see Model Warehouse Profile - Source Code Links) exported as .json file

  • The Git repository where the migration is to be applied, checked out into a directory of the client PC in the suitable branch

Usage

Download the .jar file below and enter the following in a Shell (e.g., cmd or PowerShell):

java -jar <download-path>\smartfacts.tools.abbrevlinkmigrator-1.4-jar-with-dependencies.jar -config <path-to-link-format-definition>.json -directory <path-to-source-code>

All available configuration parameters:

Download

With the download, you accept our license conditions.