// TEST 1
File dataFile = new File("virtuoso_driver/data.nt");
System.out.println("TEST 1: Loading file " + dataFile.getAbsolutePath() + " ...");
rep.addData(dataFile, "http://localhost/", RDFFormat.NTRIPLES, false, _report);
String query = "SELECT ?s ?p ?o from <sesame> WHERE { ?s ?p ?o }";
QueryResultsTable result = rep.performTableQuery(null, query);
System.out.println("TEST 1: Passed = " + (result.getRowCount() > 0));
// TEST 2
System.out.println("TEST 2: Clearing repository ...");
rep.clear(_report);
query = "SELECT ?s ?p ?o from <sesame> WHERE { ?s ?p ?o }";
result = rep.performTableQuery(null, query);
System.out.println("TEST 2: Passed = " + (result.getRowCount() == 0));
// TEST 3
URL url = new URL("http://overdogg.com/rdf/requests/1"); //("http://demo.openlinksw.com/dataspace/person/demo#this");
System.out.println("TEST 3: Loading remote file: " + url.toString() + " ...");
rep.addData(url, "http://localhost/", RDFFormat.RDFXML, false, _report);
// execute query
query = "SELECT ?s ?p ?o from <sesame> WHERE { ?s ?p ?o }";
result = rep.performTableQuery(null, query);
System.out.println("TEST 3: Passed = " + (result.getRowCount() > 0));
// TEST 4
NamespaceIterator nss = rep.getNamespaces();
System.out.println("TEST 4: Passed = " + nss.hasNext());
}