# HG changeset patch # User Drew Perttula # Date 2016-06-05 09:20:49 # Node ID 6ea2e1aa50704f2c93fbec1988b0a4d6be245fc7 # Parent 49f80544a3fbe15db3d4ec831646d11e6df8ee14 uriValue support Ignore-this: e54fadb2968d9c5a260fd7c4d1857e91 diff --git a/light9/web/graph.coffee b/light9/web/graph.coffee --- a/light9/web/graph.coffee +++ b/light9/web/graph.coffee @@ -289,19 +289,22 @@ class window.SyncedGraph throw new Error("no value for "+s+" "+p) when 1 obj = quads[0].object - return N3.Util.getLiteralValue(obj) + return obj else throw new Error("too many values: " + JSON.stringify(quads)) floatValue: (s, p) -> - parseFloat(@_singleValue(s, p)) + parseFloat(N3.Util.getLiteralValue(@_singleValue(s, p))) stringValue: (s, p) -> - @_singleValue(s, p) + N3.Util.getLiteralValue(@_singleValue(s, p)) uriValue: (s, p) -> + @_singleValue(s, p) objects: (s, p) -> + quads = @graph.findByIRI(s, p) + return (q.object for q in quads) subjects: (p, o) ->