查询本体时异常

|
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] \";
查询periodTable本体异常时出现以下异常 线程\“ AWT-EventQueue-0 \” com.hp.hpl.jena.query.QueryParseException中的异常:在第12行第8列遇到了\“ \”?weight \“ \” 期望以下之一:       ...      ...      ...     \“存在\” ...      。     
已邀请:
您需要在过滤器表达式周围加上括号:
FILTER (?weight > ?uraniumWeight)
    

要回复问题请先登录注册