SPARQL 查询的问题

发布于 2024-10-06 02:23:23 字数 849 浏览 4 评论 0原文

我的以下查询不起作用:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema%23>
PREFIX i: <http://evolizer.org/ontologies/seon/2010/09/softwaremetrics.owl%23>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns%23>
SELECT ?metric ?value
WHERE {
?metric rdf:type i:SoftwareDesignMetric .
?metric i:hasName "NOM" .
?metric i:hasValue ?value 
?metric i:isMetricOf "http://130.60.156.155:8080/famixParser/projects/argouml/org.argouml.pattern.cognitive" .}

我使用 查询验证器 抛出以下异常:

Encountered "  "?metric "" at line 9, column 1.
Was expecting one of:
    "graph" ...
    "optional" ...
    "service" ...
    "minus" ...
    "filter" ...
    "{" ...
    "}" ...
    ";" ...
    "," ...
    "." ...

但我不知道这意味着什么

I have the following query that is not working:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema%23>
PREFIX i: <http://evolizer.org/ontologies/seon/2010/09/softwaremetrics.owl%23>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns%23>
SELECT ?metric ?value
WHERE {
?metric rdf:type i:SoftwareDesignMetric .
?metric i:hasName "NOM" .
?metric i:hasValue ?value 
?metric i:isMetricOf "http://130.60.156.155:8080/famixParser/projects/argouml/org.argouml.pattern.cognitive" .}

I used a query validator that throws the following exception:

Encountered "  "?metric "" at line 9, column 1.
Was expecting one of:
    "graph" ...
    "optional" ...
    "service" ...
    "minus" ...
    "filter" ...
    "{" ...
    "}" ...
    ";" ...
    "," ...
    "." ...

But i don't know what that means

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相权↑美人 2024-10-13 02:23:23

您可能想在图形模式 ?metric i:hasValue ?value 之后添加句点 .

You probably want to add a period . after the graph pattern ?metric i:hasValue ?value .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文