/** * Delete using an access path with the context position bound. */ public void test_DELETE_accessPath_delete_c_nothingMatched() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://xmlns.com/foaf/0.1/XXX") // c ); assertEquals(0, mutationResult); }
/** * Delete everything in a named graph (context). */ public void test_DELETE_accessPath_delete_c() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/") // c ); assertEquals(3, mutationResult); }
/** * Delete everything in a different named graph (context). */ public void test_DELETE_accessPath_delete_c1() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/c1") // c ); assertEquals(2, mutationResult); }
/** * Get everything in a named graph (context). */ public void test_GET_accessPath_delete_c() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/") // c )); assertEquals(3, result); }
/** * Test the CONTEXTS method. */ public void test_CONTEXTS() throws Exception { if (getTestMode() != TestMode.quads) return; doInsertbyURL("POST", packagePath + "test_estcard.trig"); final RepositoryResult<Resource> contexts = cxn.getContextIDs(); int size = 0; while (contexts.hasNext()) { contexts.next(); size++; } assertEquals(3, size); }
/** * Get everything in a different named graph (context). */ public void test_GET_accessPath_delete_c1() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/c1") // c )); assertEquals(2, result); }
/** * Get using an access path with the context position bound. */ public void test_GET_accessPath_delete_c_nothingMatched() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://xmlns.com/foaf/0.1/XXX") // c )); assertEquals(0, result); }
public void test_INSERT_triples_with_URI_and_defaultContext() throws Exception { if(TestMode.quads != getTestMode()) return; // Load the resource into the KB. { final File file = new File(packagePath + "insert_triples_with_defaultContext.ttl"); cxn.add(file, "", RDFFormat.TURTLE, new URIImpl("http://example.org")); assertEquals(7, getExactSize()); } // Verify that the data were inserted into the appropriate context. { final String queryStr = "select * { GRAPH <http://example.org> {?s ?p ?p} }"; final TupleQuery query = cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr); assertEquals(7, countResults(query.evaluate())); } }
public void test_INSERT_triples_with_BODY_and_defaultContext() throws Exception { if(TestMode.quads != getTestMode()) return; final String resource = packagePath + "insert_triples_with_defaultContext.ttl"; final Graph g = loadGraphFromResource(resource); // Load the resource into the KB. doInsertByBody("POST", RDFFormat.TURTLE, g, new URIImpl( "http://example.org")); // Verify that the data were inserted into the appropriate context. { final String queryStr = "select * { GRAPH <http://example.org> {?s ?p ?p} }"; final TupleQuery query = cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr); assertEquals(7, countResults(query.evaluate())); } }
throws Exception { if(TestMode.quads != getTestMode()) return;
/** * Delete everything in a different named graph (context). */ public void test_DELETE_accessPath_delete_c1() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/c1") // c ); assertEquals(2, mutationResult); }
/** * Delete everything in a named graph (context). */ public void test_DELETE_accessPath_delete_c() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/") // c ); assertEquals(3, mutationResult); }
/** * Delete using an access path with the context position bound. */ public void test_DELETE_accessPath_delete_c_nothingMatched() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long mutationResult = doDeleteWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://xmlns.com/foaf/0.1/XXX") // c ); assertEquals(0, mutationResult); }
/** * Test the CONTEXTS method. */ public void test_CONTEXTS() throws Exception { if (getTestMode() != TestMode.quads) return; doInsertbyURL("POST", packagePath + "test_estcard.trig"); final RepositoryResult<Resource> contexts = cxn.getContextIDs(); int size = 0; while (contexts.hasNext()) { contexts.next(); size++; } assertEquals(3, size); }
/** * Get using an access path with the context position bound. */ public void test_GET_accessPath_delete_c_nothingMatched() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://xmlns.com/foaf/0.1/XXX") // c )); assertEquals(0, result); }
/** * Get everything in a different named graph (context). */ public void test_GET_accessPath_delete_c1() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/c1") // c )); assertEquals(2, result); }
/** * Get everything in a named graph (context). */ public void test_GET_accessPath_delete_c() throws Exception { if(TestMode.quads != getTestMode()) return; doInsertbyURL("POST", packagePath + "test_delete_by_access_path.trig"); final long result = countResults(doGetWithAccessPath(// // requestPath,// null,// s null,// p null,// o new URIImpl("http://www.bigdata.com/") // c )); assertEquals(3, result); }
public void test_INSERT_triples_with_URI_and_defaultContext() throws Exception { if(TestMode.quads != getTestMode()) return; // Load the resource into the KB. { final File file = new File(packagePath + "insert_triples_with_defaultContext.ttl"); cxn.add(file, "", RDFFormat.TURTLE, new URIImpl("http://example.org")); assertEquals(7, getExactSize()); } // Verify that the data were inserted into the appropriate context. { final String queryStr = "select * { GRAPH <http://example.org> {?s ?p ?p} }"; final TupleQuery query = cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr); assertEquals(7, countResults(query.evaluate())); } }
public void test_INSERT_triples_with_BODY_and_defaultContext() throws Exception { if(TestMode.quads != getTestMode()) return; final String resource = packagePath + "insert_triples_with_defaultContext.ttl"; final Graph g = loadGraphFromResource(resource); // Load the resource into the KB. doInsertByBody("POST", RDFFormat.TURTLE, g, new URIImpl( "http://example.org")); // Verify that the data were inserted into the appropriate context. { final String queryStr = "select * { GRAPH <http://example.org> {?s ?p ?p} }"; final TupleQuery query = cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr); assertEquals(7, countResults(query.evaluate())); } }
throws Exception { if(TestMode.quads != getTestMode()) return;