dbcls / LinkedData-Agora

4 stars 0 forks source link

Labels for metadata are only counted if in the same graph as the data. #176

Open JervenBolleman opened 1 year ago

JervenBolleman commented 1 year ago

e.g. yummydata uses this query on UniProt to detect "No labels of classes found on graph ."

SELECT DISTINCT ?c ?label WHERE { GRAPH <http://sparql.uniprot.org/citationmapping> { ?c <http://www.w3.org/2000/01/rdf-schema#label> ?label . VALUES (?c) { ( <http://www.w3.org/2002/07/owl#Ontology> ) ( <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> ) ( <http://purl.uniprot.org/core/Annotation> ) ( <http://purl.uniprot.org/core/Citation_Statement> ) } } }

which validly has no results. while

SELECT DISTINCT ?c ?label WHERE { ?c <http://www.w3.org/2000/01/rdf-schema#label> ?label . VALUES (?c) { ( <http://www.w3.org/2002/07/owl#Ontology> ) ( <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> ) ( <http://purl.uniprot.org/core/Annotation> ) ( <http://purl.uniprot.org/core/Citation_Statement> ) } } 

does.

Would you consider making this measurement more flexible?

yayamamo commented 1 year ago

Thanks for your comment. I'm afraid that it takes a lot to get a result or even time-out happens at some endpoints without specifying a graph. I'd be glad if you could have a better idea.

JervenBolleman commented 1 year ago

Maybe list the values after the basic graph pattern and add a limit?

SELECT ?c ?label 
WHERE {  
  VALUES (?c) { ( <http://www.w3.org/2002/07/owl#Ontology> ) ( <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> ) ( <http://purl.uniprot.org/core/Annotation> ) ( <http://purl.uniprot.org/core/Citation_Statement> ) } 
?c <http://www.w3.org/2000/01/rdf-schema#label> ?label . 
} LIMIT 2000