|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.netcdf.in.NetcdfAdapter
public class NetcdfAdapter
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 | |
---|---|
static String |
IMPORT_STRATEGY_PROPERTY
The name of the import-strategy Java property. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
DataImpl |
getData()
Gets the VisAD data object corresponding to the netCDF dataset. |
DataImpl |
getData(Strategy strategy)
Gets the VisAD data object corresponding to the netCDF dataset using a given strategy. |
static Strategy |
getDefaultStrategy()
Returns the default strategy used to import a netCDF dataset. |
DataImpl |
getProxy()
Returns a proxy for the VisAD data object corresponding to the netCDF dataset. |
protected View |
getView()
Gets the view of the netCDF dataset. |
protected static DataImpl |
importData(View view,
Merger merger,
DataFactory dataFactory)
Returns the VisAD data object corresponding to the netCDF dataset. |
static void |
main(String[] args)
Tests this class. |
static Strategy |
setDefaultStrategy(Strategy strategy)
Sets the default strategy used to import a netCDF dataset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String IMPORT_STRATEGY_PROPERTY
Constructor Detail |
---|
public NetcdfAdapter(ucar.netcdf.Netcdf netcdf, QuantityDB quantityDB) throws VisADException, RemoteException, IOException, BadFormException
netcdf
- The netCDF dataset to be adapted.quantityDB
- A quantity database to be used to map netCDF
variables to VisAD Quantity
s.
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
RemoteException
- Remote data access failure.
IOException
- Data access I/O failure.
BadFormException
- Non-conforming netCDF dataset.public NetcdfAdapter(ucar.netcdf.Netcdf netcdf, QuantityDB quantityDB, boolean charToText) throws VisADException, RemoteException, IOException, BadFormException
netcdf
- The netCDF dataset to be adapted.quantityDB
- A quantity database to be used to map netCDF
variables to VisAD Quantity
s.charToText
- Specifies whether the NetcdfAdapter should
map char variables to VisAD Text objects
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
RemoteException
- Remote data access failure.
IOException
- Data access I/O failure.
BadFormException
- Non-conforming netCDF dataset.public NetcdfAdapter(View view)
view
- The view of the netCDF dataset to be adapted.Method Detail |
---|
public static Strategy setDefaultStrategy(Strategy strategy)
getData()
method will use the given strategy.
strategy
- The default strategy to use.
NullPointerException
- if the strategy is null
.public static Strategy getDefaultStrategy()
public DataImpl getData() throws IOException, VisADException, RemoteException, BadFormException, 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
.
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
IOException
- Data access I/O failure.
BadFormException
- netCDF dataset doesn't conform to conventions
implicit in the View that was passed to the
constructor.
OutOfMemoryError
- Couldn't read netCDF dataset into memory.
RemoteException
- if a Java RMI failure occurs.getData(Strategy)
public DataImpl getData(Strategy strategy) throws IOException, VisADException, RemoteException, BadFormException, OutOfMemoryError
strategy
- The strategy to use for importing the data.
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
IOException
- Data access I/O failure.
BadFormException
- netCDF dataset doesn't conform to conventions
implicit in the View that was passed to the
constructor.
OutOfMemoryError
- Couldn't read netCDF dataset into memory.
RemoteException
- if a Java RMI failure occurs.public DataImpl getProxy() throws IOException, VisADException, RemoteException, BadFormException, OutOfMemoryError
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
IOException
- Data access I/O failure.
BadFormException
- netCDF dataset doesn't conform to conventions
implicit in constructing View.
OutOfMemoryError
- Couldn't read netCDF dataset into memory.
RemoteException
- if a Java RMI failure occurs.Strategy.getData(visad.data.netcdf.in.NetcdfAdapter)
protected static DataImpl importData(View view, Merger merger, DataFactory dataFactory) throws IOException, VisADException, RemoteException, BadFormException, OutOfMemoryError
view
- The view of the netCDF dataset.merger
- The object that merges the data objects in the
netCDF dataset.dataFactory
- The factory that creates VisAD data objects from
virtual data objects.
VisADException
- Problem in core VisAD. Probably some VisAD
object couldn't be created.
IOException
- Data access I/O failure.
BadFormException
- netCDF dataset doesn't conform to conventions
implicit in constructing View.
OutOfMemoryError
- Couldn't read netCDF dataset into memory.
RemoteException
- if a Java RMI failure occurs.Strategy
protected View getView()
public static void main(String[] args) throws Exception
args
- File pathnames.
Exception
- Something went wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |