我有一个简单的 notation3 本体
@prefix my: <http://www.codeproject.com/KB/recipes/n3_notation#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
my:spec a rdfs:Class.
my:security a rdfs:Class; rdfs:subClassOf my:spec .
my:bluetooth a my:security;
my:preferedby my:BusinessPerson;
my:name "bluetooth".
我试图定义类spec
并将类定义security
为spec
.
这是我在 dotNetRdf 库的帮助下使用的 sparql 查询
PREFIX my: <http://www.codeproject.com/KB/recipes/n3_notation#>
SELECT ?name
WHERE {
[ a my:spec;
my:preferedby my:BusinessPerson;
my:name ?name].
}";
根据类层次结构,此查询应返回“蓝牙”作为答案,因为security
它是spec
(据我所知) 的子类。但到目前为止还没有结果。有人可以帮我解决我犯的错误吗?先谢谢了