public class Version extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Version() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAgentString()
Returns the User-Agent string
|
java.lang.String |
getAgentString(boolean includeOsDetails)
Returns the User-Agent string, with or without OS details
|
java.lang.String |
getFullAgentString()
Returns the full User-Agent string
|
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()
Initializes version info
|
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.Map<java.lang.String,java.lang.String> |
parseManifestStyleFormattedString(java.lang.String content) |
public static final int JOSM_UNKNOWN_VERSION
private int version
private java.lang.String releaseDescription
private java.lang.String time
private java.lang.String buildName
private boolean isLocalBuild
public Version()
public static java.lang.String loadResourceFile(java.net.URL resource)
resource
- the resource url to loadpublic static Version getInstance()
protected java.util.Map<java.lang.String,java.lang.String> parseManifestStyleFormattedString(java.lang.String content)
protected void initFromRevisionInfo(java.lang.String revisionInfo)
revisionInfo
- the revision info loaded from a revision resource filepublic void init()
public java.lang.String getVersionString()
public java.lang.String getReleaseAttributes()
public java.lang.String getTime()
public int getVersion()
JOSM_UNKNOWN_VERSION
if the version isn't known.public boolean isLocalBuild()
public java.lang.String getAgentString()
public java.lang.String getAgentString(boolean includeOsDetails)
includeOsDetails
- Append Operating System details at the end of the User-Agentpublic java.lang.String getFullAgentString()