org.iges.grads.server
Class GradsDataInfo

java.lang.Object
  |
  +--org.iges.grads.server.GradsDataInfo
All Implemented Interfaces:
java.io.Serializable

public class GradsDataInfo
extends java.lang.Object
implements java.io.Serializable

Information used by the GradsTool to provide access to a given data object, stored as the ToolInfo object in DataHandles.

See Also:
Serialized Form

Nested Class Summary
 class GradsDataInfo.CTL
          Holds the information needed for the direct subset mechanism.
 
Field Summary
static int CLASSIC
           
protected  long createTime
           
protected  GradsDataInfo.CTL ctl
           
protected  int dataType
           
protected  java.io.File descriptorFile
           
protected  boolean directSubset
           
protected  java.lang.String docURL
           
static int DODS
           
protected  java.lang.String dodsName
           
protected  java.lang.String gradsArgument
           
protected  int gradsBinaryType
           
static int GRID
           
static int HDF
           
protected  java.util.List metadataAttributeList
           
protected  java.util.List metadataFilterList
           
static int NC
           
protected  java.io.File sourceFile
           
static int STN
           
protected  java.lang.String title
           
protected  java.io.File userDAS
           
 
Constructor Summary
GradsDataInfo(java.lang.String dodsName, int gradsBinaryType, java.lang.String gradsArgument, java.io.File descriptorFile, java.io.File sourceFile, java.io.File userDAS, java.lang.String docURL, java.lang.String overrideTitle, boolean directSubset, java.util.List metadataFilterList, java.util.List metadataAttributeList)
          Creates an object containing the necessary info to access and serve a GrADS dataset.
 
Method Summary
 GradsDataInfo.CTL getCTL()
          Returns an object containing the information needed for the direct subset mechanism.
 int getDataType()
          Whether this is a station or gridded dataset.
 java.io.File getDescriptorFile()
          Location on disk of a GrADS descriptor file (which may be only a dummy) describing this dataset.
 java.lang.String getDocURL()
          A URL pointing to additional documentation for this dataset, or null if none
 java.lang.String getDODSName()
          The identifier to be used in generating the DDS for this data object.
 java.lang.String getGradsArgument()
          The argument passed to GrADS to open this dataset (a filename or url).
 int getGradsBinaryType()
          The type of GrADS binary that should be used to open this dataset.
 java.util.List getMetadataAttributes()
           
 java.util.List getMetadataFilters()
           
 java.io.File getSourceFile()
          Location of the dataset, if stored on disk
 java.lang.String getTitle()
          The title of the dataset.
 java.io.File getUserDAS()
          Location on disk of the supplemental DAS, or null if none
 boolean isDirectSubset()
          Indicates whether server should attempt to read data directly from the datafile, without invoking GrADS
protected  void readDescriptor()
          Parses the descriptor file for the dataset to determine whether it is a station or gridded dataset, and extract the title.
 void setCTL(int xSize, int ySize, int zSize, int tSize, java.util.List vars, java.util.List levels)
          Stores the information needed for the direct subset mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRID

public static final int GRID
See Also:
Constant Field Values

STN

public static final int STN
See Also:
Constant Field Values

CLASSIC

public static final int CLASSIC
See Also:
Constant Field Values

NC

public static final int NC
See Also:
Constant Field Values

DODS

public static final int DODS
See Also:
Constant Field Values

HDF

public static final int HDF
See Also:
Constant Field Values

dodsName

protected java.lang.String dodsName

dataType

protected int dataType

gradsBinaryType

protected int gradsBinaryType

gradsArgument

protected java.lang.String gradsArgument

userDAS

protected java.io.File userDAS

descriptorFile

protected java.io.File descriptorFile

docURL

protected java.lang.String docURL

sourceFile

protected java.io.File sourceFile

createTime

protected long createTime

title

protected java.lang.String title

directSubset

protected boolean directSubset

metadataFilterList

protected java.util.List metadataFilterList

metadataAttributeList

protected java.util.List metadataAttributeList

ctl

protected GradsDataInfo.CTL ctl
Constructor Detail

GradsDataInfo

public GradsDataInfo(java.lang.String dodsName,
                     int gradsBinaryType,
                     java.lang.String gradsArgument,
                     java.io.File descriptorFile,
                     java.io.File sourceFile,
                     java.io.File userDAS,
                     java.lang.String docURL,
                     java.lang.String overrideTitle,
                     boolean directSubset,
                     java.util.List metadataFilterList,
                     java.util.List metadataAttributeList)
              throws AnagramException
Creates an object containing the necessary info to access and serve a GrADS dataset.

Method Detail

getUserDAS

public java.io.File getUserDAS()
Location on disk of the supplemental DAS, or null if none


getDocURL

public java.lang.String getDocURL()
A URL pointing to additional documentation for this dataset, or null if none


getDODSName

public java.lang.String getDODSName()
The identifier to be used in generating the DDS for this data object. Usually identical to the complete name of the data handle that owns this info object. But for analysis results, the actual dataset name may not be a legal DODS identifier, so this field contains a usable substitute.


getGradsArgument

public java.lang.String getGradsArgument()
The argument passed to GrADS to open this dataset (a filename or url).


getDescriptorFile

public java.io.File getDescriptorFile()
Location on disk of a GrADS descriptor file (which may be only a dummy) describing this dataset.


getSourceFile

public java.io.File getSourceFile()
Location of the dataset, if stored on disk


getGradsBinaryType

public int getGradsBinaryType()
The type of GrADS binary that should be used to open this dataset.


getDataType

public int getDataType()
Whether this is a station or gridded dataset.


getTitle

public java.lang.String getTitle()
The title of the dataset. Equivalent to DataHandle.getDescription(). Normally this is extracted from the CTL file, but for analysis results the title is generated by the GDS.


isDirectSubset

public boolean isDirectSubset()
Indicates whether server should attempt to read data directly from the datafile, without invoking GrADS


getMetadataFilters

public java.util.List getMetadataFilters()

getMetadataAttributes

public java.util.List getMetadataAttributes()

setCTL

public void setCTL(int xSize,
                   int ySize,
                   int zSize,
                   int tSize,
                   java.util.List vars,
                   java.util.List levels)
Stores the information needed for the direct subset mechanism. This information is determined at extract time rather than at import time, so cannot be passed th the constructor.


getCTL

public GradsDataInfo.CTL getCTL()
Returns an object containing the information needed for the direct subset mechanism.


readDescriptor

protected void readDescriptor()
                       throws AnagramException
Parses the descriptor file for the dataset to determine whether it is a station or gridded dataset, and extract the title. The request handler must know whether the dataset is station or gridded before the metadata is officially extracted, in order to call the correct extracter module. The title must also be read ahead of time in order to produce directory listings.

AnagramException