ucar.nc2.ft.point.standard
Class PointDatasetStandardFactory

java.lang.Object
  extended by ucar.nc2.ft.point.standard.PointDatasetStandardFactory
All Implemented Interfaces:
FeatureDatasetFactory

public class PointDatasetStandardFactory
extends Object
implements FeatureDatasetFactory

Standard handler for Point obs dataset based on a NetcdfDataset object. Registered with FeatureDatasetFactoryManager. The convention-specific stuff is handled by TableAnayser.

Author:
caron

Constructor Summary
PointDatasetStandardFactory()
           
 
Method Summary
 FeatureType[] getFeatureType()
          This Factory can open these types of Feature datasets.
 Object isMine(FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog)
          Check if this is a POINT datatype.
static void main(String[] args)
           
 FeatureDataset open(FeatureType wantFeatureType, NetcdfDataset ncd, Object analyser, CancelTask task, Formatter errlog)
          Open a NetcdfDataset as a FeatureDataset.
static void setDebugFlags(DebugFlags debugFlags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointDatasetStandardFactory

public PointDatasetStandardFactory()
Method Detail

setDebugFlags

public static void setDebugFlags(DebugFlags debugFlags)

isMine

public Object isMine(FeatureType wantFeatureType,
                     NetcdfDataset ds,
                     Formatter errlog)
              throws IOException
Check if this is a POINT datatype. If so, a TableAnalyser is used to analyze its structure. The TableAnalyser is reused when the dataset is opened.
  1. Can handle ANY_POINT FeatureType.
  2. Must have time, lat, lon axis (from CoordSysBuilder)
  3. Call TableAnalyzer.factory() to create a TableAnalyzer
  4. TableAnalyzer must agree it can handle the requested FeatureType

Specified by:
isMine in interface FeatureDatasetFactory
Parameters:
wantFeatureType - desired feature type, null means FeatureType.ANY_POINT
ds - analyse this dataset
errlog - log error messages here (may not be null)
Returns:
if successful, return non-null. This object is then passed back into open(), so analysis can be reused.
Throws:
IOException

open

public FeatureDataset open(FeatureType wantFeatureType,
                           NetcdfDataset ncd,
                           Object analyser,
                           CancelTask task,
                           Formatter errlog)
                    throws IOException
Description copied from interface: FeatureDatasetFactory
Open a NetcdfDataset as a FeatureDataset. Should only be called if isMine() returns non-null.

Specified by:
open in interface FeatureDatasetFactory
Parameters:
wantFeatureType - open as this feature type. If null, open as any feature type.
ncd - an already opened NetcdfDataset.
analyser - the object returned from isMine(). Likely given to a different instance of FeatureDatasetFactory
task - user may cancel, may be null
errlog - write error messages here, may be null
Returns:
a subclass of FeatureDataset
Throws:
IOException - on error

getFeatureType

public FeatureType[] getFeatureType()
Description copied from interface: FeatureDatasetFactory
This Factory can open these types of Feature datasets.

Specified by:
getFeatureType in interface FeatureDatasetFactory
Returns:
array of FeatureType

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.