Package digilib.io
Class DocuDirentImpl
java.lang.Object
digilib.io.DocuDirentImpl
- All Implemented Interfaces:
DocuDirent
,Comparable<Object>
- Direct Known Subclasses:
TextFile
Abstract directory entry in a DocuDirectory.
- Author:
- casties
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static FileOps.FileClass
the file class of this fileprotected FileMeta
metadata for this fileprotected DocuDirectory
the parent directory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Checks metadata and does something with it.int
Comparator using the file name.abstract File
getFile()
static FileOps.FileClass
getMeta()
Returns the meta-data for this file(set).getName()
The name of the file.Returns the parent Directory.void
readMeta()
Reads meta-data for this Fileset if there is any.void
Sets the meta-data for this file(set).void
setParent
(DocuDirectory parent) Sets the parent Directory.
-
Field Details
-
fileClass
the file class of this file -
meta
metadata for this file -
parent
the parent directory
-
-
Constructor Details
-
DocuDirentImpl
public DocuDirentImpl()
-
-
Method Details
-
getFile
-
checkMeta
public abstract void checkMeta()Description copied from interface:DocuDirent
Checks metadata and does something with it.- Specified by:
checkMeta
in interfaceDocuDirent
-
getMeta
Description copied from interface:DocuDirent
Returns the meta-data for this file(set).- Specified by:
getMeta
in interfaceDocuDirent
- Returns:
- the FileMeta
-
setMeta
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
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
Description copied from interface:DocuDirent
Returns the parent Directory.- Specified by:
getParent
in interfaceDocuDirent
- Returns:
- the DocuDirectory
-
setParent
Description copied from interface:DocuDirent
Sets the parent Directory.- Specified by:
setParent
in interfaceDocuDirent
- Parameters:
parent
- The parent to set
-
getFileClass
- Returns:
- the FileClass
-
compareTo
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:
-