# HG changeset patch # User robcast # Date 1293046419 -3600 # Node ID 42ac8c8e62fdb8dedc276503d575c68ba84b9a5c # Parent 3e3e1b7d659fad6e13605cd8d1dc52c63deb2d60 try: DocuDirent as interface diff -r 3e3e1b7d659f -r 42ac8c8e62fd servlet/src/digilib/io/DocuDirent.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/servlet/src/digilib/io/DocuDirent.java Wed Dec 22 20:33:39 2010 +0100 @@ -0,0 +1,79 @@ +package digilib.io; + +import java.io.File; + +public interface DocuDirent extends Comparable{ + + /** + * Checks metadata and does something with it. + * + */ + public abstract void checkMeta(); + + /** + * gets the (default) File + * + * @return + */ + public abstract File getInput(); + + /** + * Reads meta-data for this Fileset if there is any. + * + */ + public abstract void readMeta(); + + /** + * The name of the file. + * + * If this is a Fileset, the method returns the name of the default file + * (for image filesets the highest resolution file). + * + * @return + */ + public abstract String getName(); + + /** + * Returns the parent Directory. + * + * @return DocuDirectory + */ + public abstract Directory getParent(); + + /** + * Sets the parent Directory. + * + * @param parent + * The parent to set + */ + public abstract void setParent(Directory parent); + + /** + * Returns the meta-data for this file(set). + * + * @return HashMap + */ + public abstract MetadataMap getFileMeta(); + + /** + * Sets the meta-data for this file(set) . + * + * @param fileMeta + * The fileMeta to set + */ + public abstract void setFileMeta(MetadataMap fileMeta); + + /** + * @return + */ + public abstract boolean isMetaChecked(); + + /** Comparator using the file name. + * Compares to a String (for binarySearch) + * or to another DocuDirent (for sort) + * + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + public abstract int compareTo(Object arg0); + +} \ No newline at end of file