578
|
1 package digilib.io;
|
|
2
|
|
3 import java.io.File;
|
|
4
|
590
|
5 import digilib.meta.MetadataMap;
|
|
6
|
582
|
7 public interface DocuDirent extends Comparable<Object> {
|
578
|
8
|
|
9 /**
|
|
10 * Checks metadata and does something with it.
|
|
11 *
|
|
12 */
|
|
13 public abstract void checkMeta();
|
|
14
|
|
15 /**
|
|
16 * gets the (default) File
|
|
17 *
|
|
18 * @return
|
|
19 */
|
582
|
20 public abstract File getFile();
|
578
|
21
|
|
22 /**
|
|
23 * Reads meta-data for this Fileset if there is any.
|
|
24 *
|
|
25 */
|
|
26 public abstract void readMeta();
|
|
27
|
|
28 /**
|
|
29 * The name of the file.
|
|
30 *
|
|
31 * If this is a Fileset, the method returns the name of the default file
|
|
32 * (for image filesets the highest resolution file).
|
|
33 *
|
|
34 * @return
|
|
35 */
|
|
36 public abstract String getName();
|
|
37
|
|
38 /**
|
|
39 * Returns the parent Directory.
|
|
40 *
|
|
41 * @return DocuDirectory
|
|
42 */
|
|
43 public abstract Directory getParent();
|
|
44
|
|
45 /**
|
|
46 * Sets the parent Directory.
|
|
47 *
|
|
48 * @param parent
|
|
49 * The parent to set
|
|
50 */
|
|
51 public abstract void setParent(Directory parent);
|
|
52
|
|
53 /**
|
|
54 * Returns the meta-data for this file(set).
|
|
55 *
|
|
56 * @return HashMap
|
|
57 */
|
|
58 public abstract MetadataMap getFileMeta();
|
|
59
|
|
60 /**
|
|
61 * Sets the meta-data for this file(set) .
|
|
62 *
|
|
63 * @param fileMeta
|
|
64 * The fileMeta to set
|
|
65 */
|
|
66 public abstract void setFileMeta(MetadataMap fileMeta);
|
|
67
|
|
68 /**
|
|
69 * @return
|
|
70 */
|
|
71 public abstract boolean isMetaChecked();
|
|
72
|
|
73 /** Comparator using the file name.
|
|
74 * Compares to a String (for binarySearch)
|
|
75 * or to another DocuDirent (for sort)
|
|
76 *
|
|
77 * @see java.lang.Comparable#compareTo(java.lang.Object)
|
|
78 */
|
|
79 public abstract int compareTo(Object arg0);
|
|
80
|
|
81 } |