Class Version

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

public class Version extends Object
Provides basic information about the currently used JOSM build.
Since:
2358
  • Field Details

  • Constructor Details

  • Method Details

    • 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 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

      Replies the version string. Either the SVN revision "1234" (as string) or the the I18n equivalent of "UNKNOWN".
      Returns:
      the JOSM version
    • getReleaseAttributes

      Replies a text with the release attributes
      Returns:
      a text with the release attributes
    • getTime

      public 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 unofficial development build.
      Returns:
      true if this is a local build, i.e. an unofficial development build.
    • 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

      Returns the full User-Agent string
      Returns:
      The User-Agent
      Since:
      5868