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.StringbuildNameprivate static Versioninstancethe unique instanceprivate booleanisLocalBuildstatic intJOSM_UNKNOWN_VERSIONconstant to indicate that the current build isn't assigned a JOSM version numberprivate java.lang.StringreleaseDescriptionprivate java.lang.Stringtimeprivate intversion
-
Constructor Summary
Constructors Constructor Description Version()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAgentString()Returns the User-Agent stringjava.lang.StringgetAgentString(boolean includeOsDetails)Returns the User-Agent string, with or without OS detailsjava.lang.StringgetFullAgentString()Returns the full User-Agent stringstatic VersiongetInstance()Replies the unique instance of the version informationjava.lang.StringgetReleaseAttributes()Replies a text with the release attributesjava.lang.StringgetTime()Replies the build date as stringintgetVersion()Replies the JOSM version.java.lang.StringgetVersionString()Replies the version string.voidinit()Initializes version infoprotected voidinitFromRevisionInfo(java.io.InputStream revisionInfo)Initializes the version info from the revision resource filebooleanisLocalBuild()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_VERSIONif 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
-
-