Tag: dotnetrdf

为什么我的SPARQL查询返回资源的URI而不是其名称?

我想要得到我所有本体的类。 这是由Protege创build的RDF / XML格式的本体文件的一部分: <!– http://www.w3.org/2002/07/owl#aqua –> <Class rdf:about="&owl;aqua"/> <!– http://www.w3.org/2002/07/owl#varioPerfect –> <Class rdf:about="&owl;varioPerfect"/> 我写了这个查询,它在Protege中正常工作,但是当我在dotNetRDF中使用它时,它将返回类的完整URI,而不仅仅是它的名字。 public string[] ontologysearch() { List<string> list = new List<string>(); TripleStore store = new TripleStore(); Graph mygraph = new Graph(); mygraph.LoadFromFile("D:/msc/search-engine/project/catalogXML.owl"); store.Add(mygraph); string sparqlQuery1 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" + "PREFIX owl: <http://www.w3.org/2002/07/owl#>" + "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>" + […]