comparison servlet/src/digilib/io/DocuDirentImpl.java @ 582:c7034d166a24 stream

more ripping apart ImageFileSet
author robcast
date Tue, 04 Jan 2011 11:56:12 +0100
parents dad720e9b12b
children 69bc69381ac4
comparison
equal deleted inserted replaced
581:bb8dfc05674f 582:c7034d166a24
52 public abstract void checkMeta(); 52 public abstract void checkMeta();
53 53
54 /* (non-Javadoc) 54 /* (non-Javadoc)
55 * @see digilib.io.DocuDirent#getInput() 55 * @see digilib.io.DocuDirent#getInput()
56 */ 56 */
57 public abstract File getInput(); 57 public abstract File getFile();
58 58
59 /* (non-Javadoc) 59 /* (non-Javadoc)
60 * @see digilib.io.DocuDirent#readMeta() 60 * @see digilib.io.DocuDirent#readMeta()
61 */ 61 */
62 public void readMeta() { 62 public void readMeta() {
63 if ((fileMeta != null) || (getInput() == null)) { 63 if ((fileMeta != null) || (getFile() == null)) {
64 // there is already metadata or there is no file 64 // there is already metadata or there is no file
65 return; 65 return;
66 } 66 }
67 // metadata is in the file {filename}.meta 67 // metadata is in the file {filename}.meta
68 String fn = getInput().getAbsolutePath(); 68 String fn = getFile().getAbsolutePath();
69 File mf = new File(fn + ".meta"); 69 File mf = new File(fn + ".meta");
70 if (mf.canRead()) { 70 if (mf.canRead()) {
71 XMLMetaLoader ml = new XMLMetaLoader(); 71 XMLMetaLoader ml = new XMLMetaLoader();
72 try { 72 try {
73 // read meta file 73 // read meta file
84 84
85 /* (non-Javadoc) 85 /* (non-Javadoc)
86 * @see digilib.io.DocuDirent#getName() 86 * @see digilib.io.DocuDirent#getName()
87 */ 87 */
88 public String getName() { 88 public String getName() {
89 File f = getInput(); 89 File f = getFile();
90 return (f != null) ? f.getName() : null; 90 return (f != null) ? f.getName() : null;
91 } 91 }
92 92
93 /* (non-Javadoc) 93 /* (non-Javadoc)
94 * @see digilib.io.DocuDirent#getParent() 94 * @see digilib.io.DocuDirent#getParent()