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