Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
选择所有owl:DataProperty SPARQL_Sparql_Ontology_Protege - Fatal编程技术网

选择所有owl:DataProperty SPARQL

选择所有owl:DataProperty SPARQL,sparql,ontology,protege,Sparql,Ontology,Protege,如何在SPARQL中为类(来自本体)选择所有owl:DataProperty?换句话说,我需要选择特定类可以拥有的所有属性 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: &l

如何在SPARQL中为类(来自本体)选择所有owl:DataProperty?换句话说,我需要选择特定类可以拥有的所有属性

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#>
SELECT ?x ?y
WHERE { ?x owl:DataProperty ?y.}
前缀rdf:
前缀owl:
前缀rdfs:
前缀xsd:
选择?x?y
其中{x owl:DataProperty?y.}

类没有属性。属性将个人与其他个人或文字“连接”。你的查询毫无意义,这只是猜测还是你是如何创建的?首先,URI是错误的,它是
owl:DatatypeProperty
——然后
owl:DatatypeProperty
是一个类/类型,这意味着要通过
select?p其中{p rdf:type owl:DatatypeProperty}获取所有这些属性
-实际上,此查询只返回所有数据属性-如果您需要其他内容,您应该在公式中更加清楚如果您需要其他内容,您应该在公式中更加清楚。比如,如果您只需要一个类的各个个体拥有的数据属性,那么您还必须选择该类的所有个体,并使用我所展示的查询的
?p
绑定将其连接起来。所以,你总共需要三个三重模式来给出一个小提示