Minor tweaks to deal with the older version of librdf on ubuntu 10.04
[htsworkflow.git] / htsworkflow / util / rdfinfer.py
index aac3afa849178cecffa7f8185c29144f554ebe23..92564a0d80b25b684ad54d31226776ae1eeebd00 100644 (file)
@@ -187,13 +187,13 @@ class Infer(object):
             """
             # check domain
             query = RDF.SPARQLQuery(property_template.format(
-                predicate=predicate,
+                predicate=predicate.uri,
                 space=space))
             seen = []
             for r in query.execute(self.model):
                 if r['type'] == rdfsNS['Resource']:
                     continue
-                seen.append(str(r['type']))
+                seen.append(str(r['type'].uri))
                 check = RDF.Statement(node, rdfNS['type'], r['type'])
                 if self.model.contains_statement(check):
                     return