use of digilib.io.Directory in project digilib by robcast.
the class IndexMetaDirMeta method readParentMeta.
/**
* Read metadata from all known parent directories.
* @param dir
*/
public void readParentMeta(DocuDirectory dir) {
// check the parent directories for additional file meta
Directory pd = dir.getParent();
String path = dir.getDir().getName();
while (pd != null) {
DocuDirectory dd = (DocuDirectory) pd;
dd.checkMeta();
IndexMetaDirMeta dm = (IndexMetaDirMeta) dd.getMeta();
if (dm.hasUnresolvedFileMeta()) {
readFileMeta(dir, dm.getUnresolvedFileMeta(), path);
}
// prepend parent dir path
path = pd.getDir().getName() + "/" + path;
// become next parent
pd = pd.getParent();
}
}
Aggregations