[英]sparql query - triple
I am a biology trying to understand the meaning of a triple from this SPARQL query. 我是一个生物学人士,试图从此SPARQL查询中了解三元组的含义。 If "a" is a triple, what are the resources for subject, object and predicate in this sample query?
如果“a”是三元组,则此示例查询中的主题,对象和谓词的资源是什么?
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX efo: <http://www.ebi.ac.uk/efo/>
PREFIX atlas: <http://rdf.ebi.ac.uk/resource/atlas/>
PREFIX atlasterms: <http://rdf.ebi.ac.uk/terms/atlas/>
SELECT DISTINCT ?experiment ?description WHERE
{?experiment
a atlasterms:Experiment ;
dcterms:description ?description ;
atlasterms:hasAssay
[atlasterms:hasSample
[atlasterms:hasSampleCharacteristic
[ atlasterms:propertyType ?propertyType ;
atlasterms:propertyValue ?propertyValue]
]
]
filter regex (?description, "diabetes", "i")
}
I appreciate your help? 我感谢您的帮助?
Thanks, AD 谢谢,公元
?experiment
a atlasterms:Experiment ;
is the same as 是相同的
?experiment a atlasterms:Experiment ;
is the same as 是相同的
?experiment rdf:type atlasterms:Experiment ;
so the form in the query is just a whitespace rearrangement and using the built-in abbreviation "a" for property rdf:type. 所以查询中的表单只是一个空格重新排列,并使用内置的缩写“a”表示属性rdf:type。
See http://www.sparql.org/query-validator.html
for an online formatter of SPARQL queries. 有关SPARQL查询的在线格式化程序,请参见
http://www.sparql.org/query-validator.html
。
A simpler query is: 一个更简单的查询是:
SELECT DISTINCT ?experiment ?description
WHERE
{ ?experiment rdf:type atlasterms:Experiment .
?experiment dcterms:description ?description
FILTER regex(?description, "diabetes", "i")
}
because 因为
SELECT DISTINCT ?experiment ?description
means that the ?propertyType/?propertyValue part is not affecting the outcome. 表示?propertyType /?propertyValue部分不影响结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.