mapping-master icon indicating copy to clipboard operation
mapping-master copied to clipboard

The IRI directive should ignore empty cells

Open johardi opened this issue 7 years ago • 5 comments

Having this transformation rule, for example

Class: @A*
   Annotations: foaf:depiction @B*(IRI)

will throw an error if there are empty cells in column B

johardi avatar Dec 06 '18 00:12 johardi

is there a possibility to use nesting with mm:SkipIfEmptyLocation in this case? I don't know what the right notation is (and if this is even possible)...

mathib avatar Oct 22 '19 20:10 mathib

I think the issue is that an error is thrown even if this directive is used.

In general, this directive can be used to seamlessly handle empty cells.

martinjoconnor avatar Oct 22 '19 20:10 martinjoconnor

Well, I had a case where I could use the following successfully:

Class: @A*
   Annotations: foaf:depiction @B*(mm:SkipIfEmptyLocation)

but the result is then that the object of foaf:depiction is stored as a string (not an IRI). So we need (mm:SkipIfEmptyLocation) followed by (IRI) as the last one used on its own will throw an error if the cell is empty

But like I said, I don't know if this kind of nesting is possible... I tried several combinations without success, e.g.

Class: @A*
   Annotations: foaf:depiction @B*(IRI)@B*(mm:SkipIfEmptyLocation)

mathib avatar Oct 23 '19 08:10 mathib

You can use multiple processing directives in a reference. e.g.,

Class: @A*
   Annotations: foaf:depiction @B*(IRI mm:SkipIfEmptyLocation)

martinjoconnor avatar Oct 23 '19 16:10 martinjoconnor

Indeed, this is throwing the "no value present" error

mathib avatar Oct 24 '19 15:10 mathib