Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Migrating older models to use relative IRIs improves model refactoring. This can be done using the Macro Engine. The modeling tool comes with the macro file installed in the tool's directory. Instructions on how to find the file are described in this pagein step #4 of how to add the macro

To add the macro

...

  1. In your Concept Modeling Project, click Tools > Macros > Organize Macros... or or use the shortcut key Ctrl+Alt+M.

    Image Modified
    Figure 1: Showing the steps to open the Organize Macros dialog.
  2. The Organize Macros dialog opens. Click Add.

    Image Modified
    Figure 2: Showing the Organize Macros that  holds the application's macros.
  3. The 

    Click Add. The Macro Information dialog opens. Fill out the Name, Macro Language, and File containing the macro's description. 

    Figure 3: Showing the Macro Information dialog where you can insert the macro file.

  4. To find the appropriate file, click on the three dots at the end of File field. Your local directory opens. Find the application folder, and select data > Concept Modeler > scripts > UpdateIRI.groovy.

    Figure 4: Showing the steps to find the .groovy file
  5. Now that you have selected the file, click Ok. Now you You should now see the macro added in the Organize Macros dialog.
  6. Click Close.

...

  1. Click on Tools > Macros > Macro Name e.g. UpdateIRIMacro.

    Image Modified
    Figure 5: Showing the steps to execute the newly added macro.
  2. The Notification Window will notify you when the macro was executed.

To use the macro for your existing project

...

  1. Right-click on your the model that on which you would like to update IRIs on as shown in Figure 6. 

    Image Modified
    Figure 6: Showing the option to make IRI relative to the model package.
  2. A dialog will open asking you where to save the results in .csv format.

  3. After selecting the file, the progress bar shows the progress of the migration.

  4. The notification window notifies you when the migration is done, and where the results are stored. 

  5. Find the Update IRI results in your designated location, and view the CSV file showing which elements were looked at and updated. The CSV file describes the "Element ID", "Old IRI","New IRI", and "Updated".

...