Skip to content
Snippets Groups Projects
Commit 8532455c authored by Sarra Ouelhadj's avatar Sarra Ouelhadj
Browse files

fix RDF generation

parent be9b4624
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@ def generateRDF (dataset, path=app.config["UPLOAD_FOLDER"],ontology_namespace =
onto.generateOntology(path, ontology_namespace,vocabulary_namespace)
query_file=q.generateSparqlGenerateQuery(dataset, path,vocabulary_namespace, instances_namespace)
result_file = path + "instances.ttl"
result_file = "instances.ttl"
subprocess.run('java -jar ./YKWIM/static/jar/sparql-generate*.jar --query-file '+ query_file+' --output '+result_file, shell=True)
return result_file
\ No newline at end of file
......@@ -40,7 +40,7 @@ def generateSparqlGenerateQuery (dataset,path=app.config["UPLOAD_FOLDER"],vocabu
s+=('BIND(IRI(CONCAT("{}",REPLACE(LCASE(fun:JSONPath(?properties,"$.{}"))," ","_"))) AS ?{})\n'.format(vocabulary_namespace,enum["source"],h.convertToPascalcase(enum["name"])))
s+= "}\n"
query_path = path + "query.rq"
query_path = "query.rq"
with open(query_path, 'w') as fp:
fp.write(s)
return query_path
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment