public interface DataProvider
file loaders
.
This interface defines a generic way to explore some collection holding data files and load some of them. The collection may be a list of resources in the classpath, a directories tree in filesystem, a zip or jar archive, a database, a connexion to a remote server ...
The proper way to use this interface is to configure one or more
implementations and register them in the data
providers manager singleton
, or to let this manager use its default
configuration. Once registered, they will be used automatically whenever
some data needs to be loaded. This allow high level applications developers
to customize Orekit data loading mechanism and get a tighter integration of
the library within their application.
DataLoader
,
DataProvidersManager
Modifier and Type | Field and Description |
---|---|
static Pattern |
ZIP_ARCHIVE_PATTERN
Pattern for name of zip/jar archives.
|
Modifier and Type | Method and Description |
---|---|
boolean |
feed(Pattern supported,
DataLoader visitor)
Deprecated.
Use
feed(Pattern, DataLoader, DataProvidersManager) instead
which allows specifying the DataProvidersManager to use for filtering
resources. This method uses the default instance:
DataProvidersManager.getInstance() . |
default boolean |
feed(Pattern supported,
DataLoader visitor,
DataProvidersManager manager)
Feed a data file loader by browsing the data collection.
|
static final Pattern ZIP_ARCHIVE_PATTERN
@Deprecated @DefaultDataContext boolean feed(Pattern supported, DataLoader visitor)
feed(Pattern, DataLoader, DataProvidersManager)
instead
which allows specifying the DataProvidersManager
to use for filtering
resources. This method uses the default instance:
DataProvidersManager.getInstance()
.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
.
supported
- pattern for file names supported by the visitorvisitor
- data file visitor to usedefault boolean feed(Pattern supported, DataLoader visitor, DataProvidersManager manager)
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
.
The default implementation will be removed in 11.0. It calls feed(Pattern, DataLoader)
.
supported
- pattern for file names supported by the visitorvisitor
- data file visitor to usemanager
- with the filters to apply to the resources.Copyright © 2002-2020 CS Group. All rights reserved.