visad.data.mcidas
Class AreaForm

java.lang.Object
  extended by visad.data.FormNode
      extended by visad.data.Form
          extended by visad.data.mcidas.AreaForm
All Implemented Interfaces:
FormFileInformer

public class AreaForm
extends Form
implements FormFileInformer

to allow determination of whether a file is of type McIDAS 'area'.


Field Summary
 
Fields inherited from class visad.data.Form
mathType
 
Constructor Summary
AreaForm()
           
 
Method Summary
 void add(java.lang.String id, Data data, boolean replace)
          This has not been implemented
 java.lang.String[] getDefaultSuffixes()
          return a list of suffixes associated with this file type
 FormNode getForms(Data data)
          not implemented yet
 boolean isThisType(byte[] block)
          there is no unique way to identify an AREA file by examning the contents of the first block of data values
 boolean isThisType(java.lang.String name)
          determine the file type by name.
 DataImpl open(java.lang.String path)
          read the area file from local disk, and return the Area file as a DataImpl object (a FlatField).
 DataImpl open(java.net.URL url)
          read the area file from a URL, and return the Area file as a DataImpl object (a FlatField).
 void save(java.lang.String id, Data data, boolean replace)
          save the file back to disk This has not been implemented yet
 
Methods inherited from class visad.data.Form
getMathType
 
Methods inherited from class visad.data.FormNode
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaForm

public AreaForm()
Method Detail

isThisType

public boolean isThisType(java.lang.String name)
determine the file type by name. McIDAS area files begin with the letters: AREA (or area).

Specified by:
isThisType in interface FormFileInformer
Parameters:
name - is the filename in question

isThisType

public boolean isThisType(byte[] block)
there is no unique way to identify an AREA file by examning the contents of the first block of data values

Specified by:
isThisType in interface FormFileInformer
Parameters:
block[] - is an array of ? length from the beginning of the file in question.

getDefaultSuffixes

public java.lang.String[] getDefaultSuffixes()
return a list of suffixes associated with this file type

Specified by:
getDefaultSuffixes in interface FormFileInformer

save

public void save(java.lang.String id,
                 Data data,
                 boolean replace)
          throws BadFormException,
                 java.io.IOException,
                 java.rmi.RemoteException,
                 VisADException
save the file back to disk This has not been implemented yet

Specified by:
save in class FormNode
Throws:
BadFormException
java.io.IOException
java.rmi.RemoteException
VisADException

add

public void add(java.lang.String id,
                Data data,
                boolean replace)
         throws BadFormException
This has not been implemented

Specified by:
add in class FormNode
Throws:
BadFormException

open

public DataImpl open(java.lang.String path)
              throws BadFormException,
                     java.rmi.RemoteException,
                     VisADException
read the area file from local disk, and return the Area file as a DataImpl object (a FlatField).

Specified by:
open in class FormNode
Parameters:
path - is the fully-qualified pathname
Throws:
BadFormException
java.rmi.RemoteException
VisADException

open

public DataImpl open(java.net.URL url)
              throws BadFormException,
                     VisADException,
                     java.io.IOException
read the area file from a URL, and return the Area file as a DataImpl object (a FlatField).

Specified by:
open in class FormNode
Parameters:
path - is the fully-formed URL
Throws:
BadFormException
VisADException
java.io.IOException

getForms

public FormNode getForms(Data data)
not implemented yet

Specified by:
getForms in class FormNode