Closed ch-sander closed 3 months ago
Yes, on the property that you configure as the default label, do NOT set the core:enableOptional flag to true. Then Sparnatural will not use the OPTIONAL keyword to fetch them. See http://docs.sparnatural.eu/how-to-configure/How-to-configure-Sparnatural.html#_kmiilevbt32l (this is similar if you use a SHACL-based config)
Ah, great and very thoughful configuration!
I did not configure the rdfs:label
property at all for sparnatural. So, if not specified the enableOptional
flag will be set to true by default?
No is is false by default. Can you share your config ?
I think I have set a global variable in a central place in the JavaScript to toggle the optional flag. I will check that. Not remembering where...
I was wrong. If not set explicitely to false, then the enableOptional flag is true. Hence the behavior you see. Note that the defaultLabelProperty can point to another URI representing a property in your config, itself mapped to rdfs:label using core:sparqlString annotation.
If you are proficient with SHACL, I suggest you move from OWL config to SHACL config : http://docs.sparnatural.eu/SHACL-based-configuration.html
The default labels are fetched by, e.g.,
OPTIONAL { ?event_6 rdfs:label ?event_6_label. }
.Is it possible to switch off the OPTIONAL (if the query is built by the widget)? My queries tend to time out because of these optionals and my resources all have a rdsf:label.