Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Saving as a zip functionality. Done by Nikhil.
authorlingutln <lingutln@localhost>
Mon, 5 Mar 2012 18:55:24 +0000 (18:55 +0000)
committerlingutln <lingutln@localhost>
Mon, 5 Mar 2012 18:55:24 +0000 (18:55 +0000)
svn path=/; revision=305

Annotation/src/ie/dcu/apps/ist/actions/ExportImageMapAction.java
Annotation/src/ie/dcu/apps/ist/export/imagemap/Exporter.java

index 29bbf79d8e8da29fdb80b2daa88124872624837a..196d8697447201052baab40b0cda0957b70e98b3 100644 (file)
@@ -44,6 +44,9 @@ public class ExportImageMapAction extends AppAction{
                                        Exporter exporter = new Exporter(image);
                                        exporter.setEffect(result.effect);
                                        exporter.setHtmlFile(result.html);
+                                       int dotIndex = result.html.indexOf('.');
+                                       String zipFile = result.html.substring(0, dotIndex); 
+                                       exporter.setZipFile(zipFile+".zip");
                                        exporter.setImageFile(result.image);
                                        exporter.setObjectLink(result.link);
                                        exporter.setExportShape(result.shape);
index a4e00e0fec6a3f68f62228d7b107646faf18cc0b..9017f93d35bc7fdd9010b88d0004b2bf69bf0818 100644 (file)
@@ -26,6 +26,7 @@ public class Exporter {
        
        private RolloverEffect effect;
        private String htmlFile = "imagemap.html";
+       private String zipFile = "imagemap.zip";
        private String imageFile = "image.png";
        private String imageName = "image";
        private String objectDescription = "";
@@ -51,6 +52,14 @@ public class Exporter {
        public void setHtmlFile(String htmlFile) {
                this.htmlFile = htmlFile;
        }
+       
+       public String getZipFile() {
+               return zipFile;
+       }
+
+       public void setZipFile(String zipFile) {
+               this.zipFile = zipFile;
+       }
 
        public String getImageFile() {
                return imageFile;
@@ -95,7 +104,7 @@ public class Exporter {
        public void export(File folder, List<SegmentationMask> masks) throws IOException, ExportException {
                
                // Create a zip file for saving imageMaps
-               file = new File("/home/lingutln/practice/example.zip");
+               file = new File(folder,zipFile);
                ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file));
                
                // Create image map