visad.data.mcidas
Class AreaForm
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- 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'.
-
-
Constructor Summary
Constructors Constructor and Description AreaForm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String id, Data data, boolean replace)This has not been implementedjava.lang.String[]getDefaultSuffixes()return a list of suffixes associated with this file typeFormNodegetForms(Data data)not implemented yetbooleanisThisType(byte[] block)there is no unique way to identify an AREA file by examining the contents of the first block of data valuesbooleanisThisType(java.lang.String name)determine the file type by name.DataImplopen(java.lang.String path)read the area file from local disk, and return the Area file as a DataImpl object (a FlatField).DataImplopen(java.net.URL url)read the area file from a URL, and return the Area file as a DataImpl object (a FlatField).voidsave(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
-
-
-
-
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:
isThisTypein interfaceFormFileInformer- 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)
there is no unique way to identify an AREA file by examining the contents of the first block of data values- Specified by:
isThisTypein interfaceFormFileInformer- 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 java.lang.String[] getDefaultSuffixes()
return a list of suffixes associated with this file type- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- array of suffixes
-
save
public void save(java.lang.String id, Data data, boolean replace) throws BadFormException, java.io.IOException, java.rmi.RemoteException, VisADExceptionsave the file back to disk This has not been implemented yet- Specified by:
savein classFormNode- Throws:
BadFormExceptionjava.io.IOExceptionjava.rmi.RemoteExceptionVisADException
-
add
public void add(java.lang.String id, Data data, boolean replace) throws BadFormExceptionThis has not been implemented- Specified by:
addin classFormNode- 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:
openin classFormNode- Parameters:
path- is the fully-qualified pathname- Throws:
BadFormExceptionjava.rmi.RemoteExceptionVisADException
-
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:
openin classFormNode- Parameters:
url- is the fully-formed URL- Throws:
BadFormExceptionVisADExceptionjava.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG