0
我需要检索camera.owl文件中的所有可用类(https://github.com/quoll/mulgara/blob/master/data/camera.owl)。这是我的查询,我觉得有些不妥,但很难弄清楚。如何使用SPARQL查询获取.owl文件中的所有可用类?
String queryString = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"
+ "PREFIX owl: <http://www.w3.org/2002/07/owl#>"
+ "PREFIX : <http://www.xfront.com/owl/ontologies/camera/#>"
+ "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" +
"SELECT DISTINCT ?class WHERE { ?s a ?class . }";