简体   繁体   English

将OWL个人与OWL公理相关

[英]Relates OWL individual with OWL axiom

I have to related the owl:axiom with the owl:individual . 我必须将owl:axiomowl:individual

My RDF is as follows: 我的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>

I need to relate the has_trusted_degree with the foundation date in owl:individual . 我需要将has_trusted_degreeowl:individual的成立日期相关联。

I tried the following query but it returns nothing: 我尝试了以下查询,但未返回任何内容:

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

Can anyone help me in figuring this out? 谁能帮我解决这个问题?

Thanks in Advance 提前致谢

Your ontology has a wrong prefix for the property, see this line: 您的本体的属性前缀错误,请参见以下行:

<owl:has_trusted_certainty_degree rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.9</owl:has_trusted_certainty_degree>

I assume that owl is the prefix for the OWL vocabulary and not for your user defined namespace. 我假设owl是OWL词汇的前缀,而不是用户定义的名称空间的前缀。 Thus, it shouldn't be owl:has_trusted_certainty_degree but the prefix for the namespace http://www.sab.org/abbeys# . 因此,它不应该是owl:has_trusted_certainty_degree而是名称空间http://www.sab.org/abbeys#的前缀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM