From: jprocter Date: Thu, 14 Dec 2006 18:18:43 +0000 (+0000) Subject: refactoring org to uk X-Git-Tag: Release_0.2~241 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=937218e31df225e376ee06959013a789f0762355;p=vamsas.git refactoring org to uk git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@279 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/objects/utils/document/VersionEntries.java b/src/org/vamsas/objects/utils/document/VersionEntries.java deleted file mode 100644 index 3edf9bb..0000000 --- a/src/org/vamsas/objects/utils/document/VersionEntries.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - */ -package org.vamsas.objects.utils.document; - -import java.util.Hashtable; - -/** - * enumerates versions for the VamsasDocument.Version string - * provides version comparison methods - * TODO: LATER: associate schema versions with these strings - */ -public class VersionEntries { - public static final String ALPHA_VERSION="alpha"; - public static final String BETA_VERSION="beta"; - protected static Hashtable versions; - static { - versions = new Hashtable(); - // integers represent version hierarchy - 0 precedes 1 - versions.put(ALPHA_VERSION, new Integer(0)); - versions.put(BETA_VERSION, new Integer(1)); - } - // TODO: LATER: decide on best pattern for enumeration classes (ie - need an ordered list of versions, and validator, plus explicit enum-strings) - public static boolean isVersion(String vstring) { - return versions.containsKey(vstring); - } - /** - * returns 0 if levels are equivalent, - * 1 if higher is valid and higher, - * 2 if lower is valid and higher - * -1 if both levels are invalid - * @param higher - * @param lower - * @return - */ - public static int compare(String higher, String lower) { - int v_1 = versions.containsKey(higher) ? ((Integer) versions.get(higher)).intValue() : -1; - int v_2 = versions.containsKey(lower) ? ((Integer) versions.get(lower)).intValue() : -1; - int comp = v_1