Java Code Examples for org.eclipse.rdf4j.query.QueryEvaluationException#printStackTrace()

The following examples show how to use org.eclipse.rdf4j.query.QueryEvaluationException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES1979MinMaxInf() throws Exception {
	loadTestData("/testdata-query/dataset-ses1979.trig");
	String query = "prefix : <http://example.org/> select (min(?o) as ?min) (max(?o) as ?max) where { ?s :float ?o }";

	ValueFactory vf = conn.getValueFactory();
	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult evaluate = tq.evaluate();) {
		List<BindingSet> result = QueryResults.asList(evaluate);
		assertNotNull(result);
		assertEquals(1, result.size());

		assertEquals(vf.createLiteral(Float.NEGATIVE_INFINITY), result.get(0).getValue("min"));
		assertEquals(vf.createLiteral(Float.POSITIVE_INFINITY), result.get(0).getValue("max"));
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 2
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES1991STRUUIDEvaluation() throws Exception {
	loadTestData("/testdata-query/defaultgraph.ttl");
	String query = "SELECT ?uid WHERE {?s ?p ?o . BIND(STRUUID() as ?uid) } LIMIT 2";

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		Literal uid1 = (Literal) result.next().getValue("uid");
		Literal uid2 = (Literal) result.next().getValue("uid");

		assertNotNull(uid1);
		assertFalse(uid1.equals(uid2));
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 3
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES1991UUIDEvaluation() throws Exception {
	loadTestData("/testdata-query/defaultgraph.ttl");
	String query = "SELECT ?uid WHERE {?s ?p ?o . BIND(UUID() as ?uid) } LIMIT 2";

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		IRI uuid1 = (IRI) result.next().getValue("uid");
		IRI uuid2 = (IRI) result.next().getValue("uid");

		assertNotNull(uuid1);
		assertNotNull(uuid2);
		assertFalse(uuid1.equals(uuid2));
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 4
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES2024PropertyPathAnonVarSharing() throws Exception {
	loadTestData("/testdata-query/dataset-ses2024.trig");
	String query = "PREFIX : <http://example.org/> SELECT * WHERE { ?x1 :p/:lit ?l1 . ?x1 :diff ?x2 . ?x2 :p/:lit ?l2 . }";

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		BindingSet bs = result.next();
		Literal l1 = (Literal) bs.getValue("l1");
		Literal l2 = (Literal) bs.getValue("l2");

		assertNotNull(l1);
		assertFalse(l1.equals(l2));
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 5
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES1970CountDistinctWildcard() throws Exception {
	loadTestData("/testdata-query/dataset-ses1970.trig");

	String query = "SELECT (COUNT(DISTINCT *) AS ?c) {?s ?p ?o }";

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		assertTrue(result.hasNext());
		BindingSet s = result.next();
		Literal count = (Literal) s.getValue("c");
		assertNotNull(count);

		assertEquals(3, count.intValue());
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 6
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testSES1898LeftJoinSemantics1() throws Exception {
	loadTestData("/testdata-query/dataset-ses1898.trig");
	StringBuilder query = new StringBuilder();
	query.append("  PREFIX : <http://example.org/> ");
	query.append("  SELECT * WHERE { ");
	query.append("    ?s :p1 ?v1 . ");
	query.append("    OPTIONAL {?s :p2 ?v2 } .");
	query.append("     ?s :p3 ?v2 . ");
	query.append("  } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());
	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			result.next();
			count++;
		}
		assertEquals(0, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 7
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testSES1081SameTermWithValues() throws Exception {
	loadTestData("/testdata-query/dataset-ses1081.trig");
	StringBuilder query = new StringBuilder();
	query.append("PREFIX ex: <http://example.org/>\n");
	query.append(" SELECT * \n");
	query.append(" WHERE { \n ");
	query.append("          ?s ex:p ?a . \n");
	query.append("          FILTER sameTerm(?a, ?e) \n ");
	query.append("          VALUES ?e { ex:b } \n ");
	query.append(" } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			BindingSet bs = result.next();
			count++;
			assertNotNull(bs);

			Value s = bs.getValue("s");
			Value a = bs.getValue("a");

			assertNotNull(s);
			assertNotNull(a);
			assertEquals(f.createIRI("http://example.org/a"), s);
			assertEquals(f.createIRI("http://example.org/b"), a);
		}
		assertEquals(1, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 8
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testSES1898LeftJoinSemantics2() throws Exception {
	loadTestData("/testdata-query/dataset-ses1898.trig");
	StringBuilder query = new StringBuilder();
	query.append("  PREFIX : <http://example.org/> ");
	query.append("  SELECT * WHERE { ");
	query.append("    ?s :p1 ?v1 . ");
	query.append("    ?s :p3 ?v2 . ");
	query.append("    OPTIONAL {?s :p2 ?v2 } .");
	query.append("  } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			result.next();
			count++;
		}
		assertEquals(1, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 9
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testNullContext1() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");
	StringBuilder query = new StringBuilder();
	query.append(" SELECT * ");
	query.append(" FROM DEFAULT ");
	query.append(" WHERE { ?s ?p ?o } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		while (result.hasNext()) {
			BindingSet bs = result.next();
			assertNotNull(bs);

			Resource s = (Resource) bs.getValue("s");

			assertNotNull(s);
			assertFalse(bob.equals(s)); // should not be present in default
			// graph
			assertFalse(alice.equals(s)); // should not be present in
			// default
			// graph
		}
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 10
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testPropertyPathInTree() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");

	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append(" SELECT ?node ?name ");
	query.append(" FROM ex:tree-graph ");
	query.append(" WHERE { ?node ex:hasParent+ ex:b . ?node ex:name ?name . }");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		while (result.hasNext()) {
			BindingSet bs = result.next();
			assertNotNull(bs);

			// System.out.println(bs);
		}
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 11
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testFilterRegexBoolean() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");

	// test case for issue SES-1050
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append(" SELECT *");
	query.append(" WHERE { ");
	query.append("       ?x foaf:name ?name ; ");
	query.append("          foaf:mbox ?mbox . ");
	query.append("       FILTER(EXISTS { ");
	query.append("            FILTER(REGEX(?name, \"Bo\") && REGEX(?mbox, \"bob\")) ");
	// query.append(" FILTER(REGEX(?mbox, \"bob\")) ");
	query.append("            } )");
	query.append(" } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		assertTrue(result.hasNext());
		int count = 0;
		while (result.hasNext()) {
			BindingSet bs = result.next();
			count++;
			// System.out.println(bs);
		}
		assertEquals(1, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 12
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testGroupConcatNonDistinct() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append("SELECT (GROUP_CONCAT(?l) AS ?concat)");
	query.append("WHERE { ex:groupconcat-test ?p ?l . }");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		while (result.hasNext()) {
			BindingSet bs = result.next();
			assertNotNull(bs);

			Value concat = bs.getValue("concat");

			assertTrue(concat instanceof Literal);

			String lexValue = ((Literal) concat).getLabel();

			int occ = countCharOccurrences(lexValue, 'a');
			assertEquals(1, occ);
			occ = countCharOccurrences(lexValue, 'b');
			assertEquals(2, occ);
			occ = countCharOccurrences(lexValue, 'c');
			assertEquals(2, occ);
			occ = countCharOccurrences(lexValue, 'd');
			assertEquals(1, occ);
		}
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 13
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
/**
 * @see http://www.openrdf.org/issues/browse/SES-1091
 * @throws Exception
 */
public void testArbitraryLengthPathWithFilter1() throws Exception {
	loadTestData("/testdata-query/alp-testdata.ttl");
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append("SELECT ?parent ?child ");
	query.append("WHERE { ?child a owl:Class . ?child rdfs:subClassOf+ ?parent . FILTER (?parent = owl:Thing) }");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			count++;
			BindingSet bs = result.next();
			assertTrue(bs.hasBinding("child"));
			assertTrue(bs.hasBinding("parent"));
		}
		assertEquals(4, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 14
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
/**
 * @see http://www.openrdf.org/issues/browse/SES-1091
 * @throws Exception
 */
public void testArbitraryLengthPathWithFilter2() throws Exception {
	loadTestData("/testdata-query/alp-testdata.ttl");
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append("SELECT ?parent ?child ");
	query.append("WHERE { ?child rdfs:subClassOf+ ?parent . FILTER (?parent = owl:Thing) }");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			count++;
			BindingSet bs = result.next();
			assertTrue(bs.hasBinding("child"));
			assertTrue(bs.hasBinding("parent"));
		}
		assertEquals(4, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 15
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testSES1991RANDEvaluation() throws Exception {
	loadTestData("/testdata-query/defaultgraph.ttl");
	String query = "SELECT ?r WHERE {?s ?p ?o . BIND(RAND() as ?r) } LIMIT 3";

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		Literal r1 = (Literal) result.next().getValue("r");
		Literal r2 = (Literal) result.next().getValue("r");
		Literal r3 = (Literal) result.next().getValue("r");

		assertNotNull(r1);

		// there is a small chance that two successive calls to the random
		// number generator will generate the exact same value, so we check
		// for
		// three successive calls (still theoretically possible to be
		// identical, but phenomenally unlikely).
		assertFalse(r1.equals(r2) && r1.equals(r3));
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 16
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testGroupConcatDistinct() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");

	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append("SELECT (GROUP_CONCAT(DISTINCT ?l) AS ?concat)");
	query.append("WHERE { ex:groupconcat-test ?p ?l . }");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		while (result.hasNext()) {
			BindingSet bs = result.next();
			assertNotNull(bs);

			Value concat = bs.getValue("concat");

			assertTrue(concat instanceof Literal);

			String lexValue = ((Literal) concat).getLabel();

			int occ = countCharOccurrences(lexValue, 'a');
			assertEquals(1, occ);
			occ = countCharOccurrences(lexValue, 'b');
			assertEquals(1, occ);
			occ = countCharOccurrences(lexValue, 'c');
			assertEquals(1, occ);
			occ = countCharOccurrences(lexValue, 'd');
			assertEquals(1, occ);
		}
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 17
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void testNullContext2() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append(" SELECT * ");
	query.append(" FROM sesame:nil ");
	query.append(" WHERE { ?s ?p ?o } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		while (result.hasNext()) {
			BindingSet bs = result.next();
			assertNotNull(bs);

			Resource s = (Resource) bs.getValue("s");

			assertNotNull(s);
			assertFalse(bob.equals(s)); // should not be present in default
			// graph
			assertFalse(alice.equals(s)); // should not be present in
			// default
			// graph
		}
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}
 
Example 18
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Test
public void testSES1121VarNamesInOptionals() throws Exception {
	// Verifying that variable names have no influence on order of optionals
	// in query. See SES-1121.

	loadTestData("/testdata-query/dataset-ses1121.trig");

	StringBuilder query1 = new StringBuilder();
	query1.append(getNamespaceDeclarations());
	query1.append(" SELECT DISTINCT *\n");
	query1.append(" WHERE { GRAPH ?g { \n");
	query1.append("          OPTIONAL { ?var35 ex:p ?b . } \n ");
	query1.append("          OPTIONAL { ?b ex:q ?c . } \n ");
	query1.append("       } \n");
	query1.append(" } \n");

	StringBuilder query2 = new StringBuilder();
	query2.append(getNamespaceDeclarations());
	query2.append(" SELECT DISTINCT *\n");
	query2.append(" WHERE { GRAPH ?g { \n");
	query2.append("          OPTIONAL { ?var35 ex:p ?b . } \n ");
	query2.append("          OPTIONAL { ?b ex:q ?var2 . } \n ");
	query2.append("       } \n");
	query2.append(" } \n");

	TupleQuery tq1 = conn.prepareTupleQuery(QueryLanguage.SPARQL, query1.toString());
	TupleQuery tq2 = conn.prepareTupleQuery(QueryLanguage.SPARQL, query2.toString());

	try (TupleQueryResult result1 = tq1.evaluate(); TupleQueryResult result2 = tq2.evaluate();) {
		assertNotNull(result1);
		assertNotNull(result2);

		List<BindingSet> qr1 = QueryResults.asList(result1);
		List<BindingSet> qr2 = QueryResults.asList(result2);

		// System.out.println(qr1);
		// System.out.println(qr2);

		// if optionals are not kept in same order, query results will be
		// different size.
		assertEquals(qr1.size(), qr2.size());

	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 19
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Test
public void testSameTermRepeatInUnion() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");
	StringBuilder query = new StringBuilder();
	query.append("PREFIX foaf:<http://xmlns.com/foaf/0.1/>\n");
	query.append("SELECT * {\n");
	query.append("    {\n");
	query.append("        ?sameTerm foaf:mbox ?mbox\n");
	query.append("        FILTER sameTerm(?sameTerm,$william)\n");
	query.append("    } UNION {\n");
	query.append("        ?x foaf:knows ?sameTerm\n");
	query.append("        FILTER sameTerm(?sameTerm,$william)\n");
	query.append("    }\n");
	query.append("}");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());
	tq.setBinding("william", conn.getValueFactory().createIRI("http://example.org/william"));

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			BindingSet bs = result.next();
			count++;
			assertNotNull(bs);

			// System.out.println(bs);

			Value mbox = bs.getValue("mbox");
			Value x = bs.getValue("x");

			assertTrue(mbox instanceof Literal || x instanceof IRI);
		}
		assertEquals(3, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}
 
Example 20
Source File: ComplexSPARQLQueryTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Test
public void testSameTermRepeatInOptional() throws Exception {
	loadTestData("/testdata-query/dataset-query.trig");
	StringBuilder query = new StringBuilder();
	query.append(getNamespaceDeclarations());
	query.append(" SELECT ?l ?opt1 ?opt2 ");
	query.append(" FROM ex:optional-sameterm-graph ");
	query.append(" WHERE { ");
	query.append("          ?s ex:p ex:A ; ");
	query.append("          { ");
	query.append("              { ");
	query.append("                 ?s ?p ?l .");
	query.append("                 FILTER(?p = rdfs:label) ");
	query.append("              } ");
	query.append("              OPTIONAL { ");
	query.append("                 ?s ?p ?opt1 . ");
	query.append("                 FILTER (?p = ex:prop1) ");
	query.append("              } ");
	query.append("              OPTIONAL { ");
	query.append("                 ?s ?p ?opt2 . ");
	query.append("                 FILTER (?p = ex:prop2) ");
	query.append("              } ");
	query.append("          }");
	query.append(" } ");

	TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query.toString());

	try (TupleQueryResult result = tq.evaluate();) {
		assertNotNull(result);

		int count = 0;
		while (result.hasNext()) {
			BindingSet bs = result.next();
			count++;
			assertNotNull(bs);

			// System.out.println(bs);

			Value l = bs.getValue("l");
			assertTrue(l instanceof Literal);
			assertEquals("label", ((Literal) l).getLabel());

			Value opt1 = bs.getValue("opt1");
			assertNull(opt1);

			Value opt2 = bs.getValue("opt2");
			assertNull(opt2);
		}
		assertEquals(1, count);
	} catch (QueryEvaluationException e) {
		e.printStackTrace();
		fail(e.getMessage());
	}

}