visad.data.dods
Class DODSForm
- java.lang.Object
-
- visad.data.FormNode
-
- visad.data.Form
-
- visad.data.dods.DODSForm
-
- All Implemented Interfaces:
- FormFileInformer
public class DODSForm extends Form implements FormFileInformer
Provides support for accessing the DODS form of data from VisAD.Instances are mutable.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringSUFFIXThe suffix in the path-component of a URL specification that identifies a dataset specification as being a DODS dataset specification.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.lang.String id, Data data, boolean replace)Throws an exception.static DODSFormdodsForm()Returns an instance of this class.java.lang.String[]getDefaultSuffixes()Returns the path-component suffixes that identifies a dataset specification as being a DODS dataset specification.FormNodegetForms(Data data)Returnsnull.booleanisThisType(byte[] block)Does nothing.booleanisThisType(java.lang.String spec)Indicates if a dataset specification is consistent with a DODS dataset specification.DataImplopen(java.lang.String id)Opens an existing DODS dataset.DataImplopen(java.net.URL url)Opens an existing data object.voidsave(java.lang.String id, Data data, boolean replace)Throws an exception.-
Methods inherited from class visad.data.Form
getMathType
-
-
-
-
Field Detail
-
SUFFIX
public static final java.lang.String SUFFIX
The suffix in the path-component of a URL specification that identifies a dataset specification as being a DODS dataset specification. It doesn't have a leading period.- See Also:
- Constant Field Values
-
-
Method Detail
-
dodsForm
public static DODSForm dodsForm()
Returns an instance of this class.- Returns:
- An instance of this class.
-
save
public void save(java.lang.String id, Data data, boolean replace) throws BadFormException, java.io.IOException, java.rmi.RemoteException, VisADExceptionThrows an exception.- Specified by:
savein classFormNode- Parameters:
id- An identifier.data- A VisAD data object.replace- Whether or not to replace an existing object.- Throws:
UnimplementedException- Always.BadFormExceptionjava.io.IOExceptionjava.rmi.RemoteExceptionVisADException
-
add
public void add(java.lang.String id, Data data, boolean replace) throws BadFormExceptionThrows an exception.- Specified by:
addin classFormNode- Parameters:
id- An identifier.data- A VisAD data object.replace- Whether or not to replace an existing object.- Throws:
BadFormException- Always.
-
open
public DataImpl open(java.lang.String id) throws BadFormException, java.io.IOException, VisADException
Opens an existing DODS dataset.- Specified by:
openin classFormNode- Parameters:
id- The URL for a DODS dataset. The path component should have aSUFFIXsuffix.- Returns:
- The VisAD data object corresponding to the
specified DODS dataset. Might be
null. - Throws:
BadFormException- The DODS dataset is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.java.io.IOException
-
open
public DataImpl open(java.net.URL url) throws BadFormException, VisADException, java.io.IOException
Opens an existing data object.- Specified by:
openin classFormNode- Parameters:
url- The URL for a DODS dataset. The path component should have aSUFFIXsuffix.- Returns:
- The VisAD data object corresponding to the DODS dataset.
- Throws:
BadFormException- The DODS dataset is corrupt.VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.java.io.IOException
-
isThisType
public boolean isThisType(java.lang.String spec)
Indicates if a dataset specification is consistent with a DODS dataset specification.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
spec- A dataset specification. NB: Not a URL.- Returns:
trueif and only if the dataset specification is consistent with a DODS dataset specification.
-
isThisType
public boolean isThisType(byte[] block)
Does nothing. Because the initial block of data in a DODS dataset can't be obtained from a DODS server, this routine does nothing and always returns false.- Specified by:
isThisTypein interfaceFormFileInformer- Parameters:
block- A block of data.- Returns:
falsealways.
-
getDefaultSuffixes
public java.lang.String[] getDefaultSuffixes()
Returns the path-component suffixes that identifies a dataset specification as being a DODS dataset specification. The suffixes don't have a leading period. The returned array can be safely modified.- Specified by:
getDefaultSuffixesin interfaceFormFileInformer- Returns:
- A freshly-allocated array with the relevant suffixes.
-
-
DMelt 3.0 © DataMelt by jWork.ORG