rdf:Resource can be either a resource or a blank node.
authorDiane Trout <diane@caltech.edu>
Tue, 20 Nov 2012 01:04:12 +0000 (17:04 -0800)
committerDiane Trout <diane@caltech.edu>
Tue, 20 Nov 2012 01:04:12 +0000 (17:04 -0800)
Thus we should only toss an error in the case of a node being
a literal.

htsworkflow/util/rdfinfer.py

index baaa2e4bd3016119d0bebba0d43faa1b57085287..1a0fb504181cdf4aed6ebf2aadf68271efbb5bb1 100644 (file)
@@ -198,7 +198,7 @@ class Infer(object):
             for r in query.execute(self.model):
                 # Make sure we have a resource if we're expecting one
                 if r['type'] == rdfsNS['Resource']:
-                    if not node.is_resource():
+                    if node.is_literal():
                         return resource_error.format(str(node), space)
                     continue
                 seen.add(str(r['type'].uri))