org.hd.d.pg2k.svrCore
Class ExhibitFile

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.ExhibitFile

public final class ExhibitFile
extends java.lang.Object

Routines to handle the filesystem representation of an exhibit. This absorbs some functionality buried in the old ImageInfoCache classes and methods.


Constructor Summary
ExhibitFile()
           
 
Method Summary
static java.util.Set<Name.ExhibitFull> getFilesystemBasedExhibitNames(SimpleLoggerIF logger, java.io.File baseDir, boolean checkFileContent)
          Collect a set of names of exhibits in the filesystem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExhibitFile

public ExhibitFile()
Method Detail

getFilesystemBasedExhibitNames

public static java.util.Set<Name.ExhibitFull> getFilesystemBasedExhibitNames(SimpleLoggerIF logger,
                                                                             java.io.File baseDir,
                                                                             boolean checkFileContent)
Collect a set of names of exhibits in the filesystem. Given the base directory, this collects a set of files that appear syntactically valid as exhibit names. The result is a Set of String valid exhibit names.

For systems (such as Windows) where the directory separator is not '/' it is converted to this internally to provide the canonical name format.

These are not checked to exist or contain valid data unless checkFileContent is true though the directories encountered are always checked to be directories.

The names returned omit the base directory.

The names are collected in parallel if possible.

The returned Set is mutable and thread-safe.

Files are always checked for a recognised file extension.

TODO: refactor to use JDK7 fork/join model when available.

Parameters:
logger - logger to write to; never null
checkFileContent - if true, any putative exhibit is checked for readability and for a correct magic number

DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.