visad.data.dods
Class AttributeAdapterFactory

java.lang.Object
  extended by visad.data.dods.AttributeAdapterFactory

public class AttributeAdapterFactory
extends Object

Provides support for creating adapters that bridge between DODS attributes and the VisAD data-import context.

Instances are immutable.

Author:
Steven R. Emmerson

Constructor Summary
protected AttributeAdapterFactory()
          Constructs from nothing.
 
Method Summary
 AttributeAdapter attributeAdapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS attribute.
static AttributeAdapterFactory attributeAdapterFactory()
          Returns an instance of this class.
 ByteAttributeAdapter byteAdapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.BYTE attribute.
 ContainerAttributeAdapter containerAdapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.CONTAINER attribute.
 Float32AttributeAdapter float32Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.FLOAT32 attribute.
 Float64AttributeAdapter float64Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.FLOAT64 attribute.
 Int16AttributeAdapter int16Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.INT16 attribute.
 Int32AttributeAdapter int32Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.INT32 attribute.
 StringAttributeAdapter stringAdapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.STRING attribute.
 UInt16AttributeAdapter uInt16Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.UINT16 attribute.
 UInt32AttributeAdapter uInt32Adapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.UINT32 attribute.
 UnknownAttributeAdapter unknownAdapter(String name, dods.dap.Attribute attr)
          Returns an adapter of a DODS Attribute.UNKNOWN attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeAdapterFactory

protected AttributeAdapterFactory()
Constructs from nothing.

Method Detail

attributeAdapterFactory

public static AttributeAdapterFactory attributeAdapterFactory()
Returns an instance of this class.

Returns:
An instance of this class.

attributeAdapter

public AttributeAdapter attributeAdapter(String name,
                                         dods.dap.Attribute attr)
                                  throws BadFormException,
                                         VisADException,
                                         RemoteException
Returns an adapter of a DODS attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute. The class of the object depends on the attribute.
Throws:
BadFormException - The DODS information is corrupt.
VisADException - VisAD failure.
RemoteException - Java RMI failure.

stringAdapter

public StringAttributeAdapter stringAdapter(String name,
                                            dods.dap.Attribute attr)
                                     throws VisADException,
                                            RemoteException
Returns an adapter of a DODS Attribute.STRING attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

byteAdapter

public ByteAttributeAdapter byteAdapter(String name,
                                        dods.dap.Attribute attr)
                                 throws VisADException,
                                        RemoteException
Returns an adapter of a DODS Attribute.BYTE attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

int16Adapter

public Int16AttributeAdapter int16Adapter(String name,
                                          dods.dap.Attribute attr)
                                   throws VisADException,
                                          RemoteException
Returns an adapter of a DODS Attribute.INT16 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

uInt16Adapter

public UInt16AttributeAdapter uInt16Adapter(String name,
                                            dods.dap.Attribute attr)
                                     throws VisADException,
                                            RemoteException
Returns an adapter of a DODS Attribute.UINT16 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

int32Adapter

public Int32AttributeAdapter int32Adapter(String name,
                                          dods.dap.Attribute attr)
                                   throws VisADException,
                                          RemoteException
Returns an adapter of a DODS Attribute.INT32 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

uInt32Adapter

public UInt32AttributeAdapter uInt32Adapter(String name,
                                            dods.dap.Attribute attr)
                                     throws VisADException,
                                            RemoteException
Returns an adapter of a DODS Attribute.UINT32 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

float32Adapter

public Float32AttributeAdapter float32Adapter(String name,
                                              dods.dap.Attribute attr)
                                       throws VisADException,
                                              RemoteException
Returns an adapter of a DODS Attribute.FLOAT32 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

float64Adapter

public Float64AttributeAdapter float64Adapter(String name,
                                              dods.dap.Attribute attr)
                                       throws VisADException,
                                              RemoteException
Returns an adapter of a DODS Attribute.FLOAT64 attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

containerAdapter

public ContainerAttributeAdapter containerAdapter(String name,
                                                  dods.dap.Attribute attr)
                                           throws VisADException,
                                                  RemoteException
Returns an adapter of a DODS Attribute.CONTAINER attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

unknownAdapter

public UnknownAttributeAdapter unknownAdapter(String name,
                                              dods.dap.Attribute attr)
                                       throws VisADException,
                                              RemoteException
Returns an adapter of a DODS Attribute.UNKNOWN attribute.

Parameters:
name - The name of the DODS attribute.
attr - The DODS attribute.
Returns:
An adapter of the DODS attribute.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.