Package digilib.io
Class DocuDirentImpl
- java.lang.Object
-
- digilib.io.DocuDirentImpl
-
- All Implemented Interfaces:
DocuDirent
,Comparable<Object>
public abstract class DocuDirentImpl extends Object implements DocuDirent
Abstract directory entry in a DocuDirectory.- Author:
- casties
-
-
Field Summary
Fields Modifier and Type Field Description protected static FileOps.FileClass
fileClass
the file class of this fileprotected FileMeta
meta
metadata for this fileprotected DocuDirectory
parent
the parent directory
-
Constructor Summary
Constructors Constructor Description DocuDirentImpl()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
checkMeta()
Checks metadata and does something with it.int
compareTo(Object arg0)
Comparator using the file name.abstract File
getFile()
static FileOps.FileClass
getFileClass()
FileMeta
getMeta()
Returns the meta-data for this file(set).String
getName()
The name of the file.DocuDirectory
getParent()
Returns the parent Directory.void
readMeta()
Reads meta-data for this Fileset if there is any.void
setMeta(FileMeta fileMeta)
Sets the meta-data for this file(set).void
setParent(DocuDirectory parent)
Sets the parent Directory.
-
-
-
Field Detail
-
fileClass
protected static FileOps.FileClass fileClass
the file class of this file
-
meta
protected FileMeta meta
metadata for this file
-
parent
protected DocuDirectory parent
the parent directory
-
-
Method Detail
-
getFile
public abstract File getFile()
-
checkMeta
public abstract void checkMeta()
Description copied from interface:DocuDirent
Checks metadata and does something with it.- Specified by:
checkMeta
in interfaceDocuDirent
-
getMeta
public FileMeta getMeta()
Description copied from interface:DocuDirent
Returns the meta-data for this file(set).- Specified by:
getMeta
in interfaceDocuDirent
- Returns:
- the FileMeta
-
setMeta
public void setMeta(FileMeta fileMeta)
Description copied from interface:DocuDirent
Sets the meta-data for this file(set).- Specified by:
setMeta
in interfaceDocuDirent
- Parameters:
fileMeta
- The fileMeta to set
-
readMeta
public void readMeta()
Description copied from interface:DocuDirent
Reads meta-data for this Fileset if there is any.- Specified by:
readMeta
in interfaceDocuDirent
-
getName
public String getName()
Description copied from interface:DocuDirent
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).- Specified by:
getName
in interfaceDocuDirent
- Returns:
- the name
-
getParent
public DocuDirectory getParent()
Description copied from interface:DocuDirent
Returns the parent Directory.- Specified by:
getParent
in interfaceDocuDirent
- Returns:
- the DocuDirectory
-
setParent
public void setParent(DocuDirectory parent)
Description copied from interface:DocuDirent
Sets the parent Directory.- Specified by:
setParent
in interfaceDocuDirent
- Parameters:
parent
- The parent to set
-
getFileClass
public static FileOps.FileClass getFileClass()
- Returns:
- the FileClass
-
compareTo
public int compareTo(Object arg0)
Description copied from interface:DocuDirent
Comparator using the file name. Compares to a String (for binarySearch) or to another DocuDirent (for sort).- Specified by:
compareTo
in interfaceComparable<Object>
- Specified by:
compareTo
in interfaceDocuDirent
- Parameters:
arg0
- the other Object- See Also:
Comparable.compareTo(java.lang.Object)
-
-