INTER-LAYER – Data and Semantics to Data and Semantics (DS2DS): Using IPSM-AFE for alignment editing and validation

(Getting Ready) Demo description

To actually express your alignment in the IPSM-AF you can use a handy web-based tool called IPSM Alignment Format Editor (AFE). Although, in priciple, any text/code editor can be applied for the task, AFE adds some additional benefits, providing:

  • IPSM-AF syntax highliting,
  • code "snippets" speeding up the process,
  • ability to validate the alignment using an IPSM instance.

Recipe ingredients

  • alignment to create

Prerequisites

  • basic understanding of alignments (see Recipe 4) and the IPSM Alignment Fomat (see Recipe 5)
  • access to a working instance of the IPSM
  • access a working instance of the IPSM-AFE

If your machine has Docker installed running IPSM-AFE is as simple as:

docker run --rm -p 8800:8800 --name afe -d interiot/ipsm-afe:latest

(How to Do it)

The AFE user interface is very simple:

AFE

The AFE menu allows to create an alignment from scratch, load an existing alignment, and save the alignment using a user-specified filename:

AFE

Since we want to create our alignment, we choose New from the menu.

(How it Works)

After selecting New from the AFE menu, the editor window gets populated with a "template", presenting the basic ingredients of the alignment. The sequence of images below illustrates the main parts of the template, and the process of filling them in.

The template contains comments explaining the structure of the alignment. One of usefull features of AFE is the snippet mechanism, allowing to quickly create various elements of the alignment structure. The snippets are activated by typing the snippet name (given in the comment) followed by the Tab keystroke.

First step in filling-in the template is to provide the alignment metadata, such as the title, version, creator, and description.

AFE – alignment metadata

The main part of the alignment provides:

  • alignment source and target ontologies information
  • specification of the alignment steps, and
  • sequence of the alignment mapping definitions.

AFE – main structural elements

Comments embedded within the template suggest which snippets should be used where. For example, let us start by filling the source ontology info:

AFE – source ontology

After pressing the Tab key, inserting the source ontology identifier, and repeating the same procedure for the target ontology we obtain:

AFE – source ontology

as a result. Proceeding with the specification of alignment steps we can use the steps-snippet. This time it take an integer as an "argument". This way we can construct many steps with just one keystroke.

AFE – source ontology

AFE – source ontology

The most important part of the alignment is the sequence of mappings, which define the actual transformations on RDF graphs. Let's start with a simple transformation

AFE – source ontology

having neither filters, typings restriction, and not utilizing any transformation/functions.

AFE – source ontology

Ooopsss!

AFE – source ontology

The alignment did not validate but fortunately the error message says it all. We forgot to change the default cell identifier from "cellId" to "cell1". After correcting our mistake and revalidating the alignment we finally obtain

AFE – source ontology

Let us add one more mapping to the alignment, this time one that utilizes a transformation.

AFE – cell2-1

AFE – cell2-2

AFE – cell2-3

After adding appropriate step to the list of steps the alignment validates successfully

AFE – source ontology

and can be tested and used in the IPSM translation process. This process is the theme of the next Recipe – Translating data with IPSM.

Wrapping things up

Alignments represented in the IPSM Alignment Format (IPSM-AF) can be edited and validated through an IPSM instance with a help of the IPSM-AFE web-based tool.