Skip to content

Commit 3100641

Browse files
authored
Merge pull request #211 from AKSW/feature/removeUnusedUtils
Remove splitinformation and sparqlresponse methods, they are never used
2 parents 3a80206 + 29cd56b commit 3100641

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

quit/utils.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,40 +50,6 @@ def iri_to_name(iri):
5050
return quote_plus("_".join(nameParts))
5151

5252

53-
def sparqlresponse(result, format):
54-
"""Create a FLASK HTTP response for sparql-result+json."""
55-
return Response(
56-
result.serialize(format=format['format']).decode('utf-8'),
57-
content_type=format['mime']
58-
)
59-
60-
61-
def splitinformation(quads, GraphObject):
62-
"""Split quads ."""
63-
data = []
64-
graphsInRequest = set()
65-
for quad in quads:
66-
graph = quad[3].n3().strip('[]')
67-
if graph.startswith('_:', 0, 2):
68-
graphsInRequest.add('default')
69-
data.append({
70-
'graph': 'default',
71-
'quad': quad[0].n3() + ' ' + quad[1].n3() + ' ' + quad[2].n3() + ' .\n'
72-
})
73-
else:
74-
graphsInRequest.add(graph.strip('<>'))
75-
data.append(
76-
{
77-
'graph': graph.strip('<>'),
78-
'quad': quad[0].n3() + ' ' +
79-
quad[1].n3() + ' ' +
80-
quad[2].n3() + ' ' +
81-
graph + ' .\n'
82-
}
83-
)
84-
return {'graphs': graphsInRequest, 'data': data, 'GraphObject': GraphObject}
85-
86-
8753
def graphdiff(first, second):
8854
"""
8955
Diff between graph instances, should be replaced/included in quit diff

0 commit comments

Comments
 (0)