ucar.nc2.ft
Interface FeatureDatasetFactory

All Known Implementing Classes:
PointDatasetStandardFactory

public interface FeatureDatasetFactory

Interface for factories that wrap a NetcdfDataset with a FeatureDataset. Class must have a no-arg Constructor.

Since:
Mar 19, 2008
Author:
caron

Method Summary
 FeatureDatasetFactory copy()
          Copy constructor.
 boolean isMine(FeatureType ftype, NetcdfDataset ncd)
          Determine if the factory can open this dataset as an instance of the given feature type
 FeatureDataset open(FeatureType ftype, NetcdfDataset ncd, CancelTask task, java.util.Formatter errlog)
          Open a NetcdfDataset as a FeatureDataset.
 

Method Detail

isMine

boolean isMine(FeatureType ftype,
               NetcdfDataset ncd)
               throws java.io.IOException
Determine if the factory can open this dataset as an instance of the given feature type

Parameters:
ftype - can factory open as this feature type? If null, can factory open as any feature type?
ncd - examine this NetcdfDataset.
Returns:
true if this class knows how to create a FeatureDataset out of this NetcdfDataset.
Throws:
java.io.IOException

copy

FeatureDatasetFactory copy()
Copy constructor. since isMine can be expensive, make copy instead of reanalyze

Returns:
copy of this factory.

open

FeatureDataset open(FeatureType ftype,
                    NetcdfDataset ncd,
                    CancelTask task,
                    java.util.Formatter errlog)
                    throws java.io.IOException
Open a NetcdfDataset as a FeatureDataset. Should only be called if isMine() return true.

Parameters:
ftype - open as this feature type. If null, open as any feature type.
ncd - an already opened NetcdfDataset.
task - user may cancel
errlog - place errors here
Returns:
a subclass of FeatureDataset
Throws:
java.io.IOException - on error