Package edu.ucsb.nceas.metacat
Class Version
java.lang.Object
edu.ucsb.nceas.metacat.Version
- All Implemented Interfaces:
Comparable<Version>
- Direct Known Subclasses:
DBVersion
,MetacatVersion
- Author:
- jones Version represents the current version information for this Metacat instance.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compare this Version object to another.int
getSubversion
(int level)
-
Field Details
-
allowedVersionLevels
protected static int allowedVersionLevels -
subversions
protected int[] subversions -
versionString
-
-
Constructor Details
-
Version
Create a Version object, setting sub version levels based on the given version id.- Parameters:
versionID
-
-
-
Method Details
-
compareTo
Compare this Version object to another. Use the sub version levels to do the comparison. In that way, we can make sure that something like version 1.0.0.1 is less than 2.0.1.- Specified by:
compareTo
in interfaceComparable<Version>
- Parameters:
anotherVersion
-- Returns:
- -1 if this version is less than given version, 0 if they are equal and 1 if this version is greater than given version.
-
getSubversion
public int getSubversion(int level) -
getVersionString
-