Package gov.nasa.worldwind.data
Interface DataRasterReaderFactory
-
- All Known Implementing Classes:
BasicDataRasterReaderFactory
public interface DataRasterReaderFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataRasterReaderfindReaderFor(java.lang.Object source, AVList params)Search the list of available data raster readers for one that will read a specified data source.DataRasterReaderfindReaderFor(java.lang.Object source, AVList params, DataRasterReader[] readers)Search a specified list of data raster readers for one that will read a specified data source.DataRasterReader[]getReaders()Returns this class' list of readers.
-
-
-
Method Detail
-
findReaderFor
DataRasterReader findReaderFor(java.lang.Object source, AVList params)
Search the list of available data raster readers for one that will read a specified data source. The determination is based on both the data type and the data source reference; some readers may be able to open data of the corresponding type but not as, for example, an InputStream or a URL.The list of readers searched is determined by the DataRasterReaderFactory associated with the current
Configuration, as specified by theAVKey.DATA_RASTER_READER_FACTORY_CLASS_NAME. If no factory is specified in the configuration,BasicDataRasterReaderFactoryis used.- Parameters:
source- the source to read. May by aFile, a file path, a URL or anInputStream.params- optional metadata associated with the data source that might be useful in determining the data reader. TODO: How does the caller determine which parameters are necessary or useful?- Returns:
- a data reader for the specified source, or null if no reader can be found.
- Throws:
java.lang.IllegalArgumentException- if the source is null.
-
findReaderFor
DataRasterReader findReaderFor(java.lang.Object source, AVList params, DataRasterReader[] readers)
Search a specified list of data raster readers for one that will read a specified data source. The determination is based on both the data type and the data source reference; some readers may be able to open data of the corresponding type but not as, for example, an InputStream or a URL.- Parameters:
source- the source to read. May by aFile, a file path, a URL or anInputStream.params- optional metadata associated with the data source that might be useful in determining the data reader.readers- the list of readers to search.- Returns:
- a data reader for the specified source, or null if no reader can be found.
- Throws:
java.lang.IllegalArgumentException- if either the source or the reader list is null.
-
getReaders
DataRasterReader[] getReaders()
Returns this class' list of readers.- Returns:
- the list of readers.
-
-