You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2014/10/16 10:14:56 UTC

[1/2] git commit: enable support for XZ compression in loader

Repository: marmotta
Updated Branches:
  refs/heads/develop 3cda9e0a9 -> 3bc5d4c32


enable support for XZ compression in loader


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/add03e66
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/add03e66
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/add03e66

Branch: refs/heads/develop
Commit: add03e6634ef220e1bf284d5a3d51137a2cf9f81
Parents: 174ad5a
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Thu Oct 16 10:15:06 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Thu Oct 16 10:15:06 2014 +0200

----------------------------------------------------------------------
 .../apache/marmotta/loader/core/MarmottaLoader.java  | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/add03e66/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/core/MarmottaLoader.java
----------------------------------------------------------------------
diff --git a/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/core/MarmottaLoader.java b/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/core/MarmottaLoader.java
index 55abe9b..e1788f7 100644
--- a/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/core/MarmottaLoader.java
+++ b/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/core/MarmottaLoader.java
@@ -36,6 +36,8 @@ import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
 import org.apache.commons.compress.compressors.bzip2.BZip2Utils;
 import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
 import org.apache.commons.compress.compressors.gzip.GzipUtils;
+import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
+import org.apache.commons.compress.compressors.xz.XZUtils;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.MapConfiguration;
 import org.apache.commons.lang3.StringUtils;
@@ -234,6 +236,8 @@ public class MarmottaLoader {
                     in = new GzipCompressorInputStream(fin,true);
                 } else if (CompressorStreamFactory.BZIP2.equalsIgnoreCase(compression)) {
                     in = new BZip2CompressorInputStream(fin, true);
+                } else if (CompressorStreamFactory.XZ.equalsIgnoreCase(compression)) {
+                    in = new XZCompressorInputStream(fin, true);
                 } else {
                     // does not honour decompressConcatenated
                     in = cf.createCompressorInputStream(compression, fin);
@@ -351,6 +355,9 @@ public class MarmottaLoader {
                     } else if (CompressorStreamFactory.BZIP2.equalsIgnoreCase(archiveCompression)) {
                         log.info("auto-detected archive compression: BZIP2");
                         in = new BZip2CompressorInputStream(fin, true);
+                    } else if (CompressorStreamFactory.XZ.equalsIgnoreCase(archiveCompression)) {
+                        log.info("auto-detected archive compression: XZ");
+                        in = new XZCompressorInputStream(fin, true);
                     } else {
                         in = fin;
                     }
@@ -405,8 +412,6 @@ public class MarmottaLoader {
                 log.info("auto-detected archive format: TAR");
             } else if (stream instanceof CpioArchiveInputStream) {
                 log.info("auto-detected archive format: CPIO");
-            } else if (stream instanceof CpioArchiveInputStream) {
-                log.info("auto-detected archive format: CPIO");
             } else {
                 log.info("unknown archive format, relying on commons-compress");
             }
@@ -422,6 +427,8 @@ public class MarmottaLoader {
             return true;
         } else if(file.getName().endsWith(".tar.bz2")) {
             return true;
+        } else if(file.getName().endsWith(".tar.xz")) {
+            return true;
         } else if(file.getName().endsWith(".tar")) {
             return true;
         }
@@ -438,6 +445,8 @@ public class MarmottaLoader {
             return CompressorStreamFactory.BZIP2;
         } else if(GzipUtils.isCompressedFilename(file.getName())) {
             return CompressorStreamFactory.GZIP;
+        } else if(XZUtils.isCompressedFilename(file.getName())) {
+            return CompressorStreamFactory.XZ;
         } else {
             return null;
         }
@@ -448,6 +457,8 @@ public class MarmottaLoader {
             return BZip2Utils.getUncompressedFilename(file.getName());
         } else if(GzipUtils.isCompressedFilename(file.getAbsolutePath())) {
             return GzipUtils.getUncompressedFilename(file.getName());
+        } else if(XZUtils.isCompressedFilename(file.getAbsolutePath())) {
+            return XZUtils.getUncompressedFilename(file.getName());
         } else {
             return file.getName();
         }


[2/2] git commit: Merge remote-tracking branch 'origin/develop' into develop

Posted by ss...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/3bc5d4c3
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/3bc5d4c3
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/3bc5d4c3

Branch: refs/heads/develop
Commit: 3bc5d4c32df848fa2b56ffe33b4f68faa7fc6a4c
Parents: add03e6 3cda9e0
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Thu Oct 16 10:15:24 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Thu Oct 16 10:15:24 2014 +0200

----------------------------------------------------------------------
 .../src/main/resources/web/admin/dataview.html  |  4 +--
 .../versioning/model/MementoVersionSet.java     |  4 +--
 .../webservices/MementoWebService.java          | 34 ++++++++------------
 3 files changed, 18 insertions(+), 24 deletions(-)
----------------------------------------------------------------------