Enum DocumentAvailability
- java.lang.Object
-
- java.lang.Enum<DocumentAvailability>
-
- org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentAvailability
-
- All Implemented Interfaces:
Serializable
,Comparable<DocumentAvailability>
public enum DocumentAvailability extends Enum<DocumentAvailability>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFullQualified()
String
getOpcode()
static String
toFullQualifiedOpcode(DocumentAvailability status)
Retrieves the fully qualified representation of a document availability.static String
toOpcode(DocumentAvailability documentAvailability)
Retrieves the representation of a given document availability.static DocumentAvailability
valueOf(String name)
Returns the enum constant of this type with the specified name.static DocumentAvailability
valueOfOpcode(String opcode)
Returns the document availability represented by the given opcode.static DocumentAvailability[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFFLINE
public static final DocumentAvailability OFFLINE
Online indicates the Document in the Document Repository is available to be retrieved.
-
ONLINE
public static final DocumentAvailability ONLINE
Offline indicates the Document in the Document Repository is not available to be retrieved.
-
-
Method Detail
-
values
public static DocumentAvailability[] 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 (DocumentAvailability c : DocumentAvailability.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DocumentAvailability 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()
-
getFullQualified
public String getFullQualified()
-
valueOfOpcode
public static DocumentAvailability valueOfOpcode(String opcode)
Returns the document availability represented by the given opcode. This method takes standard opcodes and fully qualified 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 IHE_ITI_Suppl_XDS_Metadata_Update Table 4.2.3.2-1.
-
toOpcode
public static String toOpcode(DocumentAvailability documentAvailability)
Retrieves the representation of a given document availability.This is a
null
-safe version ofgetOpcode()
.- Parameters:
documentAvailability
- the documentAvailability. Can benull
.- Returns:
- the representation or
null
if the status wasnull
.
-
toFullQualifiedOpcode
public static String toFullQualifiedOpcode(DocumentAvailability status)
Retrieves the fully qualified representation of a document availability.This is a
null
-safe version ofgetFullQualified()
.- Parameters:
status
- the status. Can benull
.- Returns:
- the representation or
null
if the status wasnull
.
-
-