Class Version


  • public class Version
    extends java.lang.Object
    Provides basic information about the currently used JOSM build.
    Since:
    2358
    • 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 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.io.InputStream revisionInfo)
      Initializes the version info from the revision resource file
      boolean isLocalBuild()
      Replies true if this is a local build, i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

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