From 33360c55e7460aa10772bedbc3c5ae45d6229687 Mon Sep 17 00:00:00 2001 From: Miroslav Blasko Date: Wed, 14 Aug 2024 23:29:01 +0200 Subject: [PATCH] [#184] Simplify definition of custom SPINRDF function To use only sp:text --- .../resources/spin/spin-function.spin.ttl | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/s-pipes-core/src/test/resources/spin/spin-function.spin.ttl b/s-pipes-core/src/test/resources/spin/spin-function.spin.ttl index 08f921d5..f4869655 100644 --- a/s-pipes-core/src/test/resources/spin/spin-function.spin.ttl +++ b/s-pipes-core/src/test/resources/spin/spin-function.spin.ttl @@ -19,41 +19,10 @@ kbss-spif:create-sparql-service-url rdf:type spin:Function ; spin:body [ rdf:type sp:Select ; - sp:resultVariables ( - [ - sp:varName "serviceUrl"^^xsd:string ; - ] - ) ; sp:text """SELECT ?serviceUrl WHERE { BIND (IRI(CONCAT(str(?arg1), \"?default-graph-uri=\", ENCODE_FOR_URI(str(?arg2)))) AS ?serviceUrl) . -}"""^^xsd:string ; - sp:where ( - [ - rdf:type sp:Bind ; - sp:expression [ - rdf:type sp:iri ; - sp:arg1 [ - rdf:type sp:concat ; - sp:arg1 [ - rdf:type sp:str ; - sp:arg1 spin:_arg1 ; - ] ; - sp:arg2 "?default-graph-uri=" ; - sp:arg3 [ - rdf:type sp:encode_for_uri ; - sp:arg1 [ - rdf:type sp:str ; - sp:arg1 spin:_arg2 ; - ] ; - ] ; - ] ; - ] ; - sp:variable [ - sp:varName "serviceUrl"^^xsd:string ; - ] ; - ] - ) ; +}""" ; ] ; spin:constraint [ rdf:type spl:Argument ; @@ -67,9 +36,4 @@ WHERE { rdfs:comment "URI of named graph (e.g. http://example.org/my-ontology)."^^xsd:string ; ] ; rdfs:comment "Construct sparql service url from ?sparqlEndpointUrl and ?namedGraphURI."^^xsd:string ; - rdfs:subClassOf spin:Functions ; -. -arg:namedGraphUri - rdf:type rdf:Property ; - rdfs:subPropertyOf sp:arg ; .