开发者

Exception while Querying ontology

QUERY=" PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#> \n"+
            "SELECT ?name ?symbol ?weight ?number \n"+
            "FROM <http://www.daml.org/2003/01/periodictable/PeriodicTable.owl> \n" +
            "WHERE \n" +
            "{ \n"+
            "?uranium table:name \"uranium\". \n"+
            "?uranium table:atomicWeight ?uraniumWeight. \n"+
            "?element table:name ?name. \n"+
            "?element table:symbol ?symbol. \n" +
            "?element table:atomicWeight ?weight. \n" +
            "?element table:atomicNumber ?number. \n" +
            "FILTER ?weight > ?uraniumWeight. \n" +
            "} \n"+
            "ORDER BY ASC[?weight] ";

I am getting the following Exception while querying the periodicTable ontology Exception

Exception in thread "AWT-EventQueue-0" com.hp.hpl.jena.query.QueryParseException: En开发者_运维知识库countered " "?weight "" at line 12, column 8. Was expecting one of: ... ... ... "exists" ... .


You need parentheses around the filter expression:

FILTER (?weight > ?uraniumWeight)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜