- public final static String BASE_URL = "http://www.uniprot.org/";
- private final static String URL_ENC = "UTF-8";
- private final static boolean DEBUG = false;
-
- synchronized private static String encode( final String str ) throws UnsupportedEncodingException {
+ public enum Db {
+ UNKNOWN, UNIPROT;
+ }
+ public final static String BASE_URL = "http://www.uniprot.org/";
+ private final static String URL_ENC = "UTF-8";
+ // uniprot/expasy accession number format (6 chars):
+ // letter digit letter-or-digit letter-or-digit letter-or-digit digit
+ private final static Pattern UNIPROT_AC_PATTERN = Pattern
+ .compile( "^.*[^a-zA-Z0-9]?([A-NR-ZOPQ]\\d[A-Z0-9]{3}\\d)[^a-zA-Z0-9]?" );
+ private final static boolean DEBUG = false;
+
+ private static String encode( final String str ) throws UnsupportedEncodingException {