public class DirectoryBuilder extends Object
| Constructor and Description |
|---|
DirectoryBuilder(String topCollectionName,
java.nio.file.Path dir,
java.nio.file.attribute.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,
java.nio.file.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
|
java.nio.file.Path |
getDir()
The directory that the partition covers
|
java.nio.file.Path |
getIndex()
The ncx2 file
|
String |
getPartitionName() |
List<MFile> |
readFilesFromIndex(IndexReader indexReader) |
void |
show(Formatter out) |
public DirectoryBuilder(String topCollectionName, String dirFilename) throws IOException
IOExceptionpublic DirectoryBuilder(String topCollectionName, java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attr) throws IOException
topCollectionName - from config, name of the collectiondir - covers this directoryattr - file attributes, may be nullIOExceptionpublic static MCollection factory(FeatureCollectionConfig config, java.nio.file.Path topDir, boolean isTop, IndexReader indexReader, 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 java.nio.file.Path getDir()
public java.nio.file.Path getIndex()
public List<DirectoryBuilder> getChildren()
public String getPartitionName()
public void show(Formatter out)
Copyright © 1999-2015 UCAR/Unidata. All Rights Reserved.