我必须将owl:axiom与owl:individual联系起来。
我的RDF如下:
<owl:NamedIndividual rdf:about="http://www.sab.org/abbeys#Abbaye_Notre-Dame_de_Maizières_Saint-Loup-de-la-Salle,_Saône-et-Loire">
<rdf:type rdf:resource="http://www.sab.org/abbeys#Monastery"/>
<rdfs:label>Abbaye Notre-Dame de Maizières Saint-Loup-de-la-Salle, Saône-et-Loire</rdfs:label>
<abbeys:hasFoundationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1132</abbeys:hasFoundationDate>
</owl:NamedIndividual>
<owl:Axiom>
<owl:has_trusted_certainty_degree rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.9</owl:has_trusted_certainty_degree>
<owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1132</owl:annotatedTarget>
<owl:annotatedProperty rdf:resource="http://www.sab.org/abbeys#hasFoundationDate"/>
<owl:annotatedSource rdf:resource="http://www.sab.org/abbeys#Abbaye_Notre-Dame_de_Maizières_Saint-Loup-de-la-Salle,_Saône-et-Loire"/>
</owl:Axiom>我需要在owl:individual中将has_trusted_degree与成立日期关联起来。
我尝试了以下查询,但没有返回任何结果:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://www.sab.org/abbeys#>
PREFIX xds: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?label ?trust
WHERE {
?monastery rdfs:label ?label.
FILTER(lang(?label) = '')
OPTIONAL{?monastery :has_trusted_certainty_degree ?trust}
ORDER BY ?label有人能帮我弄清楚这个问题吗?
提前感谢
发布于 2016-10-13 03:25:25
您的本体为属性添加了错误的前缀,请参见此行:
<owl:has_trusted_certainty_degree rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.9</owl:has_trusted_certainty_degree>我假设owl是OWL词汇表的前缀,而不是用户定义的名称空间的前缀。因此,它不应该是owl:has_trusted_certainty_degree,而应该是名称空间http://www.sab.org/abbeys#的前缀。
https://stackoverflow.com/questions/40005604
复制相似问题