Changeset - 6ea2e1aa5070
[Not reviewed]
default
0 1 0
Drew Perttula - 9 years ago 2016-06-05 09:20:49
drewp@bigasterisk.com
uriValue support
Ignore-this: e54fadb2968d9c5a260fd7c4d1857e91
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/graph.coffee
Show inline comments
 
@@ -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) ->
 

	
0 comments (0 inline, 0 general)