public class DirectoryBuilder extends Object
Constructor and Description |
---|
DirectoryBuilder(String topCollectionName,
Path dir,
BasicFileAttributes attr)
Create a DirectoryBuilder for the named directory
|
DirectoryBuilder(String topCollectionName,
String dirFilename) |
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,
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) throws IOException
IOException
public DirectoryBuilder(String topCollectionName, Path dir, BasicFileAttributes attr) throws IOException
topCollectionName
- from config, name of the collectiondir
- covers this directoryattr
- file attributes, may be nullIOException
public static MCollection factory(FeatureCollectionConfig config, Path topDir, boolean isTop, IndexReader indexReader, org.slf4j.Logger logger) throws IOException
IOException
public boolean findIndex() throws IOException
IOException
public List<DirectoryBuilder> constructChildren(IndexReader indexReader, CollectionUpdateType forceCollection) throws IOException
indexReader
- this reads the index, and calls AddChild.addchild() for each childIOException
public List<DirectoryBuilder> constructChildrenFromIndex(IndexReader indexReader, boolean substituteParentDir) throws IOException
IOException
public List<MFile> readFilesFromIndex(IndexReader indexReader) throws IOException
IOException
public Path getDir()
public Path getIndex()
public List<DirectoryBuilder> getChildren()
public String getPartitionName()
public void show(Formatter out)
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.