Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/DocuDirectory.java @ 295:90bab835fc25
Servlet version 1.5.0b -- the beginning of the next generation :-)
- code restructuring to improve scaleability
- new Initialiser servlet that must be run first
- image transformation work moved to DigilibImageWorker class
- Maximum number of concurrent threads limited by Semaphore
- old JIMI toolkit implementation removed
author | robcast |
---|---|
date | Sun, 24 Oct 2004 20:23:50 +0200 |
parents | ffafe3e470fb |
children | d10e4ce2a153 |
comparison
equal
deleted
inserted
replaced
294:5b4fbec16a2c | 295:90bab835fc25 |
---|---|
173 return false; | 173 return false; |
174 } | 174 } |
175 // first file extension to try for scaled directories | 175 // first file extension to try for scaled directories |
176 String scalext = null; | 176 String scalext = null; |
177 // read all filenames | 177 // read all filenames |
178 logger.debug("reading directory " + dir.getPath()); | 178 //logger.debug("reading directory " + dir.getPath()); |
179 /* | 179 /* |
180 * using ReadableFileFilter is safer (we won't get directories with file | 180 * using ReadableFileFilter is safer (we won't get directories with file |
181 * extensions) but slower. | 181 * extensions) but slower. |
182 */ | 182 */ |
183 File[] allFiles = null; | 183 File[] allFiles = null; |
184 if (cache.safeDirIndex) { | 184 if (cache.safeDirIndex) { |
185 allFiles = dir.listFiles(new FileOps.ReadableFileFilter()); | 185 allFiles = dir.listFiles(new FileOps.ReadableFileFilter()); |
186 } else { | 186 } else { |
187 allFiles = dir.listFiles(); | 187 allFiles = dir.listFiles(); |
188 } | 188 } |
189 logger.debug(" done"); | 189 //logger.debug(" done"); |
190 if (allFiles == null) { | 190 if (allFiles == null) { |
191 // not a directory | 191 // not a directory |
192 return false; | 192 return false; |
193 } | 193 } |
194 // list of base dirs from the parent cache | 194 // list of base dirs from the parent cache |
202 // fill array with the remaining directories | 202 // fill array with the remaining directories |
203 for (int j = 1; j < nb; j++) { | 203 for (int j = 1; j < nb; j++) { |
204 File d = new File(baseDirNames[j], dirName); | 204 File d = new File(baseDirNames[j], dirName); |
205 if (d.isDirectory()) { | 205 if (d.isDirectory()) { |
206 dirs[j] = new Directory(d); | 206 dirs[j] = new Directory(d); |
207 logger.debug(" reading scaled directory " + d.getPath()); | 207 //logger.debug(" reading scaled directory " + d.getPath()); |
208 dirs[j].readDir(); | 208 dirs[j].readDir(); |
209 logger.debug(" done"); | 209 //logger.debug(" done"); |
210 } | 210 } |
211 } | 211 } |
212 | 212 |
213 // go through all file classes | 213 // go through all file classes |
214 for (int classIdx = 0; classIdx < FileOps.NUM_CLASSES; classIdx++) { | 214 for (int classIdx = 0; classIdx < FileOps.NUM_CLASSES; classIdx++) { |