Closed jvendetti closed 2 years ago
From @graybeal:
I saw this once when there was a recursion in the hierarchy (A broaderThan B broaderThan A), if I recall correctly. Another possibility to consider.
Example unit test code that can be placed in test_ontology_submission.rb to debug this issue:
def test_euroscivoc_roots
submission_parse("EUROSCIVOC_TST", "EuroSciVoc Test",
"./test/data/ontology_files/EuroSciVoc-skos-ap-eu.rdf", 1,
process_rdf: true, index_search: false, run_metrics: false)
sub = LinkedData::Models::OntologySubmission.where(ontology: [acronym: "EUROSCIVOC_TST"], submissionId: 1)
.include(:version).first
roots = sub.roots
refute_empty roots, 'Failed to return root classes for EuroSciVoc'
end
Example SPARQL query to retrieve root classes:
SELECT DISTINCT ?root WHERE {
GRAPH <http://data.bioontology.org/ontologies/EUROSCIVOC_TST/submissions/1> {
?x <http://www.w3.org/2004/02/skos/core#hasTopConcept> ?root .
}}
Hello, If I can give you my modest help with this. I think the issue is just a miswriting of the skos hasTopConcept property.
In the resource file, it is written hasTopconcept but the correct writing is hasTopConcept
OMG, a single character in the wrong case.
😫
Thank you for pointing that out Syphax - your eyesight is clearly better than mine.
I modified the hasTopConcept declarations to use the correct case and uploaded a new version of the ontology to our staging environment. I can confirm that this fixes the issue.
Hi, thank you so much for looking into this. I made the change in EcoPortal as well - thanks Syphax! I did this on Thursday, as soon as I read abt the typo. After correcting, for some time on Thursday already I could access the Classes without being logged in, but the problem persisted when logged in as admin. I thought it might be a cache issue. Come Monday, I cannot access the classes either as admin or as unsubscribed user. I checked the SKOS file and it is the corrected version, so there was no problem with the update. Any tip on what to check in our instance? Thanks heaps
@xeniacs - was there a newer version of the ontology that was uploaded over the weekend?
Are you able to access your ontology classes and roots in a web browser via the REST API, e.g.:
http://{ip_address_of_appliance}:8080/ontologies/EUROSCIVOC/classes
http://{ip_address_of_appliance}:8080/ontologies/EUROSCIVOC/classes/roots
You mentioned that you thought it might be a caching issue. Just to clarify, did you clear all of the application caches on the Admin -> Site Administration tab in your web UI?
We received a report from Xeni (OntoPortal Alliance member) that EcoPortal shows a "Problem retrieving classes" error when trying to view the classes for their EUROSCIVOC SKOS ontology. You can see the behavior on the EcoPortal site here:
http://ecoportal.lifewatch.eu/ontologies/EUROSCIVOC/?p=classes&conceptid=root
(EcoPortal is an instance of the OntoPortal virtual appliance)
Xeni sent me an RDF file so that we could try to reproduce this on our end. I created an entry on our staging server with the ontology here:
https://stage.bioontology.org/ontologies/EUROSCIVOCAPEU/?p=summary
... and we see the same "Problem retrieving classes" error on the classes page:
https://stage.bioontology.org/ontologies/EUROSCIVOCAPEU/?p=classes&conceptid=root
The underlying reason for this error is that the REST API is failing to calculate the set of root classes, i.e., the /roots endpoint is returning an empty set:
https://stagedata.bioontology.org/ontologies/EUROSCIVOCAPEU/classes/roots
I've looked at the content of the ontology, and it appears to meet our minimum standards for SKOS support, which are detailed on our wiki:
https://www.bioontology.org/wiki/SKOSSupport
In particular, the SKOS ontology contains the necessary ConceptScheme with a list of hasTopConcept declarations:
Based on the snippet above, I would expect there to be 6 root classes returned by the REST API. Note that Protege correctly recognizes the ConceptScheme with associated hasTopConcepts: