info.sswap.api.model
Class VersionInformation

java.lang.Object
  extended by info.sswap.api.model.VersionInformation

public class VersionInformation
extends java.lang.Object

Provides information about the version of Java API.

Author:
Blazej Bulka

Field Summary
private static org.apache.log4j.Logger LOGGER
          Interface to Logging API
private static java.lang.String RELEASE_DATE_PROPERTY
          Name of the property that contains the release date.
private static java.lang.String UNKNOWN
          Default value for the release date if no other information is available
private static java.lang.String VERSION_PROPERTY
          Name of the property that contains the version of the API
private  java.util.Properties versionProperties
          Contains properties read from the file.
 
Constructor Summary
private VersionInformation()
          Creates new version information object.
 
Method Summary
static VersionInformation get()
          Static getter for the version information.
 java.lang.String getReleaseDate()
          Returns the date of the release
 java.lang.String getVersionString()
          Returns the version of Java API
 java.lang.String toString()
          Returns information about the version and release date as a single string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER
Interface to Logging API


UNKNOWN

private static java.lang.String UNKNOWN
Default value for the release date if no other information is available


VERSION_PROPERTY

private static java.lang.String VERSION_PROPERTY
Name of the property that contains the version of the API


RELEASE_DATE_PROPERTY

private static java.lang.String RELEASE_DATE_PROPERTY
Name of the property that contains the release date.


versionProperties

private java.util.Properties versionProperties
Contains properties read from the file.

Constructor Detail

VersionInformation

private VersionInformation()
Creates new version information object. The object reads version data from a resource file that is bundled along with the API.

Method Detail

get

public static final VersionInformation get()
Static getter for the version information.

Returns:
this class

getVersionString

public java.lang.String getVersionString()
Returns the version of Java API

Returns:
the version of Java API or "(unreleased)" if the version information is missing

getReleaseDate

public java.lang.String getReleaseDate()
Returns the date of the release

Returns:
the date of the release or "(unknown)" if the date is not known

toString

public java.lang.String toString()
Returns information about the version and release date as a single string.

Overrides:
toString in class java.lang.Object
Returns:
the string containing information about the version and release date of this software


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.