Commit 4c563cc2 authored by Ivan Dages's avatar Ivan Dages
Browse files

exporter : zip export test

parent b7ecc957
......@@ -66,7 +66,7 @@
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
......@@ -79,6 +79,12 @@
<artifactId>nomadcommandsystem</artifactId>
<version>3.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-zip</artifactId>
<version>1.11</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
......
......@@ -12,6 +12,7 @@ import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.zeroturnaround.zip.ZipUtil;
import fr.ill.ics.n3d.model.Axis;
import fr.ill.ics.n3d.model.Component;
......@@ -61,6 +62,10 @@ public class Nomad3DExporter {
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
transformer.transform(new DOMSource(doc), new StreamResult(outputFile));
// TODO ZIP test
// File zipFile = new File(outputFile.getParent() + File.separator + outputFile.getName().substring(0, outputFile.getName().length()-4) + ".n3d");
// ZipUtil.pack(outputFile.getParentFile(), zipFile);
} catch (Exception e) {
e.printStackTrace();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment