2015-02-10 80 views
0

我是一名試圖從此SPARQL查詢中瞭解三元組意義的生物學家。如果「a」是三元組,那麼此示例查詢中的主題,對象和謂詞的資源是什麼?sparql查詢 - 三重

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") 
} 

我很感謝您的幫助嗎?

謝謝,AD

回答

0
?experiment 
a atlasterms:Experiment ; 

相同

?experiment a atlasterms:Experiment ; 

相同

?experiment rdf:type atlasterms:Experiment ; 

所以在查詢中的形式僅僅是一個空白重排和使用內置的屬性rdf:type的縮寫「a」。

用於SPARQL查詢的在線格式見http://www.sparql.org/query-validator.html

一個簡單的查詢是:

SELECT DISTINCT ?experiment ?description 
WHERE 
    { ?experiment rdf:type atlasterms:Experiment . 
    ?experiment dcterms:description ?description 
    FILTER regex(?description, "diabetes", "i") 
    } 

因爲

SELECT DISTINCT ?experiment ?description 

指屬性類型/部分的PropertyValue不影響結果?。

+0

謝謝你的澄清。 – user4552671 2015-02-13 19:35:55