Package org.openstreetmap.josm.data
Class Version
- java.lang.Object
-
- org.openstreetmap.josm.data.Version
-
-
Field Summary
Fields Modifier and Type Field Description private 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 String
releaseDescription
private 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 String
getAgentString()
Returns the User-Agent stringString
getAgentString(boolean includeOsDetails)
Returns the User-Agent string, with or without OS detailsString
getFullAgentString()
Returns the full User-Agent stringstatic Version
getInstance()
Replies the unique instance of the version informationString
getReleaseAttributes()
Replies a text with the release attributesString
getTime()
Replies the build date as stringint
getVersion()
Replies the JOSM version.String
getVersionString()
Replies the version string.void
init()
Initializes version infoprotected void
initFromRevisionInfo(InputStream revisionInfo)
Initializes the version infos 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 String releaseDescription
-
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(InputStream revisionInfo)
Initializes the version infos 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 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 String getReleaseAttributes()
Replies a text with the release attributes- Returns:
- a text with the release attributes
-
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 String getAgentString()
Returns the User-Agent string- Returns:
- The User-Agent
-
getAgentString
public 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 String getFullAgentString()
Returns the full User-Agent string- Returns:
- The User-Agent
- Since:
- 5868
-
-