# HG changeset patch # User robcast # Date 1294234888 -3600 # Node ID 95417c4615b8b76be4ff2d9f35ab8a5687eb5228 # Parent 7357ad8f9f42201c79ea73e1de69ec374e637e77 more cleanup for ImageFileSet diff -r 7357ad8f9f42 -r 95417c4615b8 servlet/src/digilib/image/ImageJobDescription.java --- a/servlet/src/digilib/image/ImageJobDescription.java Wed Jan 05 12:12:19 2011 +0100 +++ b/servlet/src/digilib/image/ImageJobDescription.java Wed Jan 05 14:41:28 2011 +0100 @@ -132,9 +132,6 @@ public String getMimeType() throws IOException { if (mimeType == null) { fileToLoad = getFileToLoad(); - if(! fileToLoad.isChecked()){ - DigilibConfiguration.docuImageIdentify((ImageFile) fileToLoad); //FIXME: cast to file? - } mimeType = fileToLoad.getMimetype(); } return mimeType; @@ -249,9 +246,6 @@ ImageSet fileset = getFileset(); if (getAbsoluteScale()) { ImageInput hiresFile = fileset.getBiggest(); - if (!hiresFile.isChecked()) { - DigilibConfiguration.docuImageIdentify((ImageFile) hiresFile); //FIXME: cast to file? - } hiresSize = hiresFile.getSize(); } return hiresSize; diff -r 7357ad8f9f42 -r 95417c4615b8 servlet/src/digilib/io/DigilibInfoReader.java --- a/servlet/src/digilib/io/DigilibInfoReader.java Wed Jan 05 12:12:19 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -package digilib.io; - -/** DigilibInfoReader - * A class for reading the information from info.xml files used in digilib image directories. - * - */ - -import java.io.File; -import java.util.List; - -import org.apache.log4j.Logger; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.input.SAXBuilder; - - - -public class DigilibInfoReader { - - /** gengeral logger for this class */ - protected static Logger logger = Logger.getLogger("digilib.servlet"); - - private String filename = null; - //private static String base_element = "info"; - - public DigilibInfoReader(String fn){ - filename = fn; - } - - /** - * Returns the attribute defined by 'attr' as a String. - * - * @param attr - * @return - */ - @SuppressWarnings("unchecked") // Element.getChildren() returns naked List - public String getAsString(String attr){ - try{ - SAXBuilder builder = new SAXBuilder(); - Document doc = builder.build(new File(filename)); - Element root = doc.getRootElement(); - List mainElements = root.getChildren(); - // logger.debug("XML mainElements:"+mainElements.toString()); - - for(int i=0; i mainElements = root.getChildren(); + // logger.debug("XML mainElements:"+mainElements.toString()); + + for(int i=0; i