/** * Load some RDF data. * * @param data * The in-line data to be loaded. * * @return The #of statements parsed from the source. If there are * duplicate told statements, then there may be fewer statements * written onto the KB. * @throws UnsupportedEncodingException */ private long loadData(String data) throws UnsupportedEncodingException { if (data == null || data.length() == 0) { return 0; } data = ttlPrefixes() + data; byte utf8Data[] = data.getBytes("utf-8"); final InputStream is = new ByteArrayInputStream(utf8Data); String uri = FILL_IN_URI; RDFFormat format = RDFFormat.TRIG; return loadData(is, format, uri); }
/** * Load some RDF data. * * @param data * The in-line data to be loaded. * * @return The #of statements parsed from the source. If there are * duplicate told statements, then there may be fewer statements * written onto the KB. * @throws UnsupportedEncodingException */ private long loadData(String data) throws UnsupportedEncodingException { if (data == null || data.length() == 0) { return 0; } data = ttlPrefixes() + data; byte utf8Data[] = data.getBytes("utf-8"); final InputStream is = new ByteArrayInputStream(utf8Data); String uri = FILL_IN_URI; RDFFormat format = RDFFormat.TRIG; return loadData(is, format, uri); }
/** * Load some RDF data. * * @param data * The in-line data to be loaded. * * @return The #of statements parsed from the source. If there are * duplicate told statements, then there may be fewer statements * written onto the KB. * @throws UnsupportedEncodingException */ private long loadData(String data) throws UnsupportedEncodingException { if (data == null || data.length() == 0) { return 0; } data = ttlPrefixes() + data; byte utf8Data[] = data.getBytes("utf-8"); final InputStream is = new ByteArrayInputStream(utf8Data); String uri = FILL_IN_URI; RDFFormat format = RDFFormat.TRIG; return loadData(is, format, uri); }
public void expectResultSet(String vars, String ... bindings) throws Exception { final TupleQueryResult expectedResult = expectedTupleQueryResult(vars, bindings); loadData(trigData()); final TupleQueryResult queryResult = executeSelect(queryStr); compareTupleQueryResults(queryResult, expectedResult, false); }
public void expectResultSet(String vars, String ... bindings) throws Exception { final TupleQueryResult expectedResult = expectedTupleQueryResult(vars, bindings); loadData(trigData()); final TupleQueryResult queryResult = executeSelect(queryStr); compareTupleQueryResults(queryResult, expectedResult, false); }
public void expectResultSet(String vars, String ... bindings) throws Exception { final TupleQueryResult expectedResult = expectedTupleQueryResult(vars, bindings); loadData(trigData()); final TupleQueryResult queryResult = executeSelect(queryStr); compareTupleQueryResults(queryResult, expectedResult, false); }