Page History
Status | ||||
---|---|---|---|---|
|
Migrating older models to use relative IRIs improves model refactoring. First, you need to add the macro. Second, you need to execute that macro. Lastly, you need to use that macro to migrate your older model to use relative IRIs.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 step #4 of how to add the macro.
To add the macro
...
In your Concept Modeling Project, click click Tools > > Macros > > Organize Macros..., or use the shortcut key key Ctrl+Alt+M.
Figure 1: Showing the steps to open the Organize Macros dialog.
The The Organize Macros
dialog dialog opens. Click Add.
Click Add. The The Macro Information dialog dialog opens. Fill out the the Name, Macro Language, and and File containing containing the macro's description.
Figure 3: Showing the Macro Information dialog where you can insert the macro file.
Info The Macro Language is the macro's file extension. The modeling tool supports BeanShell, Groovy, JRuby, JavaScript, JavaScript Rhino, and Jython.title Macro Language To find the appropriate file, click on the three dots at the end
of of File
fieldfield. Your local directory opens. Find the application folder, and
select select data
> > Concept Modeler
> > scripts
> > UpdateIRI.groovy.
Figure 4: Showing the steps to find
the the .groovy
filefile
- Now that you have selected the file, click click Ok. Now you You should now see the macro added in the Organize Macros dialog.
- Click Close.
Figure 2: Showing the Organize Macros that holds the application's macros.
Info | ||
---|---|---|
| ||
The Macro Language is the macro's file extension. The modeling tool supports BeanShell, Groovy, JRuby, JavaScript, JavaScript Rhino, and Jython. |
To execute the macro
...
Click
on on Tools
> > Macros
> > Macro Name e.g. UpdateIRIMacro.
- The The Notification Window will will notify you when the macro was executed.
Figure 5: Showing the steps to execute the newly added macro.
To use the macro for your older modelexisting project
...
Right-click on
your the model
that on which you would like to update IRIs
on as shown in Figure 6.
A dialog will open asking you where to save the results in .csv
file generated from this optionformat.
After selecting the file, the progress bar shows the progress of the migration.
The notification window notifies you when the migration is done, and where the results are stored.
- Find the Update IRI results in your designated location, and view the Excel document containing
- CSV file showing which elements were looked at and updated. The CSV file describes the "Element ID", "Old IRI","New IRI", and "Updated".
Figure 6: Showing the option to make IRI relative to the model package.
This prompts for you to selectNote | ||
---|---|---|
| ||
|
Note | ||
---|---|---|
| ||
|