We used to have a class that does something like that using SPIN:
https://github.com/AtomGraph/Web-Client/blob/5d0988e3a2c35a2bb045815459d4653d7c23d503/src/main/java/com/atomgraph/client/query/QueryBuilder.java
There's a SelectBuilder class in that folder as well.

Later on this took its place:
https://www.npmjs.com/package/@atomgraph/sparql-builder

And finally XSLT :)
https://github.com/AtomGraph/LinkedDataHub/blob/develop/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/query-transforms.xsl

On Fri, Dec 18, 2020 at 9:12 PM Erich Bremer <[email protected]> wrote:
>
> Is there a way to parse a SPARQL string into a SelectBuilder instance so
> that the SPARQL can be manipulated and added to?
>
> in pseudo-ish code something like:
>
>         SelectBuilder sub = new SelectBuilder("select ?s where {?s ?p ?o}");
>             .addVar("p")
>             .addVar("o");
>
>
> - Erich
  • SelectBuilder Erich Bremer
    • Re: SelectBuilder Martynas Jusevičius

Reply via email to