edu.isi.pegasus.common.util

## Class Version

- java.lang.Object
- - edu.isi.pegasus.common.util.Version

    public class Version
    extends java.lang.Object

This class solely defines the version numbers of PEGASUS. The template file will be substituted by ant during the built process to compile in the built timestamp.

When using the class, the methods for the version number digits will always return an integer. In order to obtain the full version number, including any "release candidate" suffices, please prefer the `toString` method over combining the separate version integers yourself.

Author:
  Karan Vahi, Jens-S. Vöckler, Gideon Juve

### Field Summary

Fields
`private java.util.Properties` `props`
`static java.lang.String` `STAMP_FILENAME` Basename of the build stamp file.

### Constructor Summary

Constructors
Constructor and Description
`Version()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`java.lang.String` `determineBuilt()` Deprecated. Use getTimestamp() instead
`java.lang.String` `determineInstalled()` Determines the built and architecture of the installation.
`java.lang.String` `determinePlatform()` Deprecated. Used getPlatform() instead
`java.lang.String` `getMajor()`
`java.lang.String` `getMinor()`
`java.lang.String` `getPatch()`
`java.lang.String` `getPlatform()`
`java.lang.String` `getTimestamp()`
`java.lang.String` `getVersion()`
`static Version` `instance()` Deprecated. Just create a new instance
`boolean` `matches()` Determines, if the compiled version and the installed version match.
`private java.lang.String[]` `splitVersion()`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### STAMP_FILENAME

    public static final java.lang.String STAMP_FILENAME

Basename of the build stamp file.

See Also:
  Constant Field Values

#### props

    private java.util.Properties props

### Constructor Detail

#### Version

    public Version()

### Method Detail

#### instance

    public static Version instance()

Deprecated. Just create a new instance

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getVersion

    public java.lang.String getVersion()

Returns:
  The pegasus version

#### splitVersion

    private java.lang.String[] splitVersion()

#### getMajor

    public java.lang.String getMajor()

Returns:
  Major version number

#### getMinor

    public java.lang.String getMinor()

Returns:
  Minor version number

#### getPatch

    public java.lang.String getPatch()

Returns:
  Patch version number plus other tags

#### determineBuilt

    public java.lang.String determineBuilt()

Deprecated. Use getTimestamp() instead

Returns:
  the formatted time stamp of the build.

#### getTimestamp

    public java.lang.String getTimestamp()

Returns:
  the build timestamp

#### determinePlatform

    public java.lang.String determinePlatform()

Deprecated. Used getPlatform() instead
Determines the build platform.

Returns:
  an identifier for the build platform.

#### getPlatform

    public java.lang.String getPlatform()

Returns:
  The build platform

#### determineInstalled

    public java.lang.String determineInstalled()

Determines the built and architecture of the installation. These are usually separated by a linear white-space.

Returns:
  the formatted time stamp of the built, if available, and an identifier for the architecture. An string indicating that the build is unknown is returned on failure.

#### matches

    public boolean matches()

Determines, if the compiled version and the installed version match. The match is done by comparing the timestamps and architectures.

Returns:
  true, if versions match, false otherwise.