Documentation of 'visad.data.netcdf.in.NetcdfAdapter' Java class
NetcdfAdapter
visad.data.netcdf.in

Class NetcdfAdapter



  • public class NetcdfAdapter
    extends java.lang.Object

    A class for importing a netCDF dataset.

    This implementation uses a Strategy for importing netCDF datasets. The initial strategy is determined from the Java (not JavaBean) property visad.data.netcdf.in.Strategy. If that property is set, then its values is used as the name of the initial Strategy class to use. If that property is not set, then the initial strategy is Strategy.DEFAULT. See, however, setDefaultStrategy(Strategy).

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String IMPORT_STRATEGY_PROPERTY
      The name of the import-strategy Java property.
    • Constructor Summary

      Constructors 
      Constructor and Description
      NetcdfAdapter(ucar.netcdf.Netcdf netcdf, QuantityDB quantityDB)
      Constructs from a netCDF dataset.
      NetcdfAdapter(ucar.netcdf.Netcdf netcdf, QuantityDB quantityDB, boolean charToText)
      Constructs from a netCDF dataset.
      NetcdfAdapter(View view)
      Constructs from a view of a netCDF dataset.
    • Field Detail

      • IMPORT_STRATEGY_PROPERTY

        public static final java.lang.String IMPORT_STRATEGY_PROPERTY
        The name of the import-strategy Java property. (NOTE: A Java property is not a JavaBean property.)
        See Also:
        Constant Field Values
    • Constructor Detail

      • NetcdfAdapter

        public NetcdfAdapter(ucar.netcdf.Netcdf netcdf,
                             QuantityDB quantityDB)
                      throws VisADException,
                             java.rmi.RemoteException,
                             java.io.IOException,
                             BadFormException
        Constructs from a netCDF dataset.
        Parameters:
        netcdf - The netCDF dataset to be adapted.
        quantityDB - A quantity database to be used to map netCDF variables to VisAD Quantitys.
        Throws:
        VisADException - Problem in core VisAD. Probably some VisAD object couldn't be created.
        java.rmi.RemoteException - Remote data access failure.
        java.io.IOException - Data access I/O failure.
        BadFormException - Non-conforming netCDF dataset.
      • NetcdfAdapter

        public NetcdfAdapter(ucar.netcdf.Netcdf netcdf,
                             QuantityDB quantityDB,
                             boolean charToText)
                      throws VisADException,
                             java.rmi.RemoteException,
                             java.io.IOException,
                             BadFormException
        Constructs from a netCDF dataset.
        Parameters:
        netcdf - The netCDF dataset to be adapted.
        quantityDB - A quantity database to be used to map netCDF variables to VisAD Quantitys.
        charToText - Specifies whether the NetcdfAdapter should map char variables to VisAD Text objects
        Throws:
        VisADException - Problem in core VisAD. Probably some VisAD object couldn't be created.
        java.rmi.RemoteException - Remote data access failure.
        java.io.IOException - Data access I/O failure.
        BadFormException - Non-conforming netCDF dataset.
      • NetcdfAdapter

        public NetcdfAdapter(View view)
        Constructs from a view of a netCDF dataset.
        Parameters:
        view - The view of the netCDF dataset to be adapted.
    • Method Detail

      • setDefaultStrategy

        public static Strategy setDefaultStrategy(Strategy strategy)
        Sets the default strategy used to import a netCDF dataset. Subsequent use of the getData() method will use the given strategy.
        Parameters:
        strategy - The default strategy to use.
        Returns:
        The previous strategy.
        Throws:
        java.lang.NullPointerException - if the strategy is null.
      • getDefaultStrategy

        public static Strategy getDefaultStrategy()
        Returns the default strategy used to import a netCDF dataset.
        Returns:
        The default strategy.
      • getData

        public DataImpl getData()
                         throws java.io.IOException,
                                VisADException,
                                java.rmi.RemoteException,
                                BadFormException,
                                java.lang.OutOfMemoryError

        Gets the VisAD data object corresponding to the netCDF dataset. This is a potentially expensive method in either time or space.

        This implementation invokes method getData(Strategy) with the default Strategy.

        Returns:
        The top-level, VisAD data object in the netCDF dataset.
        Throws:
        VisADException - Problem in core VisAD. Probably some VisAD object couldn't be created.
        java.io.IOException - Data access I/O failure.
        BadFormException - netCDF dataset doesn't conform to conventions implicit in the View that was passed to the constructor.
        java.lang.OutOfMemoryError - Couldn't read netCDF dataset into memory.
        java.rmi.RemoteException - if a Java RMI failure occurs.
        See Also:
        getData(Strategy)
      • getData

        public DataImpl getData(Strategy strategy)
                         throws java.io.IOException,
                                VisADException,
                                java.rmi.RemoteException,
                                BadFormException,
                                java.lang.OutOfMemoryError
        Gets the VisAD data object corresponding to the netCDF dataset using a given strategy. This is a potentially expensive method in either time or space.

        Parameters:
        strategy - The strategy to use for importing the data.
        Returns:
        The top-level, VisAD data object in the netCDF dataset.
        Throws:
        VisADException - Problem in core VisAD. Probably some VisAD object couldn't be created.
        java.io.IOException - Data access I/O failure.
        BadFormException - netCDF dataset doesn't conform to conventions implicit in the View that was passed to the constructor.
        java.lang.OutOfMemoryError - Couldn't read netCDF dataset into memory.
        java.rmi.RemoteException - if a Java RMI failure occurs.
      • getProxy

        public DataImpl getProxy()
                          throws java.io.IOException,
                                 VisADException,
                                 java.rmi.RemoteException,
                                 BadFormException,
                                 java.lang.OutOfMemoryError
        Returns a proxy for the VisAD data object corresponding to the netCDF dataset. Because of the way import strategies are used, this just invokes the getData() method.
        Returns:
        A proxy for the top-level, VisAD data object in the netCDF dataset.
        Throws:
        VisADException - Problem in core VisAD. Probably some VisAD object couldn't be created.
        java.io.IOException - Data access I/O failure.
        BadFormException - netCDF dataset doesn't conform to conventions implicit in constructing View.
        java.lang.OutOfMemoryError - Couldn't read netCDF dataset into memory.
        java.rmi.RemoteException - if a Java RMI failure occurs.
        See Also:
        Strategy.getData(visad.data.netcdf.in.NetcdfAdapter)
      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Tests this class.
        Parameters:
        args - File pathnames.
        Throws:
        java.lang.Exception - Something went wrong.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.