- public final static String BASE_URL = "http://www.uniprot.org/";
- private final static String URL_ENC = "UTF-8";
- private final static boolean DEBUG = false;
+ public enum Db {
+ UNKNOWN, UNIPROT;
+ }
+ public final static String BASE_URL = "http://www.uniprot.org/";
+ public final static String BASE_EMBL_DB_URL = "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/embl/";
+ 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
+ // ?: => no back-reference
+ // \A => begin of String
+ // \Z => end of String
+ private final static Pattern UNIPROT_AC_PATTERN = Pattern
+ .compile( "(?:\\A|.*[^a-zA-Z0-9])([A-Z]\\d[A-Z0-9]{3}\\d)(?:[^a-zA-Z0-9]|\\Z)" );
+ private final static boolean DEBUG = false;