de.unihalle.informatik.Alida.version
Class ALDVersionProviderReleaseJar

java.lang.Object
  extended by de.unihalle.informatik.Alida.version.ALDVersionProvider
      extended by de.unihalle.informatik.Alida.version.ALDVersionProviderReleaseJar

public class ALDVersionProviderReleaseJar
extends ALDVersionProvider

Info class which provides Alida operators with version information from a version file distributed with the release jar archive.

Author:
moeller

Field Summary
private static java.lang.String releaseVersion
          Release version or tag information.
 
Constructor Summary
ALDVersionProviderReleaseJar()
           
 
Method Summary
private static java.lang.String getReleaseVersion()
          Returns the tag/release version.
private static java.lang.String getReleaseVersion(java.lang.String infofile)
          Returns the release version/tag of the current jar archive.
 java.lang.String getVersion()
          Returns the software version of currently running instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

releaseVersion

private static java.lang.String releaseVersion
Release version or tag information.

Constructor Detail

ALDVersionProviderReleaseJar

public ALDVersionProviderReleaseJar()
Method Detail

getReleaseVersion

private static java.lang.String getReleaseVersion()
Returns the tag/release version.

Note that the tag or release information is assumed to be found in a file named "rev_info.txt" in the given jar archive.

Parameters:
infofile - File where to find the version/tag information.
Returns:
Tag or release version.

getReleaseVersion

private static java.lang.String getReleaseVersion(java.lang.String infofile)
Returns the release version/tag of the current jar archive.

If a file is passed to the function the tag/release information is extracted from that file. If the file does not exist or is empty, a dummy string is returned.
For Alida a file named './rev_info.txt' is included in the jar file.

Parameters:
infofile - File where to find the version information.
Returns:
Version or dummy string (if version file not available).

getVersion

public java.lang.String getVersion()
Description copied from class: ALDVersionProvider
Returns the software version of currently running instance.

Specified by:
getVersion in class ALDVersionProvider