Package noaa.coastwatch.io
Class OpendapReaderList
java.lang.Object
noaa.coastwatch.io.AbstractReaderList
noaa.coastwatch.io.OpendapReaderList
- All Implemented Interfaces:
ReaderList
An
OpendapReaderList
holds a list of OpendapReader
objects created through the use
of the data URL entries in the results of a CatalogQueryAgent
. The readers are special in
that they provide efficient access to the earth transform and start
dates of the OPeNDAP datasets without the I/O overhead of having to
open and read the DAS and DDS for each dataset. Variables returned
from the OPeNDAP readers are efficient for interactive data access
as they listen through the DataVariable.setAccessHint(int[], int[], int[])
method so that only the
data that is required is downloaded from the OPeNDAP server.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionCreates a new list from entries returned by the query agent. -
Method Summary
Modifier and TypeMethodDescriptiongetEntry
(int index) Gets the catalog entry for the specified index.getReader
(int index) Gets the specified earth data reader.getStartDate
(int index) Gets the starting date for the specified reader.Gets the earth transform for this list.getVariable
(int index, String varName) Gets a variable from the specified reader.int
size()
Gets the number of readers in this list.Methods inherited from class noaa.coastwatch.io.AbstractReaderList
getClosestIndex
-
Constructor Details
-
OpendapReaderList
Creates a new list from entries returned by the query agent.- Parameters:
agent
- the query agent to use for entries.- Throws:
IOException
- if an error occurred performing the entries query.
-
-
Method Details
-
getEntry
Gets the catalog entry for the specified index.- Parameters:
index
- the index of the entry to retrieve.- Returns:
- the catalog entry at the specified index.
-
getTransform
Description copied from interface:ReaderList
Gets the earth transform for this list. -
size
public int size()Description copied from interface:ReaderList
Gets the number of readers in this list. -
getStartDate
Description copied from interface:ReaderList
Gets the starting date for the specified reader.- Parameters:
index
- the reader index to query.- Returns:
- the starting date for the specified reader.
-
getVariable
Description copied from interface:ReaderList
Gets a variable from the specified reader.- Parameters:
index
- the reader index to query.varName
- the variable name to retrieve.- Returns:
- the data variable from the reader.
- Throws:
IOException
- if an error occurred accessing the variable.
-
getReader
Description copied from interface:ReaderList
Gets the specified earth data reader. This method is probably I/O intensive and should only be used when necessary.- Parameters:
index
- the reader index to return.- Returns:
- the reader at the specified index.
- Throws:
IOException
- if an error occurred accessing the reader.
-