|
@@ -151,8 +151,6 @@ class ModelverseState(object):
|
|
|
?link MV:hasSource <%s> .
|
|
|
}
|
|
|
""" % elem)
|
|
|
- print(elem)
|
|
|
- print("Result: " + str(len(result)))
|
|
|
return ([i[0] for i in result], status.SUCCESS)
|
|
|
|
|
|
def read_incoming(self, elem):
|
|
@@ -200,6 +198,9 @@ class ModelverseState(object):
|
|
|
result = self.graph.query(q)
|
|
|
if len(result) == 0:
|
|
|
return (None, status.FAIL_RDICT_NOT_FOUND)
|
|
|
+ if len(result) != 1:
|
|
|
+ print(value)
|
|
|
+ raise Exception("Error!")
|
|
|
return (list(result)[0][0], status.SUCCESS)
|
|
|
|
|
|
def read_dict_keys(self, node):
|
|
@@ -305,8 +306,9 @@ class ModelverseState(object):
|
|
|
UNION
|
|
|
{ ?edge MV:hasSource <%s> . }
|
|
|
}
|
|
|
- """)
|
|
|
+ """ % (node, node))
|
|
|
# ... and remove them
|
|
|
+ print("Got related nodes: " + str(len(result)))
|
|
|
for e in result:
|
|
|
self.delete_edge(e[0])
|
|
|
|
|
@@ -327,7 +329,7 @@ class ModelverseState(object):
|
|
|
UNION
|
|
|
{ ?edge MV:hasSource <%s> . }
|
|
|
}
|
|
|
- """)
|
|
|
+ """ % (edge, edge))
|
|
|
# ... and remove them
|
|
|
for e in result:
|
|
|
self.delete_edge(e[0])
|