Enum Class DownloadPolicy

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

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

    • NORMAL

      public static final DownloadPolicy NORMAL
      Normal dataset, download intended.
    • BLOCKED

      public static final DownloadPolicy BLOCKED
      Download blocked. Download options completely disabled. Intended for private layers, see #8039.
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static DownloadPolicy[] 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 DownloadPolicy 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 download attribute
    • of

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