annotate servlet/src/digilib/io/DocuDirent.java @ 587:720d061a1b30 stream

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