Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotInstantiatedClass with defaultLabelProperty rdfs:label is not added to the sparql generation when clicking on the class visibility icon #550

Open
PyHahiro opened this issue Jan 18, 2024 · 3 comments
Labels
kind: Bug 🐞 Bug kind: Enhancement 📈 New feature or request what: SPARQL generation SPARQL query generation / compatibility what: UI/UX Affecting the UI or UX

Comments

@PyHahiro
Copy link

I have the following need :

If an ontology is starting to be very large, there may be many SparnaturalClass appearing in the initial list
A solution to only display classes we want is to use :
http://data.sparna.fr/ontologies/sparnatural-config-core#NotInstantiatedClass
But the issue of this solution comes from this description:
a Not-Instantiated-Class must not yield an rdf:type criteria in the SPARQL query

What also happens is that when we click on the visibility icon (eye icon) of a NoInstantiatedClass, it adds ?class1 ?class1_label to the select statement of the query, but does not add the :
?class1 rdfs:label ?class1_label triple . to the query.
It is important to note that said ?class1 is declared to have
http://data.sparna.fr/ontologies/sparnatural-config-core#NotInstantiatedClass rdfs:label ;

@tfrancart
Copy link
Contributor

Thanks. I think what you need is #332. This is not implemented yet.
The "NotInstantiatedClass" is something slightly different, and should not be used for this.

Regarding your comment:

What also happens is that when we click on the visibility icon (eye icon) of a NoInstantiatedClass, it adds ?class1 ?class1_label > to the select statement of the query, but does not add the : ?class1 rdfs:label ?class1_label triple . to the query."

-> Which version of Sparnatural are you using ?
-> could you share an example config file to reproduce this ?

@tfrancart tfrancart added kind: Enhancement 📈 New feature or request kind: Bug 🐞 Bug what: SPARQL generation SPARQL query generation / compatibility what: UI/UX Affecting the UI or UX labels Jan 18, 2024
@PyHahiro
Copy link
Author

I am using sparnatural 8.4.0
I have the following model :

Boulangerie

Four

fo:Four rdfs:subClassOf sparna:NotInstantiatedClass ;
sparna:defaultLabelProperty rdfs:label ;
sparna:faIcon "fa-solid fa-fire-burner" ;
sparna:sparqlString "<http://anabasis-assets.com/ontologies/boulangerie/Four#Four>" ;
rdfs:label "Un four"@en ,
"Un four"@fr .

Boulangerie

bo:Boulangerie rdfs:subClassOf sparna:SparnaturalClass ;
        sparna:defaultLabelProperty rdfs:label ;
        sparna:tooltip "Une boulangerie"@fr ;
        sparna:faIcon "fa fa-store" ;
        rdfs:label "Une boulangerie"@en ,
                "Une boulangerie"@fr .

CuitAvec

# cuitAvec: Four
bo:cuitAvec rdfs:subPropertyOf sparna:AutocompleteProperty ;
rdfs:domain bo:Boulangerie ;
rdfs:range fo:Four ;
sparna:enableOptional "false"^^xsd:boolean ;
sparna:enableNegation "false"^^xsd:boolean ;
ds:datasource ds:search_rdfslabel_contains ;
rdfs:label "cuit avec"@fr ,
"cooks with"@en .

Actual :

  • I select the modelisation I want
    image
  • I then click on the visibility icon of the class Four
    image
  • Since I have declared Four to have sparna:defaultLabelProperty rdfs:label It adds both ?four2 and ?four2_label in the select statement but it does not add anything to retrieve label in the query
  • This is working as intended if I declare Four to be a sparna:SparnaturalClass

Expected :

I will rename the issue accordingly

@PyHahiro PyHahiro changed the title Being able to have some SparnaturalClass not appear in the initial list NotInstantiatedClass with defaultLabelProperty rdfs:label is not added to the sparql generation when clicking on the class visibility icon Jan 18, 2024
@tfrancart
Copy link
Contributor

@PyHahiro Could you provide your complete config file ? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: Bug 🐞 Bug kind: Enhancement 📈 New feature or request what: SPARQL generation SPARQL query generation / compatibility what: UI/UX Affecting the UI or UX
Projects
None yet
Development

No branches or pull requests

2 participants