s+=("?{} a <{}>".format(list["name"],list["IRI"]))+".\n"
else:s+=("?{} a <http://data.grandlyon.com/vocabulary/{}".format(list["name"],list["name"]))+">.\n"
s+=("}} \n SOURCE <{}> AS ?source \nITERATOR iter:GeoJSON(?source) AS ?geometricCoordinates ?properties \n WHERE {{\n".format(dataset))
#bindings
forlistind["classes"]:
forattrinlist["attributes"]:
s+=('BIND (fun:JSONPath(?properties,"$.{}") AS ?{})\n'.format(attr["source"],attr["name"]))
if (attr["id"]=="oui"):
s+=('BIND(IRI(CONCAT("http://data.grandlyon.com/id/{}/",fun:JSONPath(?properties,"$.{}"))) AS ?{})\n'.format(list["name"],attr["source"],list["name"]))
forenumind["enumerations"]:
s+=('BIND(IRI("http://data.grandlyon.com/vocabulary/Cadres_administratifs") AS ?{})\n'.format(enum["name"]))