MARMOTTA-393: backport fix in SQL statement for loading literals (cherry picked from commit 35513348fb521a436e5cf1cfa9bbc069d400ad08)
Signed-off-by: Jakob Frank <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/c6478813 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/c6478813 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/c6478813 Branch: refs/heads/maintenance-3.1.x Commit: c6478813295ff26d2f5259e3cacd3e36a0df9e52 Parents: 61a2d53 Author: Sebastian Schaffert <[email protected]> Authored: Mon Nov 18 12:47:17 2013 +0100 Committer: Jakob Frank <[email protected]> Committed: Thu Dec 12 12:25:15 2013 +0100 ---------------------------------------------------------------------- .../src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java | 1 + .../org/apache/marmotta/kiwi/persistence/h2/statements.properties | 2 +- .../apache/marmotta/kiwi/persistence/pgsql/statements.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/c6478813/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java ---------------------------------------------------------------------- diff --git a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java index 652e3e5..8dc761c 100644 --- a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java +++ b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/KiWiLoader.java @@ -251,6 +251,7 @@ public class KiWiLoader { final File f = new File(inFile); String fName = f.getName(); InputStream inStream = new FileInputStream(f); + if (gzip || inFile.endsWith(".gz")) { log.debug("{} seems to be gzipped", inFile); inStream = new GZIPInputStream(inStream); http://git-wip-us.apache.org/repos/asf/marmotta/blob/c6478813/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties ---------------------------------------------------------------------- diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties index 092cfcb..ebfff11 100644 --- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties +++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties @@ -32,7 +32,7 @@ load.uri_by_uri = SELECT id,ntype,svalue,createdAt FROM nodes WHERE ntype load.bnode_by_anonid = SELECT id,ntype,svalue,createdAt FROM nodes WHERE ntype = 'bnode' AND svalue = ? -load.literal_by_v = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND lang IS NULL AND ltype IS NULL +load.literal_by_v = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE ntype = 'string' AND svalue = ? AND lang IS NULL AND ltype IS NULL load.literal_by_vl = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND lang = ? load.literal_by_vt = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND ltype = ? http://git-wip-us.apache.org/repos/asf/marmotta/blob/c6478813/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties ---------------------------------------------------------------------- diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties index 2ae6fa6..8dffe88 100644 --- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties +++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties @@ -35,7 +35,7 @@ load.uri_by_uri = SELECT id,ntype,svalue,createdAt FROM nodes WHERE ntype load.bnode_by_anonid = SELECT id,ntype,svalue,createdAt FROM nodes WHERE ntype = 'bnode' AND svalue = ? -load.literal_by_v = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND lang IS NULL AND ltype IS NULL +load.literal_by_v = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE ntype = 'string' AND svalue = ? AND lang IS NULL AND ltype IS NULL load.literal_by_vl = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND lang = ? load.literal_by_vt = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE svalue = ? AND ltype = ?
