public enum Version extends Enum<Version>
Enum Constant and Description |
---|
V21 |
V22 |
V23 |
V231 |
V24 |
V25 |
V251 |
V26 |
V27 |
V271 |
V28 |
V281 |
Modifier and Type | Method and Description |
---|---|
static boolean |
allVersions(Set<Version> someVersions) |
static Version[] |
asOf(Version v) |
boolean |
available()
Returns
true if the structure
classes for this particular version are available
on the classpath. |
static List<Version> |
availableVersions()
Returns a list of all versions for which the structure JARs have been
found on the classpath.
|
static Version[] |
before(Version v) |
static Version[] |
except(Version... v) |
String |
getPackageVersion() |
String |
getVersion()
Returns a version string (e.g.
|
static Version |
highestAvailableVersionOrDefault()
Returns the highest version for which the structure classes are found
on the classes.
|
boolean |
isGreaterThan(Version theVersion)
Returns true if this version is greater than the specified version
|
static Version |
latestVersion()
Returns the newest available version of the message structure classes
on the classpath, or
null if none are found |
static Version |
lowestAvailableVersion()
Returns the lowest version for which the structure classes are found
on the classes.
|
String |
modelPackageName() |
GenericMessage |
newGenericMessage(ModelClassFactory mcf)
Construct and return a new
GenericMessage for the given version |
static boolean |
supportsVersion(String theVersion)
Returns
true if theVersion is a valid HL7
version string representing a known version, e.g. |
static Version |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Version[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static Version |
versionOf(String version) |
public static Version[] values()
for (Version c : Version.values()) System.out.println(c);
public static Version valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getVersion()
public String getPackageVersion()
public static boolean supportsVersion(String theVersion)
true
if theVersion is a valid HL7
version string representing a known version, e.g. "2.4", "2.6"public static Version versionOf(String version)
version
- The version string, e.g. "2.1" or "2.6"public static boolean allVersions(Set<Version> someVersions)
someVersions
- set of versions to be testedtrue
if someVersions contain all supported HL7 versionspublic boolean isGreaterThan(Version theVersion)
public static Version latestVersion()
null
if none are foundpublic String modelPackageName()
public boolean available()
true
if the structure
classes for this particular version are available
on the classpath.public static List<Version> availableVersions()
public static Version lowestAvailableVersion()
Returns the lowest version for which the structure classes are found
on the classes. For instance, if hapi-structures-v24-[version].jar
is the only structure JAR on the current JVM classpath, V24
will
be returned.
Returns null
if none are found
public static Version highestAvailableVersionOrDefault()
public GenericMessage newGenericMessage(ModelClassFactory mcf)
GenericMessage
for the given versionCopyright © 2001–2017 University Health Network. All rights reserved.