annotate servlet/src/digilib/io/DocuDirent.java @ 854:1e2e9599d84c stream

(slightly) fixed enhance and colop in linux.
author robcast
date Mon, 07 Mar 2011 11:59:11 +0100
parents a7e157d258e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
578
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
1 package digilib.io;
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
2
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
3 import java.io.File;
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
4
590
69bc69381ac4 more work on stream input and more cleanup
robcast
parents: 582
diff changeset
5 import digilib.meta.MetadataMap;
69bc69381ac4 more work on stream input and more cleanup
robcast
parents: 582
diff changeset
6
582
c7034d166a24 more ripping apart ImageFileSet
robcast
parents: 578
diff changeset
7 public interface DocuDirent extends Comparable<Object> {
578
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
8
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
9 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
10 * Checks metadata and does something with it.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
11 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
12 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
13 public abstract void checkMeta();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
14
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
15 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
16 * gets the (default) File
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
17 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
18 * @return
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
19 */
582
c7034d166a24 more ripping apart ImageFileSet
robcast
parents: 578
diff changeset
20 public abstract File getFile();
578
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
21
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
22 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
23 * Reads meta-data for this Fileset if there is any.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
24 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
25 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
26 public abstract void readMeta();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
27
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
28 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
29 * The name of the file.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
30 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
31 * If this is a Fileset, the method returns the name of the default file
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
32 * (for image filesets the highest resolution file).
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
33 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
34 * @return
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
35 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
36 public abstract String getName();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
37
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
38 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
39 * Returns the parent Directory.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
40 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
41 * @return DocuDirectory
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
42 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
43 public abstract Directory getParent();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
44
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
45 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
46 * Sets the parent Directory.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
47 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
48 * @param parent
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
49 * The parent to set
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
50 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
51 public abstract void setParent(Directory parent);
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
52
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
53 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
54 * Returns the meta-data for this file(set).
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
55 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
56 * @return HashMap
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
57 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
58 public abstract MetadataMap getFileMeta();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
59
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
60 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
61 * Sets the meta-data for this file(set) .
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
62 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
63 * @param fileMeta
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
64 * The fileMeta to set
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
65 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
66 public abstract void setFileMeta(MetadataMap fileMeta);
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
67
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
68 /**
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
69 * @return
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
70 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
71 public abstract boolean isMetaChecked();
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
72
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
73 /** Comparator using the file name.
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
74 * Compares to a String (for binarySearch)
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
75 * or to another DocuDirent (for sort)
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
76 *
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
77 * @see java.lang.Comparable#compareTo(java.lang.Object)
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
78 */
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
79 public abstract int compareTo(Object arg0);
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
80
42ac8c8e62fd try: DocuDirent as interface
robcast
parents:
diff changeset
81 }