Package digilib.io
Class BaseDirDocuDirectory
java.lang.Object
digilib.io.DocuDirectory
digilib.io.FsDocuDirectory
digilib.io.BaseDirDocuDirectory
- All Implemented Interfaces:
Iterable<DocuDirent>
DocuDirectory implementation that looks for scaled images in parallel paths
with different base directories.
- Author:
- casties
-
Field Summary
FieldsFields inherited from class digilib.io.FsDocuDirectory
dir
Fields inherited from class digilib.io.DocuDirectory
dirMTime, dirName, fileClass, files, isValid, logger, meta, objectATime, parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(String path, FileOps.FileClass fileClass, DigilibConfiguration dlConfig) Configure object with digilib directory path and a parent DocuDirCache.boolean
readDir()
Read the filesystem directory and fill this object.boolean
refresh()
Check to see if the directory has been modified and reread if necessary.Methods inherited from class digilib.io.FsDocuDirectory
createFilename, createParentName, getDir, getFilenames, getParentDirectory
Methods inherited from class digilib.io.DocuDirectory
checkMeta, find, get, getAccessTime, getDirMTime, getDirName, getMeta, getParent, indexOf, isBasenameAt, isPrefixBasenameAt, isRead, isValid, iterator, readMeta, setParent, size, touch
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
baseDirNames
list of base directories
-
-
Constructor Details
-
BaseDirDocuDirectory
public BaseDirDocuDirectory()
-
-
Method Details
-
configure
Configure object with digilib directory path and a parent DocuDirCache. Directory names at the given path are appended to the base directories from the cache. The directory is checked on disk and isValid is set.- Overrides:
configure
in classDocuDirectory
- Parameters:
path
- digilib directory path namefileClass
- the FileClassdlConfig
- the DigilibConfiguration- See Also:
-
readDir
public boolean readDir()Description copied from class:DocuDirectory
Read the filesystem directory and fill this object. Clears the List and (re)reads all files.- Specified by:
readDir
in classFsDocuDirectory
- Returns:
- boolean the directory exists
-
refresh
public boolean refresh()Description copied from class:DocuDirectory
Check to see if the directory has been modified and reread if necessary.- Specified by:
refresh
in classDocuDirectory
- Returns:
- boolean the directory is valid
-