Package org.openstreetmap.josm.data.osm
Enum UploadPolicy
- java.lang.Object
-
- java.lang.Enum<UploadPolicy>
-
- org.openstreetmap.josm.data.osm.UploadPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<UploadPolicy>
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:
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.
-
Constructor Summary
Constructors Modifier Constructor Description private
UploadPolicy(String xmlFlag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getXmlFlag()
Get the corresponding value of theupload='...'
XML-attribute in the .osm file.static UploadPolicy
of(String xmlFlag)
Returns theUploadPolicy
for the givenupload='...'
XML-attributestatic UploadPolicy
valueOf(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.
-
-
Constructor Detail
-
UploadPolicy
private UploadPolicy(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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getXmlFlag
public String getXmlFlag()
Get the corresponding value of theupload='...'
XML-attribute in the .osm file.- Returns:
- value of the
upload
attribute
-
of
public static UploadPolicy of(String xmlFlag)
Returns theUploadPolicy
for the givenupload='...'
XML-attribute- Parameters:
xmlFlag
-upload='...'
XML-attribute to convert- Returns:
UploadPolicy
value- Throws:
IllegalArgumentException
- for invalid values- Since:
- 13434
-
-