Package org.openstreetmap.josm.data
Class Version
- java.lang.Object
-
- org.openstreetmap.josm.data.Version
-
public class Version extends java.lang.Object
Provides basic information about the currently used JOSM build.- Since:
- 2358
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
buildName
private static Version
instance
the unique instanceprivate boolean
isLocalBuild
static int
JOSM_UNKNOWN_VERSION
constant to indicate that the current build isn't assigned a JOSM version numberprivate java.lang.String
releaseDescription
private java.lang.String
time
private int
version
-
Constructor Summary
Constructors Constructor Description Version()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAgentString()
Returns the User-Agent stringjava.lang.String
getAgentString(boolean includeOsDetails)
Returns the User-Agent string, with or without OS detailsjava.lang.String
getFullAgentString()
Returns the full User-Agent stringstatic Version
getInstance()
Replies the unique instance of the version informationjava.lang.String
getReleaseAttributes()
Replies a text with the release attributesjava.lang.String
getTime()
Replies the build date as stringint
getVersion()
Replies the JOSM version.java.lang.String
getVersionString()
Replies the version string.void
init()
Initializes version infoprotected void
initFromRevisionInfo(java.io.InputStream revisionInfo)
Initializes the version info from the revision resource fileboolean
isLocalBuild()
Replies true if this is a local build, i.e.
-
-
-
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
-
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
-
getInstance
public static Version getInstance()
Replies the unique instance of the version information- Returns:
- the unique instance of the version information
-
initFromRevisionInfo
protected void initFromRevisionInfo(java.io.InputStream revisionInfo)
Initializes the version info from the revision resource file- Parameters:
revisionInfo
- the revision info from a revision resource file as InputStream
-
init
public void init()
Initializes version info
-
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. RepliesJOSM_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 unofficial development build.- Returns:
- true if this is a local build, i.e. an unofficial development build.
-
getAgentString
public java.lang.String getAgentString()
Returns the User-Agent string- Returns:
- The User-Agent
-
getAgentString
public java.lang.String getAgentString(boolean includeOsDetails)
Returns the User-Agent string, with or without OS details- Parameters:
includeOsDetails
- Append Operating System details at the end of the User-Agent- Returns:
- The User-Agent
- Since:
- 5956
-
getFullAgentString
public java.lang.String getFullAgentString()
Returns the full User-Agent string- Returns:
- The User-Agent
- Since:
- 5868
-
-