基于 2 个过滤器的 URI 的 SPARQL 端点对象

SPARQL endpoint objects by URI based on 2 filters

我正在尝试从 British Museum database 获取烧制粘土制成的圆柱体(对象类型)的 URI (material)。 在我自己测试程序一段时间没有结果后,我从同事那里得到了两个建议,但是都没有用。 有谁知道如何成功地输入执行此操作的查询?

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX crm: <http://erlangen-crm.org/current/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?object
WHERE {
  ?object crm:P2_has_type ?objecttype.
  ?objecttype skos:prefLabel "cylinder".                            
  ?object crm:P45_consists_of ?materialid.                    
  ?materialid skos:prefLabel "fired clay".
}

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX thes: <http://collection.britishmuseum.org/id/thesauri/>
PREFIX rso: <http://www.researchspace.org/ontology/>
SELECT ?cylinder
WHERE {
?cylinder rso:PX_object_type thes:x5597.
?fired_clay rso:PX_display_wrap thes:x41443.
}

例如,

SELECT *
WHERE {
  ?object rso:Thing_has_type_Concept ?type .
  ?type skos:prefLabel "cylinder" .
  ?object rso:Thing_has_material_type_Concept ?material .
  ?material skos:prefLabel "fired clay" .
} LIMIT 100

SELECT *
WHERE {
  ?object rso:Thing_has_type_Concept thes:x6329 .
  ?object rso:Thing_has_material_type_Concept thes:x41443 .  
} LIMIT 100

事实上,有很多方法可以做你想做的事,因为存在很多同义属性。
试试这个 "metaquery":

SELECT DISTINCT ?type_property ?material_property
WHERE {
  VALUES (?object) {(<http://collection.britishmuseum.org/id/object/WCT20849>)}
  ?object ?type_property ?type .
  ?type skos:prefLabel "cylinder" .
  ?object ?material_property ?material .
  ?material skos:prefLabel "fired clay" .
}

至于rso:PX_display_wrap 属性,可以这样使用:

SELECT ?object
WHERE {
  ?object rso:PX_display_wrap "Object type :: cylinder ::" .
  ?object rso:PX_display_wrap "Consists of :: fired clay ::" .
}