org.openstreetmap.josm.data
Class Version

java.lang.Object
  extended by org.openstreetmap.josm.data.Version

public class Version
extends java.lang.Object

Provides basic information about the currently used JOSM build.


Field Summary
private  java.lang.String buildName
           
private static Version instance
          the unique instance
private  boolean isLocalBuild
           
static int JOSM_UNKNOWN_VERSION
          constant to indicate that the current build isn't assigned a JOSM version number
private  java.lang.String releaseDescription
           
private  java.lang.String time
           
private  int version
           
 
Constructor Summary
Version()
           
 
Method Summary
 java.lang.String getAgentString()
           
static Version getInstance()
          Replies the unique instance of the version information
 java.lang.String getReleaseAttributes()
          Replies a text with the release attributes
 java.lang.String getTime()
          Replies the build date as string
 int getVersion()
          Replies the JOSM version.
 java.lang.String getVersionString()
          Replies the version string.
 void init()
           
protected  void initFromRevisionInfo(java.lang.String revisionInfo)
          Initializes the version infos from the revision resource file
 boolean isLocalBuild()
          Replies true if this is a local build, i.e.
static java.lang.String loadResourceFile(java.net.URL resource)
          Load the specified resource as string.
protected  java.util.HashMap<java.lang.String,java.lang.String> parseManifestStyleFormattedString(java.lang.String content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOSM_UNKNOWN_VERSION

public static final int JOSM_UNKNOWN_VERSION
constant to indicate that the current build isn't assigned a JOSM version number

See Also:
Constant Field Values

instance

private static Version instance
the unique instance


version

private int version

releaseDescription

private java.lang.String releaseDescription

time

private java.lang.String time

buildName

private java.lang.String buildName

isLocalBuild

private boolean isLocalBuild
Constructor Detail

Version

public Version()
Method Detail

loadResourceFile

public static java.lang.String loadResourceFile(java.net.URL resource)
Load the specified resource as string.

Parameters:
resource - the resource url to load
Returns:
the content of the resource file; null, if an error occurred

getInstance

public static Version getInstance()
Replies the unique instance of the version information

Returns:
the unique instance of the version information

parseManifestStyleFormattedString

protected java.util.HashMap<java.lang.String,java.lang.String> parseManifestStyleFormattedString(java.lang.String content)

initFromRevisionInfo

protected void initFromRevisionInfo(java.lang.String revisionInfo)
Initializes the version infos from the revision resource file

Parameters:
revisionInfo - the revision info loaded from a revision resource file

init

public void init()

getVersionString

public java.lang.String getVersionString()
Replies the version string. Either the SVN revision "1234" (as string) or the the I18n equivalent of "UNKNOWN".

Returns:
the JOSM version

getReleaseAttributes

public java.lang.String getReleaseAttributes()
Replies a text with the release attributes

Returns:
a text with the release attributes

getTime

public java.lang.String getTime()
Replies the build date as string

Returns:
the build date as string

getVersion

public int getVersion()
Replies the JOSM version. Replies JOSM_UNKNOWN_VERSION if the version isn't known.

Returns:
the JOSM version

isLocalBuild

public boolean isLocalBuild()
Replies true if this is a local build, i.e. an inofficial development build.

Returns:
true if this is a local build, i.e. an inofficial development build.

getAgentString

public java.lang.String getAgentString()


JOSM