Enum AvailabilityStatus
- java.lang.Object
-
- java.lang.Enum<AvailabilityStatus>
-
- org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<AvailabilityStatus>
public enum AvailabilityStatus extends Enum<AvailabilityStatus>
Describes the availability of an entry.- Author:
- Jens Riemschneider
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPROVED
The entry is approved.DEPRECATED
The entry is deprecated.SUBMITTED
The entry is submitted.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getOpcode()
String
getQueryOpcode()
static String
toOpcode(AvailabilityStatus status)
Retrieves the representation of a given status.static String
toQueryOpcode(AvailabilityStatus status)
Retrieves the query representation of a given status.static AvailabilityStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static AvailabilityStatus
valueOfOpcode(String opcode)
Returns the availability status represented by the given opcode.static AvailabilityStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
APPROVED
public static final AvailabilityStatus APPROVED
The entry is approved.
-
DEPRECATED
public static final AvailabilityStatus DEPRECATED
The entry is deprecated.
-
SUBMITTED
public static final AvailabilityStatus SUBMITTED
The entry is submitted.
-
-
Method Detail
-
values
public static AvailabilityStatus[] 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 (AvailabilityStatus c : AvailabilityStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AvailabilityStatus 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
-
getOpcode
public String getOpcode()
- Returns:
- the opcode used as a string representation in non-query transformations.
-
getQueryOpcode
public String getQueryOpcode()
- Returns:
- the opcode used as a string representation in transformations for query requests and responses.
-
valueOfOpcode
public static AvailabilityStatus valueOfOpcode(String opcode)
Returns the availability status represented by the given opcode. This method takes standard opcodes and query opcodes into account.- Parameters:
opcode
- the opcode to look up. Can benull
.- Returns:
- the status.
null
if the opcode wasnull
or could not be found.
See ITI TF v.8.0 Vol. 2a Section 3.18.4.1.2.3.6.
-
toOpcode
public static String toOpcode(AvailabilityStatus status)
Retrieves the representation of a given status.This is a
null
-safe version ofgetOpcode()
.- Parameters:
status
- the status. Can benull
.- Returns:
- the representation or
null
if the status wasnull
.
-
toQueryOpcode
public static String toQueryOpcode(AvailabilityStatus status)
Retrieves the query representation of a given status.This is a
null
-safe version ofgetQueryOpcode()
.- Parameters:
status
- the status. Can benull
.- Returns:
- the representation or
null
if the status wasnull
.
-
-