Search in sources :

Example 1 with SPARQLBooleanJSONParser

use of org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser in project rdf4j by eclipse.

the class SPARQLJSONBooleanTest method testBoolean2.

@Test
public void testBoolean2() throws Exception {
    SPARQLBooleanJSONParser parser = new SPARQLBooleanJSONParser(SimpleValueFactory.getInstance());
    QueryResultCollector handler = new QueryResultCollector();
    parser.setQueryResultHandler(handler);
    parser.parseQueryResult(this.getClass().getResourceAsStream("/sparqljson/boolean2.srj"));
    assertTrue(handler.getBoolean());
}
Also used : SPARQLBooleanJSONParser(org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser) QueryResultCollector(org.eclipse.rdf4j.query.resultio.helpers.QueryResultCollector) AbstractQueryResultIOBooleanTest(org.eclipse.rdf4j.query.resultio.AbstractQueryResultIOBooleanTest) Test(org.junit.Test)

Example 2 with SPARQLBooleanJSONParser

use of org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser in project rdf4j by eclipse.

the class SPARQLJSONBooleanTest method testBoolean4.

@Test
public void testBoolean4() throws Exception {
    SPARQLBooleanJSONParser parser = new SPARQLBooleanJSONParser(SimpleValueFactory.getInstance());
    QueryResultCollector handler = new QueryResultCollector();
    parser.setQueryResultHandler(handler);
    parser.parseQueryResult(this.getClass().getResourceAsStream("/sparqljson/boolean4.srj"));
    assertFalse(handler.getBoolean());
}
Also used : SPARQLBooleanJSONParser(org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser) QueryResultCollector(org.eclipse.rdf4j.query.resultio.helpers.QueryResultCollector) AbstractQueryResultIOBooleanTest(org.eclipse.rdf4j.query.resultio.AbstractQueryResultIOBooleanTest) Test(org.junit.Test)

Example 3 with SPARQLBooleanJSONParser

use of org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser in project rdf4j by eclipse.

the class SPARQLJSONBooleanTest method testBoolean1.

@Test
public void testBoolean1() throws Exception {
    SPARQLBooleanJSONParser parser = new SPARQLBooleanJSONParser(SimpleValueFactory.getInstance());
    QueryResultCollector handler = new QueryResultCollector();
    parser.setQueryResultHandler(handler);
    parser.parseQueryResult(this.getClass().getResourceAsStream("/sparqljson/boolean1.srj"));
    assertTrue(handler.getBoolean());
}
Also used : SPARQLBooleanJSONParser(org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser) QueryResultCollector(org.eclipse.rdf4j.query.resultio.helpers.QueryResultCollector) AbstractQueryResultIOBooleanTest(org.eclipse.rdf4j.query.resultio.AbstractQueryResultIOBooleanTest) Test(org.junit.Test)

Example 4 with SPARQLBooleanJSONParser

use of org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser in project rdf4j by eclipse.

the class SPARQLJSONBooleanTest method testBoolean3.

@Test
public void testBoolean3() throws Exception {
    SPARQLBooleanJSONParser parser = new SPARQLBooleanJSONParser(SimpleValueFactory.getInstance());
    QueryResultCollector handler = new QueryResultCollector();
    parser.setQueryResultHandler(handler);
    parser.parseQueryResult(this.getClass().getResourceAsStream("/sparqljson/boolean3.srj"));
    assertFalse(handler.getBoolean());
}
Also used : SPARQLBooleanJSONParser(org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser) QueryResultCollector(org.eclipse.rdf4j.query.resultio.helpers.QueryResultCollector) AbstractQueryResultIOBooleanTest(org.eclipse.rdf4j.query.resultio.AbstractQueryResultIOBooleanTest) Test(org.junit.Test)

Aggregations

AbstractQueryResultIOBooleanTest (org.eclipse.rdf4j.query.resultio.AbstractQueryResultIOBooleanTest)4 QueryResultCollector (org.eclipse.rdf4j.query.resultio.helpers.QueryResultCollector)4 SPARQLBooleanJSONParser (org.eclipse.rdf4j.query.resultio.sparqljson.SPARQLBooleanJSONParser)4 Test (org.junit.Test)4