Skip to content

Commit

Permalink
[#184] Simplify definition of custom SPINRDF function
Browse files Browse the repository at this point in the history
To use only sp:text
  • Loading branch information
blcham committed Aug 14, 2024
1 parent afa3e82 commit d27954b
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions s-pipes-core/src/test/resources/spin/spin-function.spin.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand All @@ -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 ;
.

0 comments on commit d27954b

Please sign in to comment.