public class DirectoryBuilder extends Object
| Constructor and Description |
|---|
DirectoryBuilder(String topCollectionName,
Path dir,
BasicFileAttributes attr,
String suffix)
Create a DirectoryBuilder for the named directory
|
DirectoryBuilder(String topCollectionName,
String dirFilename,
String suffix) |
| Modifier and Type | Method and Description |
|---|---|
List<DirectoryBuilder> |
constructChildren(IndexReader indexReader,
CollectionUpdateType forceCollection)
Find all children directories.
|
List<DirectoryBuilder> |
constructChildrenFromIndex(IndexReader indexReader,
boolean substituteParentDir) |
static MCollection |
factory(FeatureCollectionConfig config,
Path topDir,
boolean isTop,
IndexReader indexReader,
String suffix,
org.slf4j.Logger logger) |
boolean |
findIndex()
Find the index file, using its canonical name
|
List<DirectoryBuilder> |
getChildren()
May be null if constructChildren() was not called
|
Path |
getDir()
The directory that the partition covers
|
Path |
getIndex()
The ncx2 file
|
String |
getPartitionName() |
List<MFile> |
readFilesFromIndex(IndexReader indexReader) |
void |
show(Formatter out) |
public DirectoryBuilder(String topCollectionName, String dirFilename, String suffix) throws IOException
IOExceptionpublic DirectoryBuilder(String topCollectionName, Path dir, BasicFileAttributes attr, String suffix) throws IOException
topCollectionName - from config, name of the collectiondir - covers this directoryattr - file attributes, may be nullIOExceptionpublic static MCollection factory(FeatureCollectionConfig config, Path topDir, boolean isTop, IndexReader indexReader, String suffix, org.slf4j.Logger logger) throws IOException
IOExceptionpublic boolean findIndex()
throws IOException
IOExceptionpublic List<DirectoryBuilder> constructChildren(IndexReader indexReader, CollectionUpdateType forceCollection) throws IOException
indexReader - this reads the index, and calls AddChild.addchild() for each childIOExceptionpublic List<DirectoryBuilder> constructChildrenFromIndex(IndexReader indexReader, boolean substituteParentDir) throws IOException
IOExceptionpublic List<MFile> readFilesFromIndex(IndexReader indexReader) throws IOException
IOExceptionpublic Path getDir()
public Path getIndex()
public List<DirectoryBuilder> getChildren()
public String getPartitionName()
public void show(Formatter out)