annotate servlet/src/digilib/io/ImageFileset.java @ 531:9cedd170b581 digilibPDF

* PDF generation works now even with subdirectories * genericsification and clean up
author robcast
date Fri, 05 Feb 2010 20:58:38 +0100
parents
children e758a49258e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
531
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
1 /* ImageFileset -- digilib image file info class.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
2 * Digital Image Library servlet components
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
3 * Copyright (C) 2003 Robert Casties (robcast@mail.berlios.de)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
4 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
5 * This program is free software; you can
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
6 * redistribute it and/or modify it under the terms of the GNU General Public
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
7 * License as published by the Free Software Foundation; either version 2 of
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
8 * the License, or (at your option) any later version.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
9 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
10 * Please read license.txt for the full details. A copy of the GPL may be
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
11 * found at http://www.gnu.org/copyleft/lgpl.html
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
12 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License along
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
14 * with this program; if not, write to the Free Software Foundation, Inc.,
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
16 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
17
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
18 package digilib.io;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
19
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
20 import java.io.File;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
21 import java.io.IOException;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
22 import java.util.ArrayList;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
23 import java.util.Arrays;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
24 import java.util.Iterator;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
25 import java.util.List;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
26 import java.util.ListIterator;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
27 import java.util.Map;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
28
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
29 import digilib.image.ImageOps;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
30 import digilib.image.ImageSize;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
31
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
32 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
33 * @author casties
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
34 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
35 public class ImageFileset extends DocuDirent {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
36
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
37 /** this is an image file */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
38 protected static int fileClass = FileOps.CLASS_IMAGE;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
39
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
40 /** list of files (ImageFile) */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
41 private List<ImageFile> list = null;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
42
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
43 /** aspect ratio (width/height) */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
44 private float aspect = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
45
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
46 /** resolution of the biggest image (DPI) */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
47 private float resX = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
48
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
49 /** resolution of the biggest image (DPI) */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
50 private float resY = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
51
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
52 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
53 * Creator for empty fileset.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
54 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
55 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
56 * @param initialCapacity
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
57 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
58 public ImageFileset() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
59 list = new ArrayList<ImageFile>();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
60 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
61
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
62 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
63 * Constructor with a file and hints.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
64 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
65 * The hints are expected to contain 'basedirs' and 'scaledfilext' keys.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
66 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
67 * @param file
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
68 * @param hints
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
69 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
70 public ImageFileset(File file, Map<Integer,Object> hints) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
71 Directory[] dirs = (Directory[]) hints.get(FileOps.HINT_BASEDIRS);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
72 int nb = dirs.length;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
73 list = new ArrayList<ImageFile>(nb);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
74 parent = dirs[0];
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
75 fill(dirs, file, hints);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
76 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
77
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
78 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
79 * Adds an ImageFile to this Fileset.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
80 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
81 * The files should be added in the order of higher to lower resolutions.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
82 * The first file is considered the hires "original".
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
83 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
84 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
85 * @param f
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
86 * file to add
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
87 * @return true (always)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
88 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
89 public boolean add(ImageFile f) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
90 f.setParent(this);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
91 return list.add(f);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
92 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
93
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
94 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
95 * The number of image files in this Fileset.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
96 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
97 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
98 * @return number of image files
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
99 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
100 public int size() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
101 return (list != null) ? list.size() : 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
102 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
103
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
104 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
105 * Gets the default File.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
106 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
107 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
108 public File getFile() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
109 return (list != null) ? list.get(0).getFile() : null;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
110 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
111
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
112 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
113 * Get the ImageFile at the index.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
114 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
115 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
116 * @param index
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
117 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
118 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
119 public ImageFile get(int index) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
120 return list.get(index);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
121 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
122
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
123 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
124 * Get the next smaller ImageFile than the given size.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
125 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
126 * Returns the ImageFile from the set that has a width and height smaller or
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
127 * equal the given size. Returns null if there isn't any smaller image.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
128 * Needs DocuInfo instance to checkFile().
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
129 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
130 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
131 * @param size
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
132 * @param info
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
133 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
134 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
135 public ImageFile getNextSmaller(ImageSize size) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
136 for (Iterator<ImageFile> i = getHiresIterator(); i.hasNext();) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
137 ImageFile f = i.next();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
138 try {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
139 if (!f.isChecked()) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
140 ImageOps.checkFile(f);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
141 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
142 if (f.getSize().isTotallySmallerThan(size)) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
143 return f;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
144 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
145 } catch (IOException e) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
146 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
147 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
148 return null;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
149 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
150
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
151 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
152 * Get the next bigger ImageFile than the given size.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
153 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
154 * Returns the ImageFile from the set that has a width or height bigger or
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
155 * equal the given size. Returns null if there isn't any bigger image. Needs
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
156 * DocuInfo instance to checkFile().
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
157 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
158 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
159 * @param size
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
160 * @param info
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
161 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
162 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
163 public ImageFile getNextBigger(ImageSize size) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
164 for (ListIterator<ImageFile> i = getLoresIterator(); i.hasPrevious();) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
165 ImageFile f = i.previous();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
166 try {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
167 if (!f.isChecked()) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
168 ImageOps.checkFile(f);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
169 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
170 if (f.getSize().isBiggerThan(size)) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
171 return f;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
172 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
173 } catch (IOException e) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
174 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
175 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
176 return null;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
177 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
178
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
179 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
180 * Returns the biggest ImageFile in the set.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
181 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
182 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
183 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
184 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
185 public ImageFile getBiggest() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
186 return this.get(0);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
187 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
188
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
189 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
190 * Returns the biggest ImageFile in the set.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
191 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
192 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
193 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
194 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
195 public ImageFile getSmallest() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
196 return this.get(this.size() - 1);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
197 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
198
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
199 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
200 * Get an Iterator for this Fileset starting at the highest resolution
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
201 * images.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
202 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
203 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
204 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
205 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
206 public ListIterator<ImageFile> getHiresIterator() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
207 return list.listIterator();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
208 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
209
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
210 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
211 * Get an Iterator for this Fileset starting at the lowest resolution
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
212 * images.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
213 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
214 * The Iterator starts at the last element, so you have to use it backwards
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
215 * with hasPrevious() and previous().
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
216 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
217 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
218 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
219 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
220 public ListIterator<ImageFile> getLoresIterator() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
221 return list.listIterator(list.size());
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
222 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
223
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
224 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
225 * Fill the ImageFileset with files from different base directories.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
226 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
227 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
228 * @param dirs
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
229 * list of base directories
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
230 * @param fl
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
231 * file (from first base dir)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
232 * @param hints
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
233 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
234 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
235 void fill(Directory[] dirs, File fl, Map<Integer,Object> hints) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
236 int nb = dirs.length;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
237 String fn = fl.getName();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
238 String baseFn = FileOps.basename(fn);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
239 // add the first ImageFile to the ImageFileset
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
240 add(new ImageFile(fn, this, parent));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
241 // iterate the remaining base directories
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
242 for (int dirIdx = 1; dirIdx < nb; dirIdx++) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
243 if (dirs[dirIdx] == null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
244 continue;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
245 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
246 // read the directory
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
247 if (dirs[dirIdx].getFilenames() == null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
248 dirs[dirIdx].readDir();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
249 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
250 String[] dirFiles = dirs[dirIdx].getFilenames();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
251 // try the same filename as the original
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
252 int fileIdx = Arrays.binarySearch(dirFiles, fn);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
253 if (fileIdx < 0) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
254 // try closest matches without extension
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
255 fileIdx = -fileIdx - 1;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
256 // try idx
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
257 if ((fileIdx < dirFiles.length)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
258 && (FileOps.basename(dirFiles[fileIdx]).equals(baseFn))) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
259 // idx ok
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
260 } else if ((fileIdx > 0)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
261 && (FileOps.basename(dirFiles[fileIdx - 1])
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
262 .equals(baseFn))) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
263 // idx-1 ok
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
264 fileIdx = fileIdx - 1;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
265 } else if ((fileIdx+1 < dirFiles.length)
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
266 && (FileOps.basename(dirFiles[fileIdx + 1])
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
267 .equals(baseFn))) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
268 // idx+1 ok
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
269 fileIdx = fileIdx + 1;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
270 } else {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
271 // basename doesn't match
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
272 continue;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
273 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
274 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
275 if (FileOps.classForFilename(dirFiles[fileIdx]) == FileOps.CLASS_IMAGE) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
276 /* logger.debug("adding file " + dirFiles[fileIdx]
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
277 + " to Fileset " + this.getName()); */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
278 add(new ImageFile(dirFiles[fileIdx], this, dirs[dirIdx]));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
279 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
280 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
281 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
282
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
283 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
284 * Checks metadata and sets resolution in resX and resY.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
285 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
286 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
287 public void checkMeta() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
288 if (metaChecked) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
289 return;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
290 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
291 if (fileMeta == null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
292 // try to read metadata file
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
293 readMeta();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
294 if (fileMeta == null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
295 // try directory metadata
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
296 ((DocuDirectory) parent).checkMeta();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
297 if (((DocuDirectory) parent).getDirMeta() != null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
298 fileMeta = ((DocuDirectory) parent).getDirMeta();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
299 } else {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
300 // try parent directory metadata
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
301 DocuDirectory gp = (DocuDirectory) parent.getParent();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
302 if (gp != null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
303 gp.checkMeta();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
304 if (gp.getDirMeta() != null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
305 fileMeta = gp.getDirMeta();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
306 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
307 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
308 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
309 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
310 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
311 if (fileMeta == null) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
312 // no metadata available
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
313 metaChecked = true;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
314 return;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
315 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
316 metaChecked = true;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
317 float dpi = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
318 float dpix = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
319 float dpiy = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
320 float sizex = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
321 float sizey = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
322 float pixx = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
323 float pixy = 0;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
324 // DPI is valid for X and Y
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
325 if (fileMeta.containsKey("original-dpi")) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
326 try {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
327 dpi = Float.parseFloat((String) fileMeta.get("original-dpi"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
328 } catch (NumberFormatException e) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
329 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
330 if (dpi != 0) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
331 resX = dpi;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
332 resY = dpi;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
333 return;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
334 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
335 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
336 // DPI-X and DPI-Y
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
337 if (fileMeta.containsKey("original-dpi-x")
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
338 && fileMeta.containsKey("original-dpi-y")) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
339 try {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
340 dpix = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
341 .get("original-dpi-x"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
342 dpiy = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
343 .get("original-dpi-y"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
344 } catch (NumberFormatException e) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
345 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
346 if ((dpix != 0) && (dpiy != 0)) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
347 resX = dpix;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
348 resY = dpiy;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
349 return;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
350 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
351 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
352 // SIZE-X and SIZE-Y and PIXEL-X and PIXEL-Y
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
353 if (fileMeta.containsKey("original-size-x")
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
354 && fileMeta.containsKey("original-size-y")
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
355 && fileMeta.containsKey("original-pixel-x")
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
356 && fileMeta.containsKey("original-pixel-y")) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
357 try {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
358 sizex = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
359 .get("original-size-x"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
360 sizey = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
361 .get("original-size-y"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
362 pixx = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
363 .get("original-pixel-x"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
364 pixy = Float.parseFloat((String) fileMeta
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
365 .get("original-pixel-y"));
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
366 } catch (NumberFormatException e) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
367 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
368 if ((sizex != 0) && (sizey != 0) && (pixx != 0) && (pixy != 0)) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
369 resX = pixx / (sizex * 100 / 2.54f);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
370 resY = pixy / (sizey * 100 / 2.54f);
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
371 return;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
372 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
373 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
374 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
375
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
376 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
377 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
378 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
379 public float getResX() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
380 return resX;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
381 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
382
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
383 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
384 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
385 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
386 public float getResY() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
387 return resY;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
388 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
389
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
390 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
391 * Sets the aspect ratio from an ImageSize.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
392 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
393 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
394 * @param f
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
395 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
396 public void setAspect(ImageSize s) {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
397 aspect = s.getAspect();
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
398 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
399
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
400 /**
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
401 * Returns the aspect ratio.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
402 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
403 * Aspect ratio is (width/height). So it's <1 for portrait and >1 for
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
404 * landscape.
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
405 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
406 *
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
407 * @return
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
408 */
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
409 public float getAspect() {
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
410 return aspect;
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
411 }
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
412
9cedd170b581 * PDF generation works now even with subdirectories
robcast
parents:
diff changeset
413 }