Skip to content

Instantly share code, notes, and snippets.

@kinow
Created September 19, 2014 04:05
Show Gist options
  • Save kinow/b50a5d3b875f2155b7bb to your computer and use it in GitHub Desktop.
Save kinow/b50a5d3b875f2155b7bb to your computer and use it in GitHub Desktop.
QueryBuilder Jena 01
package org.apache.jena.arq;
import org.apache.jena.arq.querybuilder.SelectBuilder;
import org.junit.Test;
public class JenaQueryBuilderSandbox {
@Test
public void testSimple() throws Exception {
SelectBuilder builder = new SelectBuilder()
.addPrefix("foaf", "http://xmlns.com/foaf/0.1/")
.addPrefix("", "http://example.org/")
.addVar("*")
.addWhere("?a", "?b", "?c")
;
System.out.println(builder.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment