如果我在其 rdfs:range 中有任何具有某些 XMLSchema 数据类型的属性,Jena 推理器(在我的例子中为 OWL_MEM_RULE_INF 规范)会自动将 rdfs:Resource 添加到该范围。这是为什么?这是否意味着我可以从字面上使用任何东西作为该属性的值?
例如:
<rdf:RDF xmlns="http://mre.kiv.zcu.cz/ontology/2013/01/dasta.owl#"
xml:base="http://mre.kiv.zcu.cz/ontology/2013/01/dasta.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ds="http://mre.kiv.zcu.cz/ontology/2013/01/dasta.owl#">
<owl:DatatypeProperty rdf:about="&ds;date">
<rdfs:label>date</rdfs:label>
<rdfs:label xml:lang="en">date</rdfs:label>
<rdfs:range rdf:resource="&xsd;dateTime"/>
</owl:DatatypeProperty>
</rdf:RDF>
询问:
PREFIX ds: <http://mre.kiv.zcu.cz/ontology/2013/01/dasta.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?r
WHERE
{
ds:date rdfs:range ?r
}
输出:
---------------------------------------------------
| r |
===================================================
| <http://www.w3.org/2001/XMLSchema#dateTime> |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
---------------------------------------------------