Package org.openstreetmap.josm.data.osm
Enum DownloadPolicy
- java.lang.Object
-
- java.lang.Enum<DownloadPolicy>
-
- org.openstreetmap.josm.data.osm.DownloadPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DownloadPolicy>
public enum DownloadPolicy extends java.lang.Enum<DownloadPolicy>
Download policy. Determines if download from the OSM server is intended, discouraged, or disabled / blocked.- Since:
- 13559 (extracted from
DataSet
) - See Also:
UploadPolicy
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
xmlFlag
-
Constructor Summary
Constructors Modifier Constructor Description private
DownloadPolicy(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 theupload='...'
XML-attribute in the .osm file.static DownloadPolicy
of(java.lang.String xmlFlag)
Returns theDownloadPolicy
for the givenupload='...'
XML-attributestatic DownloadPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DownloadPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
xmlFlag
final java.lang.String xmlFlag
-
-
Constructor Detail
-
DownloadPolicy
private DownloadPolicy(java.lang.String xmlFlag)
-
-
Method Detail
-
values
public static DownloadPolicy[] 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 (DownloadPolicy c : DownloadPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DownloadPolicy 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
download
attribute
-
of
public static DownloadPolicy of(java.lang.String xmlFlag)
Returns theDownloadPolicy
for the givenupload='...'
XML-attribute- Parameters:
xmlFlag
-download='...'
XML-attribute to convert- Returns:
DownloadPolicy
value- Throws:
java.lang.IllegalArgumentException
- for invalid values
-
-