我有以下查询:
PREFIX owl: <http://carre.kmi.open.ac.uk/ontology/risk.owl#>
SELECT distinct ?name ?value ?condition ?condition_json
WHERE
{
?node owl:has_observable_condition ?condition .
?node owl:has_risk_evidence_ratio_value ?value .
?node owl:has_risk_factor ?factor.
?factor owl:has_risk_factor_target ?target.
?target owl:has_risk_element_name ?name.
?node owl:has_observable_condition_json ?condition_json .
FILTER regex(str(?condition), "OB_58") .}
查询结果可以找到here
正如您在第一列中看到的那样,所有条目(正确的术语?)都有3个元素名称,这使得数据自身重复2次。有没有办法只显示一个? (最好是英国人?)我试过
PREFIX owl: <http://carre.kmi.open.ac.uk/ontology/risk.owl#>
SELECT distinct ?name ?value ?condition ?condition_json
WHERE
{
?node owl:has_observable_condition ?condition .
?node owl:has_risk_evidence_ratio_value ?value .
?node owl:has_risk_factor ?factor.
?factor owl:has_risk_factor_target ?target.
?target owl:has_risk_element_name ?name.
?node owl:has_observable_condition_json ?condition_json .
FILTER (regex(str(?condition), "OB_58")&®ex(str(?name), "en")) .}
但它返回一个空表。 This无效(或者我无法适应我的情况)。