Enum Class UploadPolicy

java.lang.Object
java.lang.Enum<UploadPolicy>
org.openstreetmap.josm.data.osm.UploadPolicy
All Implemented Interfaces:
Serializable, Comparable<UploadPolicy>, Constable

public enum UploadPolicy extends Enum<UploadPolicy>
Upload policy. Determines if upload to the OSM server is intended, discouraged, or disabled / blocked.
Since:
13559 (extracted from DataSet)
See Also:
  • Enum Constant Details

    • NORMAL

      public static final UploadPolicy NORMAL
      Normal dataset, upload intended.
    • DISCOURAGED

      public static final UploadPolicy DISCOURAGED
      Upload discouraged, for example when using or distributing a private dataset.
    • BLOCKED

      public static final UploadPolicy BLOCKED
      Upload blocked. Upload options completely disabled. Intended for special cases where a warning dialog is not enough, see #12731. For the user, it shouldn't be too easy to disable this flag.
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static UploadPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UploadPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getXmlFlag

      public String getXmlFlag()
      Get the corresponding value of the upload='...' XML-attribute in the .osm file.
      Returns:
      value of the upload attribute
    • of

      public static UploadPolicy of(String xmlFlag)
      Returns the UploadPolicy for the given upload='...' XML-attribute
      Parameters:
      xmlFlag - upload='...' XML-attribute to convert
      Returns:
      UploadPolicy value
      Throws:
      IllegalArgumentException - for invalid values
      Since:
      13434