Strabon
changeset 991:4010ebaf0733
when inferring GeoSPARQL triples, store them in the same context as that of the initial RDF data
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Fri Apr 05 19:53:03 2013 +0300 (2013-04-05) |
parents | 1f615604f096 |
children | f0bfe1a16592 38f816f44404 |
files | runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java |
line diff
1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Fri Apr 05 19:26:55 2013 +0300 1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Fri Apr 05 19:53:03 2013 +0300 1.3 @@ -334,7 +334,6 @@ 1.4 uriContext = f.createURI(context); 1.5 } 1.6 1.7 - 1.8 if(format.equalsIgnoreCase("N3")) { 1.9 realFormat = RDFFormat.N3; 1.10 1.11 @@ -394,7 +393,7 @@ 1.12 1.13 logger.info("[Strabon.storeURL] Inferred {} triples.", handler.getNumberOfTriples()); 1.14 if (handler.getNumberOfTriples() > 0) { 1.15 - logger.info("[Strabon.storeURL] Triples inferred: {}", handler.getTriples()); 1.16 + logger.debug("[Strabon.storeURL] Triples inferred: {}", handler.getTriples()); 1.17 } 1.18 1.19 StringReader georeader = new StringReader(handler.getTriples().toString()); 1.20 @@ -402,14 +401,15 @@ 1.21 1.22 if (context == null) { 1.23 con1.add(url, baseURI, format); 1.24 + con1.add(georeader, baseURI, RDFFormat.NTRIPLES); 1.25 1.26 } else { 1.27 con1.add(url, baseURI, format, context); 1.28 - 1.29 + con1.add(georeader, baseURI, RDFFormat.NTRIPLES, context); 1.30 } 1.31 1.32 - con1.add(georeader, "", RDFFormat.NTRIPLES); 1.33 georeader.close(); 1.34 + 1.35 logger.info("[Strabon.storeURL] Storing was successful."); 1.36 } 1.37