## 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
`static String` `SUFFIX` The suffix in the path-component of a URL specification that identifies a dataset specification as being a DODS dataset specification.

Fields inherited from class visad.data.Form
`mathType`

Constructor Summary
`protected` `DODSForm()` Constructs from nothing.

Method Summary
`void` `add(String id, Data data, boolean replace)` Throws an exception.
`static DODSForm` `dodsForm()` Returns an instance of this class.
`String[]` `getDefaultSuffixes()` Returns the path-component suffixes that identifies a dataset specification as being a DODS dataset specification.
`FormNode` `getForms(Data data)` Returns `null`.
`boolean` `isThisType(byte[] block)` Does nothing.
`boolean` `isThisType(String spec)` Indicates if a dataset specification is consistent with a DODS dataset specification.
`DataImpl` `open(String id)` Opens an existing DODS dataset.
`DataImpl` `open(URL url)` Opens an existing data object.
`void` `save(String id, Data data, boolean replace)` Throws an exception.

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`

Field Detail

### SUFFIX

    public static final 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

Constructor Detail

### DODSForm

    protected DODSForm()

  Constructs from nothing.

Method Detail

### dodsForm

    public static DODSForm dodsForm()

  Returns an instance of this class.

  Returns:
    An instance of this class.

### save

    public void save(String id,
                     Data data,
                     boolean replace)
              throws BadFormException,
                     IOException,
                     RemoteException,
                     VisADException

  Throws an exception.

  Specified by:
    `save` in class `FormNode`
  Parameters:
    `id` - An identifier.
    `data` - A VisAD data object.
    `replace` - Whether or not to replace an existing object.
  Throws:
    `UnimplementedException` - Always.
    `BadFormException`
    `IOException`
    `RemoteException`
    `VisADException`

### add

    public void add(String id,
                    Data data,
                    boolean replace)
             throws BadFormException

  Throws an exception.

  Specified by:
    `add` in class `FormNode`
  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(String id)
                  throws BadFormException,
                         IOException,
                         VisADException

  Opens an existing DODS dataset.

  Specified by:
    `open` in class `FormNode`
  Parameters:
    `id` - The URL for a DODS dataset. The path component should have a `SUFFIX` suffix.
  Returns:
    The VisAD data object corresponding to the specified DODS dataset. Might be `null`.
  Throws:
    `BadFormException` - The DODS dataset is corrupt.
    `VisADException` - VisAD failure.
    `RemoteException` - Java RMI failure.
    `IOException`

### open

    public DataImpl open(URL url)
                  throws BadFormException,
                         VisADException,
                         IOException

  Opens an existing data object.

  Specified by:
    `open` in class `FormNode`
  Parameters:
    `url` - The URL for a DODS dataset. The path component should have a `SUFFIX` suffix.
  Returns:
    The VisAD data object corresponding to the DODS dataset.
  Throws:
    `BadFormException` - The DODS dataset is corrupt.
    `VisADException` - VisAD failure.
    `RemoteException` - Java RMI failure.
    `IOException`

### getForms

    public FormNode getForms(Data data)

  Returns `null`.

  Specified by:
    `getForms` in class `FormNode`
  Parameters:
    `data` - A VisAD data object.
  Returns:
    `null`.

### isThisType

    public boolean isThisType(String spec)

  Indicates if a dataset specification is consistent with a DODS dataset specification.

  Specified by:
    `isThisType` in interface `FormFileInformer`
  Parameters:
    `spec` - A dataset specification. NB: Not a URL.
  Returns:
    `true` if 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:
    `isThisType` in interface `FormFileInformer`
  Parameters:
    `block` - A block of data.
  Returns:
    `false` always.

### getDefaultSuffixes

    public 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:
    `getDefaultSuffixes` in interface `FormFileInformer`
  Returns:
    A freshly-allocated array with the relevant suffixes.