Package digilib.io
Class BaseDirDocuDirectory
- java.lang.Object
-
- digilib.io.DocuDirectory
-
- digilib.io.FsDocuDirectory
-
- digilib.io.BaseDirDocuDirectory
-
- All Implemented Interfaces:
Iterable<DocuDirent>
public class BaseDirDocuDirectory extends FsDocuDirectory
DocuDirectory implementation that looks for scaled images in parallel paths with different base directories.- Author:
- casties
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]
baseDirNames
list of base directories-
Fields 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 Constructor Description BaseDirDocuDirectory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 Detail
-
baseDirNames
protected String[] baseDirNames
list of base directories
-
-
Method Detail
-
configure
public void configure(String path, FileOps.FileClass fileClass, DigilibConfiguration dlConfig)
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()
-
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
-
-