Sparnatural icon indicating copy to clipboard operation
Sparnatural copied to clipboard

EquivalentTo(UnionOf(A, B)) not supported as domain for properties

Open lubianat opened this issue 3 years ago • 3 comments

Hello, here I am again!

So, I have a corner case for sparnatural that does not seem to be covered yet.

On Wikidata, often properties have multiple domains and ranges. So far so good, as one can specify multiple domains.

The issue I have is that I would want for the user to ignore these modelling details and use a super class like:

image

Ideally this would lead to a SPARQL query like

  {?this a :Drug }
  UNION
  {?this a :Chemical_Compound}

Currently, the system uses the equivalent class directly, and as it does not have a sparqlString, it is generated as:

?this a :<_:n3-3>

As it is pointing to a blanknode. This functionality is not supported so far, so this is more of a feature request than anything.

I have no idea how complicated it would be to implement it, though.

Here is one example (in a Wikidata prototype) where such feature would be useful.

Thanks!

lubianat avatar Jun 06 '22 17:06 lubianat

Hello @lubianat

We have this (undocumented) feature but at the moment you need to declare multiple owl:equivalentClass, not using a UNION. This should generate a VALUES clause.

This is here : https://github.com/sparna-git/Sparnatural/blob/master/src/RDFSpecificationProvider.js#L326

I will start a FAQ page.

tfrancart avatar Jun 07 '22 07:06 tfrancart

@lubianat FYI, initiated a FAQ page: https://docs.sparnatural.eu/FAQ

tfrancart avatar Jun 07 '22 07:06 tfrancart

Hello @lubianat

We have this (undocumented) feature but at the moment you need to declare multiple owl:equivalentClass, not using a UNION. This should generate a VALUES clause.

This is here : https://github.com/sparna-git/Sparnatural/blob/master/src/RDFSpecificationProvider.js#L326

I will start a FAQ page.

@tfrancart do you have an example where this is used in practice? I think I understand from the source code, but an example would simplify. Thanks!!

lubianat avatar Sep 02 '22 20:09 lubianat