dods.dap
Class ServerVersion

java.lang.Object
  extended by dods.dap.ServerVersion

public class ServerVersion
extends java.lang.Object

This class is a convenient place to store the major and minor version number of the remote server, as well as the full version string. It is used so that classes which implement ClientIO don't need any knowledge of the DDS class.

See Also:
ClientIO, DDS

Constructor Summary
ServerVersion(int major, int minor)
          Construct a new ServerVersion, setting major and minor version explicitly.
ServerVersion(java.lang.String ver)
          Construct a new ServerVersion, setting major and minor version based on the full version string.
 
Method Summary
static java.lang.String getCurrentVersion()
          Returns the DODS core version as a String.
 int getMajor()
          Returns the major version number.
 int getMinor()
          Returns the minor version number.
 java.lang.String toString()
          Returns the full version string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerVersion

public ServerVersion(java.lang.String ver)
Construct a new ServerVersion, setting major and minor version based on the full version string.

Parameters:
ver - the full version string.

ServerVersion

public ServerVersion(int major,
                     int minor)
Construct a new ServerVersion, setting major and minor version explicitly.

Parameters:
major - the major version number.
minor - the minor version number.
Method Detail

getMajor

public final int getMajor()
Returns the major version number.

Returns:
the major version number.

getMinor

public final int getMinor()
Returns the minor version number.

Returns:
the minor version number.

toString

public final java.lang.String toString()
Returns the full version string.

Overrides:
toString in class java.lang.Object
Returns:
the full version string.

getCurrentVersion

public static java.lang.String getCurrentVersion()
Returns the DODS core version as a String. This was a convenient place to put this information, rather than creating a new class.

Returns:
the current DODS version.