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
dirFields inherited from class digilib.io.DocuDirectory
dirMTime, dirName, fileClass, files, isValid, logger, meta, objectATime, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(String path, FileOps.FileClass fileClass, DigilibConfiguration dlConfig) Configure object with digilib directory path and a parent DocuDirCache.booleanreadDir()Read the filesystem directory and fill this object.booleanrefresh()Check to see if the directory has been modified and reread if necessary.Methods inherited from class digilib.io.FsDocuDirectory
createFilename, createParentName, getDir, getFilenames, getParentDirectoryMethods inherited from class digilib.io.DocuDirectory
checkMeta, find, get, getAccessTime, getDirMTime, getDirName, getMeta, getParent, indexOf, isBasenameAt, isPrefixBasenameAt, isRead, isValid, iterator, readMeta, setParent, size, touchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
configurein classDocuDirectory- Parameters:
path- digilib directory path namefileClass- the FileClassdlConfig- the DigilibConfiguration- See Also:
-
readDir
public boolean readDir()Description copied from class:DocuDirectoryRead the filesystem directory and fill this object. Clears the List and (re)reads all files.- Specified by:
readDirin classFsDocuDirectory- Returns:
- boolean the directory exists
-
refresh
public boolean refresh()Description copied from class:DocuDirectoryCheck to see if the directory has been modified and reread if necessary.- Specified by:
refreshin classDocuDirectory- Returns:
- boolean the directory is valid
-