Package org.openstreetmap.josm.data.osm
Enum UploadPolicy
- java.lang.Object
-
- java.lang.Enum<UploadPolicy>
-
- org.openstreetmap.josm.data.osm.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 BLOCKEDUpload blocked.DISCOURAGEDUpload discouraged, for example when using or distributing a private dataset.NORMALNormal dataset, upload intended.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringxmlFlag
-
Constructor Summary
Constructors Modifier Constructor Description privateUploadPolicy(java.lang.String xmlFlag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetXmlFlag()Get the corresponding value of theupload='...'XML-attribute in the .osm file.static UploadPolicyof(java.lang.String xmlFlag)Returns theUploadPolicyfor the givenupload='...'XML-attributestatic UploadPolicyvalueOf(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.
-
-
-
Enum Constant Detail
-
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 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 namejava.lang.NullPointerException- if the argument is null
-
getXmlFlag
public java.lang.String getXmlFlag()
Get the corresponding value of theupload='...'XML-attribute in the .osm file.- Returns:
- value of the
uploadattribute
-
of
public static UploadPolicy of(java.lang.String xmlFlag)
Returns theUploadPolicyfor the givenupload='...'XML-attribute- Parameters:
xmlFlag-upload='...'XML-attribute to convert- Returns:
UploadPolicyvalue- Throws:
java.lang.IllegalArgumentException- for invalid values- Since:
- 13434
-
-