Class OpendapReaderList

java.lang.Object
noaa.coastwatch.io.AbstractReaderList
noaa.coastwatch.io.OpendapReaderList
All Implemented Interfaces:
ReaderList

public class OpendapReaderList extends AbstractReaderList
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 Details

    • OpendapReaderList

      public OpendapReaderList(CatalogQueryAgent agent) throws IOException
      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

      public CatalogQueryAgent.Entry getEntry(int index)
      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

      public EarthTransform 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

      public Date getStartDate(int index)
      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

      public DataVariable getVariable(int index, String varName) throws IOException
      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

      public EarthDataReader getReader(int index) throws IOException
      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.