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