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.
|
static MCollection |
factory(FeatureCollectionConfig config,
Path topDir,
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() |
boolean |
isLeaf(IndexReader indexReader)
Read the index file to find out if a partition or collection of files
|
List<MFile> |
readFilesFromIndex(IndexReader indexReader) |
void |
show(Formatter out) |
public DirectoryBuilder(String topCollectionName, String dirFilename) throws IOException
IOExceptionpublic DirectoryBuilder(String topCollectionName, Path dir, BasicFileAttributes attr) throws IOException
topCollectionName - from config, name of the collectiondir - covers this directoryattr - file attributes, may be nullIOExceptionpublic static MCollection factory(FeatureCollectionConfig config, Path topDir, IndexReader indexReader, org.slf4j.Logger logger) throws IOException
IOExceptionpublic boolean findIndex()
throws IOException
IOExceptionpublic boolean isLeaf(IndexReader indexReader) throws IOException
indexReader - reads the indexIOException - on IO errorpublic List<DirectoryBuilder> constructChildren(IndexReader indexReader, CollectionUpdateType forceCollection) throws IOException
indexReader - this reads the index, and calls AddChild.addchild() for each childIOExceptionpublic 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)
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.