|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.data.DirectoryCrawler
public class DirectoryCrawler
Provider for data files stored in a directories tree on filesystem.
This class handles data files recursively starting from a root directories tree. The organization of files in the directories is free. There may be sub-directories to any level. All sub-directories are browsed and all terminal files are checked for loading.
Gzip-compressed files are supported.
Zip archives entries are supported recursively.
This is a simple application of the visitor
design pattern for
directory hierarchy crawling.
DataProvidersManager
Field Summary |
---|
Fields inherited from interface org.orekit.data.DataProvider |
---|
GZIP_FILE_PATTERN, ZIP_ARCHIVE_PATTERN |
Constructor Summary | |
---|---|
DirectoryCrawler(File root)
Build a data files crawler. |
Method Summary | |
---|---|
boolean |
feed(Pattern supported,
DataLoader visitor)
Feed a data file loader by browsing the data collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectoryCrawler(File root) throws OrekitException
root
- root of the directories tree (must be a directory)
OrekitException
- if root is not a directoryMethod Detail |
---|
public boolean feed(Pattern supported, DataLoader visitor) throws OrekitException
The method crawls all files referenced in the instance (for example all files in a directories tree) and for each file supported by the file loader it asks the file loader to load it.
If the method completes without exception, then the data loader
is considered to have been fed successfully and the top level
data providers manager
will return
immediately without attempting to use the next configured providers.
If the method completes abruptly with an exception, then the top level
data providers manager
will try to use
the next configured providers, in case another one can feed the
data loader
.
feed
in interface DataProvider
supported
- pattern for file names supported by the visitorvisitor
- data file visitor to use
OrekitException
- if the data loader cannot be fed
(read error ...)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |