ucar.nc2.dt.trajectory
Class Float10TrajectoryObsDataset

java.lang.Object
  extended by ucar.nc2.dt.TypedDatasetImpl
      extended by ucar.nc2.dt.trajectory.Float10TrajectoryObsDataset
All Implemented Interfaces:
TrajectoryObsDataset, TypedDataset, TypedDatasetFactoryIF

public class Float10TrajectoryObsDataset
extends TypedDatasetImpl
implements TypedDatasetFactoryIF

Implements TrajectoryDataset for datasets with these characteristics:

Since:
Feb 22, 2005T5:37:14 PM
Author:
edavis

Field Summary
protected  Variable elevVar
           
protected  double elevVarUnitsConversionFactor
           
protected  Variable latVar
           
protected  Variable lonVar
           
protected static SimpleUnit meterUnit
           
protected  Structure recordVar
           
protected  Dimension timeDim
           
protected  Variable timeVar
           
protected  java.lang.String timeVarUnitsString
           
protected  Dimension trajDim
           
protected  java.util.List trajectories
           
protected  java.util.HashMap trajectoriesMap
           
protected  java.util.List trajectoryIds
           
protected  int trajectoryNumPoint
           
protected  java.util.HashMap trajectoryVarsMap
           
protected  Variable trajVar
           
 
Fields inherited from class ucar.nc2.dt.TypedDatasetImpl
boundingBox, dataVariables, desc, endDate, location, ncfile, parseInfo, startDate, title
 
Constructor Summary
Float10TrajectoryObsDataset()
           
Float10TrajectoryObsDataset(NetcdfFile ncd)
           
 
Method Summary
 java.lang.String getDetailInfo()
          Show debug / underlying implementation details
protected static double getMetersConversionFactor(java.lang.String unitsString)
           
 DataType getScientificDataType()
          What kind of cientific data type will this return?
 java.util.List getTrajectories()
          Get trajectories contained in this dataset.
 TrajectoryObsDatatype getTrajectory(java.lang.String trajectoryId)
          Get the named trajectory
 java.util.List getTrajectoryIds()
          Get a list of String IDs for the available trajectories.
 boolean isMine(NetcdfDataset ds)
          Determine if this dataset belongs to you
static boolean isValidFile(NetcdfDataset ds)
           
 TypedDataset open(NetcdfDataset ncd, CancelTask task, java.lang.StringBuffer errlog)
          Open a NetcdfDataset as a TypedDataset.
protected  void setBoundingBox()
           
protected  void setEndDate()
           
protected  void setStartDate()
           
 void setTrajectoryInfo(Dimension trajDim, Variable trajVar, Dimension timeDim, Variable timeVar, Variable latVar, Variable lonVar, Variable elevVar)
          Setup needed for all MultiTrajectoryObsDatatypes.
 boolean syncExtend()
          Syncronize with the underlying dataset if it has been extended in a way that is compatible with the existing structural metadata (for instance, if the unlimited dimension has grown).
 
Methods inherited from class ucar.nc2.dt.TypedDatasetImpl
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle, removeDataVariable, setDescription, setLocationURI, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.nc2.dt.TypedDataset
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle
 

Field Detail

trajDim

protected Dimension trajDim

trajVar

protected Variable trajVar

timeDim

protected Dimension timeDim

timeVar

protected Variable timeVar

recordVar

protected Structure recordVar

latVar

protected Variable latVar

lonVar

protected Variable lonVar

elevVar

protected Variable elevVar

timeVarUnitsString

protected java.lang.String timeVarUnitsString

elevVarUnitsConversionFactor

protected double elevVarUnitsConversionFactor

trajectoryIds

protected java.util.List trajectoryIds

trajectories

protected java.util.List trajectories

trajectoriesMap

protected java.util.HashMap trajectoriesMap

trajectoryNumPoint

protected int trajectoryNumPoint

trajectoryVarsMap

protected java.util.HashMap trajectoryVarsMap

meterUnit

protected static SimpleUnit meterUnit
Constructor Detail

Float10TrajectoryObsDataset

public Float10TrajectoryObsDataset()

Float10TrajectoryObsDataset

public Float10TrajectoryObsDataset(NetcdfFile ncd)
                            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

isValidFile

public static boolean isValidFile(NetcdfDataset ds)

isMine

public boolean isMine(NetcdfDataset ds)
Description copied from interface: TypedDatasetFactoryIF
Determine if this dataset belongs to you

Specified by:
isMine in interface TypedDatasetFactoryIF
Parameters:
ds - examine this NetcdfDataset to see if it belongs to this class.
Returns:
true if this class knows how to create a TypedDataset out of this NetcdfDataset.

open

public TypedDataset open(NetcdfDataset ncd,
                         CancelTask task,
                         java.lang.StringBuffer errlog)
                  throws java.io.IOException
Description copied from interface: TypedDatasetFactoryIF
Open a NetcdfDataset as a TypedDataset.

Specified by:
open in interface TypedDatasetFactoryIF
Parameters:
ncd - already opened NetcdfDataset.
task - use may cancel
errlog - place errors here
Returns:
a subclass of TypedDataset
Throws:
java.io.IOException - on error

getScientificDataType

public DataType getScientificDataType()
Description copied from interface: TypedDatasetFactoryIF
What kind of cientific data type will this return?

Specified by:
getScientificDataType in interface TypedDatasetFactoryIF
Returns:
scientific data type

setTrajectoryInfo

public void setTrajectoryInfo(Dimension trajDim,
                              Variable trajVar,
                              Dimension timeDim,
                              Variable timeVar,
                              Variable latVar,
                              Variable lonVar,
                              Variable elevVar)
                       throws java.io.IOException
Setup needed for all MultiTrajectoryObsDatatypes. Units of time varible must be udunits time units. Units of latitude variable must be convertible to "degrees_north" by udunits. Units of longitude variable must be convertible to "degrees_east" by udunits. Units of altitude variable must be convertible to "meters" by udunits.

Throws:
java.lang.IllegalArgumentException - if units of time, latitude, longitude, or altitude variables are not as required.
java.io.IOException

getMetersConversionFactor

protected static double getMetersConversionFactor(java.lang.String unitsString)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

syncExtend

public boolean syncExtend()
Description copied from interface: TrajectoryObsDataset
Syncronize with the underlying dataset if it has been extended in a way that is compatible with the existing structural metadata (for instance, if the unlimited dimension has grown). Return true if syncronization was needed and sucessful. Otherwise, return false. NOTE: For now, assuming growth of the unlimited dimension only allowed change. To get range for new extent only, use getRange( oldNumPoints + 1, newNumPoints, 1)

Specified by:
syncExtend in interface TrajectoryObsDataset
Returns:
true if syncronization was needed and sucessful, otherwise false.

setStartDate

protected void setStartDate()
Specified by:
setStartDate in class TypedDatasetImpl

setEndDate

protected void setEndDate()
Specified by:
setEndDate in class TypedDatasetImpl

setBoundingBox

protected void setBoundingBox()
Specified by:
setBoundingBox in class TypedDatasetImpl

getTrajectoryIds

public java.util.List getTrajectoryIds()
Description copied from interface: TrajectoryObsDataset
Get a list of String IDs for the available trajectories.

Specified by:
getTrajectoryIds in interface TrajectoryObsDataset

getTrajectories

public java.util.List getTrajectories()
Description copied from interface: TrajectoryObsDataset
Get trajectories contained in this dataset.

Specified by:
getTrajectories in interface TrajectoryObsDataset
Returns:
List of type TrajectoryObsDatatype.

getTrajectory

public TrajectoryObsDatatype getTrajectory(java.lang.String trajectoryId)
Description copied from interface: TrajectoryObsDataset
Get the named trajectory

Specified by:
getTrajectory in interface TrajectoryObsDataset

getDetailInfo

public java.lang.String getDetailInfo()
Description copied from interface: TypedDataset
Show debug / underlying implementation details

Specified by:
getDetailInfo in interface TypedDataset
Overrides:
getDetailInfo in class TypedDatasetImpl