inovexcorp / mobi

Mobi is a decentralized, federated, and distributed graph data platform for teams and communities to publish and discover data, data models, and analytics that are instantly consumable.
https://mobi.inovexcorp.com
GNU Affero General Public License v3.0
43 stars 11 forks source link

Autocomplete only searches for one type of class when adding a Property with multiple Classes in rdfs:range #44

Closed forsakendaemon closed 2 years ago

forsakendaemon commented 2 years ago

When working with an ontology with a property that has multiple possible classes in its range, only one of the possible classes is searched and shown in the autocomplete.

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix eg: <http://example.org/> .

eg:Something a rdfs:Class ;
    rdfs:label "Something"@en-US .

eg:SomethingElse a rdfs:Class ;
    rdfs:label "Something Else"@en-US .

eg:SomethingElseElse a rdfs:Class ;
    rdfs:label "Something Else Else"@en-US .

eg:ProblematicProperty a owl:ObjectProperty ;
    rdfs:domain eg:Something ;
    rdfs:range eg:SomethingElse, eg:SomethingElseElse .

Steps to reproduce:

  1. Load the ontology above into Mobi
  2. Create a new dataset using the new ontology
  3. Use the Discover view to create an instance of SomethingElse and SomethingElseElse
  4. Create an instance of Something and add a ProblematicProperty
  5. See only one of the two previously-created instances appear

I think this has something to do with the following section, but I don't know the codebase well enough to know how to fix it I'm afraid!

https://github.com/inovexcorp/mobi/blob/02ea04fd0413e864a00c40ace7f12e4790594d9d/com.mobi.web/src/main/resources/public/discover/explore/components/propertyValueOverlay/propertyValueOverlay.component.html#L40

forsakendaemon commented 2 years ago

This is an issue with my misunderstanding of the semantics of range.