diff bin/effecteval @ 1055:6ce00faec207

move sequentialUri to the graph lib Ignore-this: 3dc3fb4833a23a46b8cfea90788f25be
author Drew Perttula <drewp@bigasterisk.com>
date Sun, 01 Jun 2014 10:39:17 +0000
parents 4595a82f5a90
children 473db8bebb8f
line wrap: on
line diff
--- a/bin/effecteval	Sun Jun 01 10:22:14 2014 +0000
+++ b/bin/effecteval	Sun Jun 01 10:39:17 2014 +0000
@@ -31,21 +31,21 @@
         self.settings.graph.patch(Patch(delQuads=[
             (song, L9['effect'], uri, ctx),
             ]))
-
+        
 class SongEffects(PrettyErrorHandler, cyclone.web.RequestHandler):
     def post(self):
         song = URIRef(self.get_argument('uri'))
         drop = URIRef(self.get_argument('drop'))
         ctx = song
-        now = time.time()
-        effect = song + "/effect/e-%f" % now
-        curve = song + "/curve/c-%f" % now
+        graph = self.settings.graph
+        effect = graph.sequentialUri(song + "/effect/e-")
+        curve = graph.sequentialUri(song + "/curve/c-")
 
-        with self.settings.graph.currentState(
+        with graph.currentState(
                 tripleFilter=(drop, RDFS.label, None)) as g:
             dropSubLabel = g.label(drop)
         
-        self.settings.graph.patch(Patch(addQuads=[
+        graph.patch(Patch(addQuads=[
             (song, L9['curve'], curve, ctx),
             (song, L9['effect'], effect, ctx),
             (effect, RDF.type, L9['Effect'], ctx),