Enum UploadPolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UploadPolicy>

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

      Enum Constants 
      Enum Constant Description
      BLOCKED
      Upload blocked.
      DISCOURAGED
      Upload discouraged, for example when using or distributing a private dataset.
      NORMAL
      Normal dataset, upload intended.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String xmlFlag  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UploadPolicy​(java.lang.String xmlFlag)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getXmlFlag()
      Get the corresponding value of the upload='...' XML-attribute in the .osm file.
      static UploadPolicy of​(java.lang.String xmlFlag)
      Returns the UploadPolicy for the given upload='...' XML-attribute
      static UploadPolicy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static UploadPolicy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

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

      • xmlFlag

        final java.lang.String xmlFlag
    • Constructor Detail

      • UploadPolicy

        private UploadPolicy​(java.lang.String xmlFlag)
    • Method Detail

      • values

        public static UploadPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (UploadPolicy c : UploadPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UploadPolicy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getXmlFlag

        public java.lang.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​(java.lang.String xmlFlag)
        Returns the UploadPolicy for the given upload='...' XML-attribute
        Parameters:
        xmlFlag - upload='...' XML-attribute to convert
        Returns:
        UploadPolicy value
        Throws:
        java.lang.IllegalArgumentException - for invalid values
        Since:
        13434