comparison adc2004/adc2004.py @ 2:86aed1f351e3 tip

uriref for adc2004 audio file ids
author alo <nothing@tehis.net>
date Wed, 05 Apr 2017 17:51:18 +0100
parents ef28c91b6bc4
children
comparison
equal deleted inserted replaced
1:ef28c91b6bc4 2:86aed1f351e3
34 self.graph = Graph() 34 self.graph = Graph()
35 self.bindNamespaces() 35 self.bindNamespaces()
36 36
37 def convert(self, data, audio_data): 37 def convert(self, data, audio_data):
38 self.signal = BNode() 38 self.signal = BNode()
39 self.file = BNode(audio_data['path'].split("/")[-1]) 39 self.file = URIRef(audio_data['path'].split("/")[-1])
40 self.timeline = BNode() 40 self.timeline = BNode()
41 self.interval = BNode() 41 self.interval = BNode()
42 duration = audio_data['n_frames'] / audio_data['f_rate'] 42 duration = audio_data['n_frames'] / audio_data['f_rate']
43 43
44 self.graph.add(( self.signal, RDF.type, self.ns['mo']['Signal'] )) 44 self.graph.add(( self.signal, RDF.type, self.ns['mo']['Signal'] ))