visad.data.hrit
Class HRITForm

java.lang.Object
  extended by visad.data.FormNode
      extended by visad.data.Form
          extended by visad.data.hrit.HRITForm
All Implemented Interfaces:
FormFileInformer

public class HRITForm
extends Form
implements FormFileInformer

to allow determination of whether a data file is of type HRIT


Field Summary
 
Fields inherited from class visad.data.Form
mathType
 
Constructor Summary
HRITForm()
           
 
Method Summary
 void add(String id, Data data, boolean replace)
          This has not been implemented
 String[] getDefaultSuffixes()
          return a list of suffixes associated with this file type
 FormNode getForms(Data data)
          not implemented yet
 boolean isThisType(byte[] block)
          This method will be used to identify an HRIT file by examining the contents of the first block of data values.
 boolean isThisType(String name)
          determine the file type by name.
 DataImpl open(String path)
          read the HRIT file from local disk, and return the HRIT data as a DataImpl object (a FlatField).
 DataImpl open(URL url)
          read the HRIT file from a URL, and return the HRIT file as a DataImpl object (a FlatField).
 void save(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

HRITForm

public HRITForm()
Method Detail

isThisType

public boolean isThisType(String name)
determine the file type by name. At present we are only checking for MSG2 HRIT files. This will change.

Specified by:
isThisType in interface FormFileInformer
Parameters:
name - is the filename in question
Returns:
true if the name is right for this type of form

isThisType

public boolean isThisType(byte[] block)
This method will be used to identify an HRIT file by examining the contents of the first block of data values. Presently unimplemented.

Specified by:
isThisType in interface FormFileInformer
Parameters:
block - is an array of ? length from the beginning of the file in question.
Returns:
true if the magic number is right

getDefaultSuffixes

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

Specified by:
getDefaultSuffixes in interface FormFileInformer
Returns:
array of suffixes

save

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

Specified by:
save in class FormNode
Throws:
BadFormException
IOException
RemoteException
VisADException

add

public void add(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(String path)
              throws BadFormException,
                     RemoteException,
                     VisADException
read the HRIT file from local disk, and return the HRIT data as a DataImpl object (a FlatField).

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

open

public DataImpl open(URL url)
              throws BadFormException,
                     VisADException,
                     IOException
read the HRIT file from a URL, and return the HRIT file as a DataImpl object (a FlatField).

Specified by:
open in class FormNode
Parameters:
url - is the fully-formed URL
Throws:
BadFormException
VisADException
IOException

getForms

public FormNode getForms(Data data)
not implemented yet

Specified by:
getForms in class FormNode