SimpleSelectQuery selectQuery = new SimpleSelectQuery();
Variable variable = new Variable("title");
selectQuery.addSelection(variable);
UriRef defaultGraph = new UriRef("http://example.org/library");
selectQuery.addDefaultGraph(defaultGraph);
ResourceOrVariable subject = new ResourceOrVariable(
new UriRef("http://example.org/book/book1"));
UriRefOrVariable predicate = new UriRefOrVariable(
new UriRef("http://purl.org/dc/elements/1.1/title"));
ResourceOrVariable object = new ResourceOrVariable(variable);