Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/ImageJobDescription.java @ 574:790cbfb58b52 stream
ripping apart ImageFileSet
author | robcast |
---|---|
date | Wed, 22 Dec 2010 18:32:06 +0100 |
parents | 8beefd1142b2 |
children | dad720e9b12b |
comparison
equal
deleted
inserted
replaced
573:beeedf90cb81 | 574:790cbfb58b52 |
---|---|
10 import digilib.io.DocuDirectory; | 10 import digilib.io.DocuDirectory; |
11 import digilib.io.FileOpException; | 11 import digilib.io.FileOpException; |
12 import digilib.io.FileOps; | 12 import digilib.io.FileOps; |
13 import digilib.io.FileOps.FileClass; | 13 import digilib.io.FileOps.FileClass; |
14 import digilib.io.ImageFile; | 14 import digilib.io.ImageFile; |
15 import digilib.io.ImageFileset; | 15 import digilib.io.ImageSet; |
16 import digilib.servlet.DigilibConfiguration; | 16 import digilib.servlet.DigilibConfiguration; |
17 import digilib.util.OptionsSet; | 17 import digilib.util.OptionsSet; |
18 import digilib.util.Parameter; | 18 import digilib.util.Parameter; |
19 import digilib.util.ParameterMap; | 19 import digilib.util.ParameterMap; |
20 | 20 |
35 | 35 |
36 DigilibConfiguration dlConfig = null; | 36 DigilibConfiguration dlConfig = null; |
37 protected static Logger logger = Logger.getLogger("digilib.servlet"); | 37 protected static Logger logger = Logger.getLogger("digilib.servlet"); |
38 | 38 |
39 ImageFile fileToLoad = null; | 39 ImageFile fileToLoad = null; |
40 ImageFileset fileset = null; | 40 ImageSet fileset = null; |
41 DocuDirectory fileDir = null; | 41 DocuDirectory fileDir = null; |
42 String filePath = null; | 42 String filePath = null; |
43 ImageSize expectedSourceSize = null; | 43 ImageSize expectedSourceSize = null; |
44 Float scaleXY = null; | 44 Float scaleXY = null; |
45 Rectangle2D userImgArea = null; | 45 Rectangle2D userImgArea = null; |
180 } | 180 } |
181 } | 181 } |
182 return fileDir; | 182 return fileDir; |
183 } | 183 } |
184 | 184 |
185 public ImageFileset getFileset() throws FileOpException { | 185 public ImageSet getFileset() throws FileOpException { |
186 if(fileset==null){ | 186 if(fileset==null){ |
187 DocuDirCache dirCache = (DocuDirCache) dlConfig.getValue("servlet.dir.cache"); | 187 DocuDirCache dirCache = (DocuDirCache) dlConfig.getValue("servlet.dir.cache"); |
188 | 188 |
189 fileset = (ImageFileset) dirCache.getFile(getFilePath(), getAsInt("pn"), FileClass.IMAGE); | 189 fileset = (ImageSet) dirCache.getFile(getFilePath(), getAsInt("pn"), FileClass.IMAGE); |
190 if (fileset == null) { | 190 if (fileset == null) { |
191 throw new FileOpException("File " + getFilePath() + "(" | 191 throw new FileOpException("File " + getFilePath() + "(" |
192 + getAsInt("pn") + ") not found."); | 192 + getAsInt("pn") + ") not found."); |
193 } | 193 } |
194 } | 194 } |
243 | 243 |
244 public ImageSize getHiresSize() throws IOException { | 244 public ImageSize getHiresSize() throws IOException { |
245 logger.debug("get_hiresSize()"); | 245 logger.debug("get_hiresSize()"); |
246 | 246 |
247 ImageSize hiresSize = null; | 247 ImageSize hiresSize = null; |
248 ImageFileset fileset = getFileset(); | 248 ImageSet fileset = getFileset(); |
249 if (getAbsoluteScale()) { | 249 if (getAbsoluteScale()) { |
250 ImageFile hiresFile = fileset.getBiggest(); | 250 ImageFile hiresFile = fileset.getBiggest(); |
251 if (!hiresFile.isChecked()) { | 251 if (!hiresFile.isChecked()) { |
252 DigilibConfiguration.docuImageIdentify(hiresFile); | 252 DigilibConfiguration.docuImageIdentify(hiresFile); |
253 } | 253 } |