|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.netcdf.in.Strategy visad.data.netcdf.in.FileStrategy
public class FileStrategy
Provides support for importing netCDF datasets using the strategy of
employing FileFlatField
s wherever possible, but merging
the data so as to keep the number of FileFlatField
s to a
minimum.
This class may be subclassed in order to use a different data merger tactic
-- one that maximizes the number of FileFlatField
s, for
example (see getMerger()
).
Instances are immutable.
Field Summary |
---|
Fields inherited from class visad.data.netcdf.in.Strategy |
---|
DEFAULT, IN_MEMORY, MERGED_FILE_FLAT_FIELDS, UNMERGED_FILE_FLAT_FIELDS |
Constructor Summary | |
---|---|
protected |
FileStrategy()
Constructs from nothing. |
Method Summary | |
---|---|
DataImpl |
getData(NetcdfAdapter adapter)
Returns a VisAD data object corresponding to the netCDF dataset. |
protected Merger |
getMerger()
Returns the Merger for cosolidating virtual data objects together. |
static Strategy |
instance()
Returns an instance of this class. |
static void |
main(String[] args)
Tests this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FileStrategy()
instance()
method.
instance()
Method Detail |
---|
public static Strategy instance()
public DataImpl getData(NetcdfAdapter adapter) throws IOException, VisADException, RemoteException, BadFormException, OutOfMemoryError
getMerger()
.
getData
in class Strategy
adapter
- The netCDF-to-VisAD adapter.
VisADException
- if a problem occurs in core VisAD -- probably
because a VisAD object couldn't be created.
IOException
- if a data access I/O failure occurs.
BadFormException
- if the netCDF dataset doesn't conform to
conventions implicit in constructing
View.
OutOfMemoryError
- if the netCDF dataset couldn't be imported into
memory.
RemoteException
- if a Java RMI failure occurs.getMerger()
protected Merger getMerger()
Merger.instance()
. This
method may be overridden in subclasses to supply a different merger
strategy (e.g. maximizing the number of FileFlatField-s).
Merger
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 |